@azure/arm-elasticsan 1.0.0-beta.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 +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +2897 -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/samples-dev/elasticSansCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/elasticSansCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/elasticSansCreateSample.js +62 -0
- package/dist-esm/samples-dev/elasticSansCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/elasticSansDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/elasticSansDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/elasticSansDeleteSample.js +49 -0
- package/dist-esm/samples-dev/elasticSansDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/elasticSansGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/elasticSansGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/elasticSansGetSample.js +49 -0
- package/dist-esm/samples-dev/elasticSansGetSample.js.map +1 -0
- package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.js +75 -0
- package/dist-esm/samples-dev/elasticSansListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.js +73 -0
- package/dist-esm/samples-dev/elasticSansListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/elasticSansUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/elasticSansUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/elasticSansUpdateSample.js +55 -0
- package/dist-esm/samples-dev/elasticSansUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +73 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/skusListSample.d.ts +2 -0
- package/dist-esm/samples-dev/skusListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/skusListSample.js +75 -0
- package/dist-esm/samples-dev/skusListSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeGroupsCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsCreateSample.js +62 -0
- package/dist-esm/samples-dev/volumeGroupsCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeGroupsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsDeleteSample.js +51 -0
- package/dist-esm/samples-dev/volumeGroupsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeGroupsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsGetSample.js +51 -0
- package/dist-esm/samples-dev/volumeGroupsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.js +77 -0
- package/dist-esm/samples-dev/volumeGroupsListByElasticSanSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeGroupsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeGroupsUpdateSample.js +62 -0
- package/dist-esm/samples-dev/volumeGroupsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesCreateSample.js +59 -0
- package/dist-esm/samples-dev/volumesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesDeleteSample.js +53 -0
- package/dist-esm/samples-dev/volumesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesGetSample.js +53 -0
- package/dist-esm/samples-dev/volumesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesListByVolumeGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesListByVolumeGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesListByVolumeGroupSample.js +79 -0
- package/dist-esm/samples-dev/volumesListByVolumeGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesUpdateSample.js +58 -0
- package/dist-esm/samples-dev/volumesUpdateSample.js.map +1 -0
- package/dist-esm/src/elasticSanManagement.d.ts +24 -0
- package/dist-esm/src/elasticSanManagement.d.ts.map +1 -0
- package/dist-esm/src/elasticSanManagement.js +107 -0
- package/dist-esm/src/elasticSanManagement.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -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 +691 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +88 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +29 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +877 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +19 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +170 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/elasticSans.d.ts +107 -0
- package/dist-esm/src/operations/elasticSans.d.ts.map +1 -0
- package/dist-esm/src/operations/elasticSans.js +509 -0
- package/dist-esm/src/operations/elasticSans.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +6 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +13 -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 +90 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/skus.d.ts +26 -0
- package/dist-esm/src/operations/skus.d.ts.map +1 -0
- package/dist-esm/src/operations/skus.js +90 -0
- package/dist-esm/src/operations/skus.js.map +1 -0
- package/dist-esm/src/operations/volumeGroups.d.ts +99 -0
- package/dist-esm/src/operations/volumeGroups.d.ts.map +1 -0
- package/dist-esm/src/operations/volumeGroups.js +438 -0
- package/dist-esm/src/operations/volumeGroups.js.map +1 -0
- package/dist-esm/src/operations/volumes.d.ts +109 -0
- package/dist-esm/src/operations/volumes.d.ts.map +1 -0
- package/dist-esm/src/operations/volumes.js +468 -0
- package/dist-esm/src/operations/volumes.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/elasticSans.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/elasticSans.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/elasticSans.js +9 -0
- package/dist-esm/src/operationsInterfaces/elasticSans.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -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/skus.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/skus.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/skus.js +9 -0
- package/dist-esm/src/operationsInterfaces/skus.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/volumeGroups.d.ts +74 -0
- package/dist-esm/src/operationsInterfaces/volumeGroups.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/volumeGroups.js +9 -0
- package/dist-esm/src/operationsInterfaces/volumeGroups.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/volumes.d.ts +82 -0
- package/dist-esm/src/operationsInterfaces/volumes.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/volumes.js +9 -0
- package/dist-esm/src/operationsInterfaces/volumes.js.map +1 -0
- package/dist-esm/test/elasticsan_examples.spec.d.ts +4 -0
- package/dist-esm/test/elasticsan_examples.spec.d.ts.map +1 -0
- package/dist-esm/test/elasticsan_examples.spec.js +80 -0
- package/dist-esm/test/elasticsan_examples.spec.js.map +1 -0
- package/package.json +122 -0
- package/review/arm-elasticsan.api.md +536 -0
- package/rollup.config.js +122 -0
- package/src/elasticSanManagement.ts +161 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +787 -0
- package/src/models/mappers.ts +935 -0
- package/src/models/parameters.ts +199 -0
- package/src/operations/elasticSans.ts +683 -0
- package/src/operations/index.ts +13 -0
- package/src/operations/operations.ts +98 -0
- package/src/operations/skus.ts +96 -0
- package/src/operations/volumeGroups.ts +629 -0
- package/src/operations/volumes.ts +673 -0
- package/src/operationsInterfaces/elasticSans.ts +139 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/skus.ts +22 -0
- package/src/operationsInterfaces/volumeGroups.ts +147 -0
- package/src/operationsInterfaces/volumes.ts +157 -0
- package/tsconfig.json +33 -0
- package/types/arm-elasticsan.d.ts +1036 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,683 @@
|
|
|
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 { ElasticSans } 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 { ElasticSanManagement } from "../elasticSanManagement";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
ElasticSan,
|
|
19
|
+
ElasticSansListBySubscriptionNextOptionalParams,
|
|
20
|
+
ElasticSansListBySubscriptionOptionalParams,
|
|
21
|
+
ElasticSansListByResourceGroupNextOptionalParams,
|
|
22
|
+
ElasticSansListByResourceGroupOptionalParams,
|
|
23
|
+
ElasticSansListBySubscriptionResponse,
|
|
24
|
+
ElasticSansListByResourceGroupResponse,
|
|
25
|
+
ElasticSansCreateOptionalParams,
|
|
26
|
+
ElasticSansCreateResponse,
|
|
27
|
+
ElasticSanUpdate,
|
|
28
|
+
ElasticSansUpdateOptionalParams,
|
|
29
|
+
ElasticSansUpdateResponse,
|
|
30
|
+
ElasticSansDeleteOptionalParams,
|
|
31
|
+
ElasticSansGetOptionalParams,
|
|
32
|
+
ElasticSansGetResponse,
|
|
33
|
+
ElasticSansListBySubscriptionNextResponse,
|
|
34
|
+
ElasticSansListByResourceGroupNextResponse
|
|
35
|
+
} from "../models";
|
|
36
|
+
|
|
37
|
+
/// <reference lib="esnext.asynciterable" />
|
|
38
|
+
/** Class containing ElasticSans operations. */
|
|
39
|
+
export class ElasticSansImpl implements ElasticSans {
|
|
40
|
+
private readonly client: ElasticSanManagement;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initialize a new instance of the class ElasticSans class.
|
|
44
|
+
* @param client Reference to the service client
|
|
45
|
+
*/
|
|
46
|
+
constructor(client: ElasticSanManagement) {
|
|
47
|
+
this.client = client;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Gets a list of ElasticSans in a subscription
|
|
52
|
+
* @param options The options parameters.
|
|
53
|
+
*/
|
|
54
|
+
public listBySubscription(
|
|
55
|
+
options?: ElasticSansListBySubscriptionOptionalParams
|
|
56
|
+
): PagedAsyncIterableIterator<ElasticSan> {
|
|
57
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
|
58
|
+
return {
|
|
59
|
+
next() {
|
|
60
|
+
return iter.next();
|
|
61
|
+
},
|
|
62
|
+
[Symbol.asyncIterator]() {
|
|
63
|
+
return this;
|
|
64
|
+
},
|
|
65
|
+
byPage: () => {
|
|
66
|
+
return this.listBySubscriptionPagingPage(options);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private async *listBySubscriptionPagingPage(
|
|
72
|
+
options?: ElasticSansListBySubscriptionOptionalParams
|
|
73
|
+
): AsyncIterableIterator<ElasticSan[]> {
|
|
74
|
+
let result = await this._listBySubscription(options);
|
|
75
|
+
yield result.value || [];
|
|
76
|
+
let continuationToken = result.nextLink;
|
|
77
|
+
while (continuationToken) {
|
|
78
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
79
|
+
continuationToken = result.nextLink;
|
|
80
|
+
yield result.value || [];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private async *listBySubscriptionPagingAll(
|
|
85
|
+
options?: ElasticSansListBySubscriptionOptionalParams
|
|
86
|
+
): AsyncIterableIterator<ElasticSan> {
|
|
87
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
88
|
+
yield* page;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Gets a list of ElasticSan in a resource group.
|
|
94
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
95
|
+
* @param options The options parameters.
|
|
96
|
+
*/
|
|
97
|
+
public listByResourceGroup(
|
|
98
|
+
resourceGroupName: string,
|
|
99
|
+
options?: ElasticSansListByResourceGroupOptionalParams
|
|
100
|
+
): PagedAsyncIterableIterator<ElasticSan> {
|
|
101
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
102
|
+
return {
|
|
103
|
+
next() {
|
|
104
|
+
return iter.next();
|
|
105
|
+
},
|
|
106
|
+
[Symbol.asyncIterator]() {
|
|
107
|
+
return this;
|
|
108
|
+
},
|
|
109
|
+
byPage: () => {
|
|
110
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
private async *listByResourceGroupPagingPage(
|
|
116
|
+
resourceGroupName: string,
|
|
117
|
+
options?: ElasticSansListByResourceGroupOptionalParams
|
|
118
|
+
): AsyncIterableIterator<ElasticSan[]> {
|
|
119
|
+
let result = await this._listByResourceGroup(resourceGroupName, options);
|
|
120
|
+
yield result.value || [];
|
|
121
|
+
let continuationToken = result.nextLink;
|
|
122
|
+
while (continuationToken) {
|
|
123
|
+
result = await this._listByResourceGroupNext(
|
|
124
|
+
resourceGroupName,
|
|
125
|
+
continuationToken,
|
|
126
|
+
options
|
|
127
|
+
);
|
|
128
|
+
continuationToken = result.nextLink;
|
|
129
|
+
yield result.value || [];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
private async *listByResourceGroupPagingAll(
|
|
134
|
+
resourceGroupName: string,
|
|
135
|
+
options?: ElasticSansListByResourceGroupOptionalParams
|
|
136
|
+
): AsyncIterableIterator<ElasticSan> {
|
|
137
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
|
138
|
+
resourceGroupName,
|
|
139
|
+
options
|
|
140
|
+
)) {
|
|
141
|
+
yield* page;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Gets a list of ElasticSans in a subscription
|
|
147
|
+
* @param options The options parameters.
|
|
148
|
+
*/
|
|
149
|
+
private _listBySubscription(
|
|
150
|
+
options?: ElasticSansListBySubscriptionOptionalParams
|
|
151
|
+
): Promise<ElasticSansListBySubscriptionResponse> {
|
|
152
|
+
return this.client.sendOperationRequest(
|
|
153
|
+
{ options },
|
|
154
|
+
listBySubscriptionOperationSpec
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Gets a list of ElasticSan in a resource group.
|
|
160
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
161
|
+
* @param options The options parameters.
|
|
162
|
+
*/
|
|
163
|
+
private _listByResourceGroup(
|
|
164
|
+
resourceGroupName: string,
|
|
165
|
+
options?: ElasticSansListByResourceGroupOptionalParams
|
|
166
|
+
): Promise<ElasticSansListByResourceGroupResponse> {
|
|
167
|
+
return this.client.sendOperationRequest(
|
|
168
|
+
{ resourceGroupName, options },
|
|
169
|
+
listByResourceGroupOperationSpec
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Create ElasticSan.
|
|
175
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
176
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
177
|
+
* @param parameters Elastic San object.
|
|
178
|
+
* @param options The options parameters.
|
|
179
|
+
*/
|
|
180
|
+
async beginCreate(
|
|
181
|
+
resourceGroupName: string,
|
|
182
|
+
elasticSanName: string,
|
|
183
|
+
parameters: ElasticSan,
|
|
184
|
+
options?: ElasticSansCreateOptionalParams
|
|
185
|
+
): Promise<
|
|
186
|
+
PollerLike<
|
|
187
|
+
PollOperationState<ElasticSansCreateResponse>,
|
|
188
|
+
ElasticSansCreateResponse
|
|
189
|
+
>
|
|
190
|
+
> {
|
|
191
|
+
const directSendOperation = async (
|
|
192
|
+
args: coreClient.OperationArguments,
|
|
193
|
+
spec: coreClient.OperationSpec
|
|
194
|
+
): Promise<ElasticSansCreateResponse> => {
|
|
195
|
+
return this.client.sendOperationRequest(args, spec);
|
|
196
|
+
};
|
|
197
|
+
const sendOperation = async (
|
|
198
|
+
args: coreClient.OperationArguments,
|
|
199
|
+
spec: coreClient.OperationSpec
|
|
200
|
+
) => {
|
|
201
|
+
let currentRawResponse:
|
|
202
|
+
| coreClient.FullOperationResponse
|
|
203
|
+
| undefined = undefined;
|
|
204
|
+
const providedCallback = args.options?.onResponse;
|
|
205
|
+
const callback: coreClient.RawResponseCallback = (
|
|
206
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
207
|
+
flatResponse: unknown
|
|
208
|
+
) => {
|
|
209
|
+
currentRawResponse = rawResponse;
|
|
210
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
211
|
+
};
|
|
212
|
+
const updatedArgs = {
|
|
213
|
+
...args,
|
|
214
|
+
options: {
|
|
215
|
+
...args.options,
|
|
216
|
+
onResponse: callback
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
220
|
+
return {
|
|
221
|
+
flatResponse,
|
|
222
|
+
rawResponse: {
|
|
223
|
+
statusCode: currentRawResponse!.status,
|
|
224
|
+
body: currentRawResponse!.parsedBody,
|
|
225
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
const lro = new LroImpl(
|
|
231
|
+
sendOperation,
|
|
232
|
+
{ resourceGroupName, elasticSanName, parameters, options },
|
|
233
|
+
createOperationSpec
|
|
234
|
+
);
|
|
235
|
+
const poller = new LroEngine(lro, {
|
|
236
|
+
resumeFrom: options?.resumeFrom,
|
|
237
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
238
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
239
|
+
});
|
|
240
|
+
await poller.poll();
|
|
241
|
+
return poller;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Create ElasticSan.
|
|
246
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
247
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
248
|
+
* @param parameters Elastic San object.
|
|
249
|
+
* @param options The options parameters.
|
|
250
|
+
*/
|
|
251
|
+
async beginCreateAndWait(
|
|
252
|
+
resourceGroupName: string,
|
|
253
|
+
elasticSanName: string,
|
|
254
|
+
parameters: ElasticSan,
|
|
255
|
+
options?: ElasticSansCreateOptionalParams
|
|
256
|
+
): Promise<ElasticSansCreateResponse> {
|
|
257
|
+
const poller = await this.beginCreate(
|
|
258
|
+
resourceGroupName,
|
|
259
|
+
elasticSanName,
|
|
260
|
+
parameters,
|
|
261
|
+
options
|
|
262
|
+
);
|
|
263
|
+
return poller.pollUntilDone();
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Update a Elastic San.
|
|
268
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
269
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
270
|
+
* @param parameters Elastic San object.
|
|
271
|
+
* @param options The options parameters.
|
|
272
|
+
*/
|
|
273
|
+
async beginUpdate(
|
|
274
|
+
resourceGroupName: string,
|
|
275
|
+
elasticSanName: string,
|
|
276
|
+
parameters: ElasticSanUpdate,
|
|
277
|
+
options?: ElasticSansUpdateOptionalParams
|
|
278
|
+
): Promise<
|
|
279
|
+
PollerLike<
|
|
280
|
+
PollOperationState<ElasticSansUpdateResponse>,
|
|
281
|
+
ElasticSansUpdateResponse
|
|
282
|
+
>
|
|
283
|
+
> {
|
|
284
|
+
const directSendOperation = async (
|
|
285
|
+
args: coreClient.OperationArguments,
|
|
286
|
+
spec: coreClient.OperationSpec
|
|
287
|
+
): Promise<ElasticSansUpdateResponse> => {
|
|
288
|
+
return this.client.sendOperationRequest(args, spec);
|
|
289
|
+
};
|
|
290
|
+
const sendOperation = async (
|
|
291
|
+
args: coreClient.OperationArguments,
|
|
292
|
+
spec: coreClient.OperationSpec
|
|
293
|
+
) => {
|
|
294
|
+
let currentRawResponse:
|
|
295
|
+
| coreClient.FullOperationResponse
|
|
296
|
+
| undefined = undefined;
|
|
297
|
+
const providedCallback = args.options?.onResponse;
|
|
298
|
+
const callback: coreClient.RawResponseCallback = (
|
|
299
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
300
|
+
flatResponse: unknown
|
|
301
|
+
) => {
|
|
302
|
+
currentRawResponse = rawResponse;
|
|
303
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
304
|
+
};
|
|
305
|
+
const updatedArgs = {
|
|
306
|
+
...args,
|
|
307
|
+
options: {
|
|
308
|
+
...args.options,
|
|
309
|
+
onResponse: callback
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
313
|
+
return {
|
|
314
|
+
flatResponse,
|
|
315
|
+
rawResponse: {
|
|
316
|
+
statusCode: currentRawResponse!.status,
|
|
317
|
+
body: currentRawResponse!.parsedBody,
|
|
318
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
const lro = new LroImpl(
|
|
324
|
+
sendOperation,
|
|
325
|
+
{ resourceGroupName, elasticSanName, parameters, options },
|
|
326
|
+
updateOperationSpec
|
|
327
|
+
);
|
|
328
|
+
const poller = new LroEngine(lro, {
|
|
329
|
+
resumeFrom: options?.resumeFrom,
|
|
330
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
331
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
332
|
+
});
|
|
333
|
+
await poller.poll();
|
|
334
|
+
return poller;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Update a Elastic San.
|
|
339
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
340
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
341
|
+
* @param parameters Elastic San object.
|
|
342
|
+
* @param options The options parameters.
|
|
343
|
+
*/
|
|
344
|
+
async beginUpdateAndWait(
|
|
345
|
+
resourceGroupName: string,
|
|
346
|
+
elasticSanName: string,
|
|
347
|
+
parameters: ElasticSanUpdate,
|
|
348
|
+
options?: ElasticSansUpdateOptionalParams
|
|
349
|
+
): Promise<ElasticSansUpdateResponse> {
|
|
350
|
+
const poller = await this.beginUpdate(
|
|
351
|
+
resourceGroupName,
|
|
352
|
+
elasticSanName,
|
|
353
|
+
parameters,
|
|
354
|
+
options
|
|
355
|
+
);
|
|
356
|
+
return poller.pollUntilDone();
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Delete a Elastic San.
|
|
361
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
362
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
363
|
+
* @param options The options parameters.
|
|
364
|
+
*/
|
|
365
|
+
async beginDelete(
|
|
366
|
+
resourceGroupName: string,
|
|
367
|
+
elasticSanName: string,
|
|
368
|
+
options?: ElasticSansDeleteOptionalParams
|
|
369
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
370
|
+
const directSendOperation = async (
|
|
371
|
+
args: coreClient.OperationArguments,
|
|
372
|
+
spec: coreClient.OperationSpec
|
|
373
|
+
): Promise<void> => {
|
|
374
|
+
return this.client.sendOperationRequest(args, spec);
|
|
375
|
+
};
|
|
376
|
+
const sendOperation = async (
|
|
377
|
+
args: coreClient.OperationArguments,
|
|
378
|
+
spec: coreClient.OperationSpec
|
|
379
|
+
) => {
|
|
380
|
+
let currentRawResponse:
|
|
381
|
+
| coreClient.FullOperationResponse
|
|
382
|
+
| undefined = undefined;
|
|
383
|
+
const providedCallback = args.options?.onResponse;
|
|
384
|
+
const callback: coreClient.RawResponseCallback = (
|
|
385
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
386
|
+
flatResponse: unknown
|
|
387
|
+
) => {
|
|
388
|
+
currentRawResponse = rawResponse;
|
|
389
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
390
|
+
};
|
|
391
|
+
const updatedArgs = {
|
|
392
|
+
...args,
|
|
393
|
+
options: {
|
|
394
|
+
...args.options,
|
|
395
|
+
onResponse: callback
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
399
|
+
return {
|
|
400
|
+
flatResponse,
|
|
401
|
+
rawResponse: {
|
|
402
|
+
statusCode: currentRawResponse!.status,
|
|
403
|
+
body: currentRawResponse!.parsedBody,
|
|
404
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
const lro = new LroImpl(
|
|
410
|
+
sendOperation,
|
|
411
|
+
{ resourceGroupName, elasticSanName, options },
|
|
412
|
+
deleteOperationSpec
|
|
413
|
+
);
|
|
414
|
+
const poller = new LroEngine(lro, {
|
|
415
|
+
resumeFrom: options?.resumeFrom,
|
|
416
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
417
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
418
|
+
});
|
|
419
|
+
await poller.poll();
|
|
420
|
+
return poller;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Delete a Elastic San.
|
|
425
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
426
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
427
|
+
* @param options The options parameters.
|
|
428
|
+
*/
|
|
429
|
+
async beginDeleteAndWait(
|
|
430
|
+
resourceGroupName: string,
|
|
431
|
+
elasticSanName: string,
|
|
432
|
+
options?: ElasticSansDeleteOptionalParams
|
|
433
|
+
): Promise<void> {
|
|
434
|
+
const poller = await this.beginDelete(
|
|
435
|
+
resourceGroupName,
|
|
436
|
+
elasticSanName,
|
|
437
|
+
options
|
|
438
|
+
);
|
|
439
|
+
return poller.pollUntilDone();
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Get a ElasticSan.
|
|
444
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
445
|
+
* @param elasticSanName The name of the ElasticSan.
|
|
446
|
+
* @param options The options parameters.
|
|
447
|
+
*/
|
|
448
|
+
get(
|
|
449
|
+
resourceGroupName: string,
|
|
450
|
+
elasticSanName: string,
|
|
451
|
+
options?: ElasticSansGetOptionalParams
|
|
452
|
+
): Promise<ElasticSansGetResponse> {
|
|
453
|
+
return this.client.sendOperationRequest(
|
|
454
|
+
{ resourceGroupName, elasticSanName, options },
|
|
455
|
+
getOperationSpec
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* ListBySubscriptionNext
|
|
461
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
|
462
|
+
* @param options The options parameters.
|
|
463
|
+
*/
|
|
464
|
+
private _listBySubscriptionNext(
|
|
465
|
+
nextLink: string,
|
|
466
|
+
options?: ElasticSansListBySubscriptionNextOptionalParams
|
|
467
|
+
): Promise<ElasticSansListBySubscriptionNextResponse> {
|
|
468
|
+
return this.client.sendOperationRequest(
|
|
469
|
+
{ nextLink, options },
|
|
470
|
+
listBySubscriptionNextOperationSpec
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* ListByResourceGroupNext
|
|
476
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
477
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
478
|
+
* @param options The options parameters.
|
|
479
|
+
*/
|
|
480
|
+
private _listByResourceGroupNext(
|
|
481
|
+
resourceGroupName: string,
|
|
482
|
+
nextLink: string,
|
|
483
|
+
options?: ElasticSansListByResourceGroupNextOptionalParams
|
|
484
|
+
): Promise<ElasticSansListByResourceGroupNextResponse> {
|
|
485
|
+
return this.client.sendOperationRequest(
|
|
486
|
+
{ resourceGroupName, nextLink, options },
|
|
487
|
+
listByResourceGroupNextOperationSpec
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
// Operation Specifications
|
|
492
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
493
|
+
|
|
494
|
+
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
495
|
+
path:
|
|
496
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.ElasticSan/elasticSans",
|
|
497
|
+
httpMethod: "GET",
|
|
498
|
+
responses: {
|
|
499
|
+
200: {
|
|
500
|
+
bodyMapper: Mappers.ElasticSanList
|
|
501
|
+
},
|
|
502
|
+
default: {
|
|
503
|
+
bodyMapper: Mappers.ErrorModel
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
queryParameters: [Parameters.apiVersion],
|
|
507
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
508
|
+
headerParameters: [Parameters.accept],
|
|
509
|
+
serializer
|
|
510
|
+
};
|
|
511
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
512
|
+
path:
|
|
513
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans",
|
|
514
|
+
httpMethod: "GET",
|
|
515
|
+
responses: {
|
|
516
|
+
200: {
|
|
517
|
+
bodyMapper: Mappers.ElasticSanList
|
|
518
|
+
},
|
|
519
|
+
default: {
|
|
520
|
+
bodyMapper: Mappers.ErrorModel
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
queryParameters: [Parameters.apiVersion],
|
|
524
|
+
urlParameters: [
|
|
525
|
+
Parameters.$host,
|
|
526
|
+
Parameters.subscriptionId,
|
|
527
|
+
Parameters.resourceGroupName
|
|
528
|
+
],
|
|
529
|
+
headerParameters: [Parameters.accept],
|
|
530
|
+
serializer
|
|
531
|
+
};
|
|
532
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
533
|
+
path:
|
|
534
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}",
|
|
535
|
+
httpMethod: "PUT",
|
|
536
|
+
responses: {
|
|
537
|
+
200: {
|
|
538
|
+
bodyMapper: Mappers.ElasticSan
|
|
539
|
+
},
|
|
540
|
+
201: {
|
|
541
|
+
bodyMapper: Mappers.ElasticSan
|
|
542
|
+
},
|
|
543
|
+
202: {
|
|
544
|
+
bodyMapper: Mappers.ElasticSan
|
|
545
|
+
},
|
|
546
|
+
204: {
|
|
547
|
+
bodyMapper: Mappers.ElasticSan
|
|
548
|
+
},
|
|
549
|
+
default: {
|
|
550
|
+
bodyMapper: Mappers.ErrorModel
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
requestBody: Parameters.parameters,
|
|
554
|
+
queryParameters: [Parameters.apiVersion],
|
|
555
|
+
urlParameters: [
|
|
556
|
+
Parameters.$host,
|
|
557
|
+
Parameters.subscriptionId,
|
|
558
|
+
Parameters.resourceGroupName,
|
|
559
|
+
Parameters.elasticSanName
|
|
560
|
+
],
|
|
561
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
562
|
+
mediaType: "json",
|
|
563
|
+
serializer
|
|
564
|
+
};
|
|
565
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
566
|
+
path:
|
|
567
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}",
|
|
568
|
+
httpMethod: "PATCH",
|
|
569
|
+
responses: {
|
|
570
|
+
200: {
|
|
571
|
+
bodyMapper: Mappers.ElasticSan
|
|
572
|
+
},
|
|
573
|
+
201: {
|
|
574
|
+
bodyMapper: Mappers.ElasticSan
|
|
575
|
+
},
|
|
576
|
+
202: {
|
|
577
|
+
bodyMapper: Mappers.ElasticSan
|
|
578
|
+
},
|
|
579
|
+
204: {
|
|
580
|
+
bodyMapper: Mappers.ElasticSan
|
|
581
|
+
},
|
|
582
|
+
default: {
|
|
583
|
+
bodyMapper: Mappers.ErrorModel
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
requestBody: Parameters.parameters1,
|
|
587
|
+
queryParameters: [Parameters.apiVersion],
|
|
588
|
+
urlParameters: [
|
|
589
|
+
Parameters.$host,
|
|
590
|
+
Parameters.subscriptionId,
|
|
591
|
+
Parameters.resourceGroupName,
|
|
592
|
+
Parameters.elasticSanName
|
|
593
|
+
],
|
|
594
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
595
|
+
mediaType: "json",
|
|
596
|
+
serializer
|
|
597
|
+
};
|
|
598
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
599
|
+
path:
|
|
600
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}",
|
|
601
|
+
httpMethod: "DELETE",
|
|
602
|
+
responses: {
|
|
603
|
+
200: {},
|
|
604
|
+
201: {},
|
|
605
|
+
202: {},
|
|
606
|
+
204: {},
|
|
607
|
+
default: {
|
|
608
|
+
bodyMapper: Mappers.ErrorModel
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
queryParameters: [Parameters.apiVersion],
|
|
612
|
+
urlParameters: [
|
|
613
|
+
Parameters.$host,
|
|
614
|
+
Parameters.subscriptionId,
|
|
615
|
+
Parameters.resourceGroupName,
|
|
616
|
+
Parameters.elasticSanName
|
|
617
|
+
],
|
|
618
|
+
headerParameters: [Parameters.accept],
|
|
619
|
+
serializer
|
|
620
|
+
};
|
|
621
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
622
|
+
path:
|
|
623
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}",
|
|
624
|
+
httpMethod: "GET",
|
|
625
|
+
responses: {
|
|
626
|
+
200: {
|
|
627
|
+
bodyMapper: Mappers.ElasticSan
|
|
628
|
+
},
|
|
629
|
+
default: {
|
|
630
|
+
bodyMapper: Mappers.ErrorModel
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
queryParameters: [Parameters.apiVersion],
|
|
634
|
+
urlParameters: [
|
|
635
|
+
Parameters.$host,
|
|
636
|
+
Parameters.subscriptionId,
|
|
637
|
+
Parameters.resourceGroupName,
|
|
638
|
+
Parameters.elasticSanName
|
|
639
|
+
],
|
|
640
|
+
headerParameters: [Parameters.accept],
|
|
641
|
+
serializer
|
|
642
|
+
};
|
|
643
|
+
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
644
|
+
path: "{nextLink}",
|
|
645
|
+
httpMethod: "GET",
|
|
646
|
+
responses: {
|
|
647
|
+
200: {
|
|
648
|
+
bodyMapper: Mappers.ElasticSanList
|
|
649
|
+
},
|
|
650
|
+
default: {
|
|
651
|
+
bodyMapper: Mappers.ErrorModel
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
queryParameters: [Parameters.apiVersion],
|
|
655
|
+
urlParameters: [
|
|
656
|
+
Parameters.$host,
|
|
657
|
+
Parameters.subscriptionId,
|
|
658
|
+
Parameters.nextLink
|
|
659
|
+
],
|
|
660
|
+
headerParameters: [Parameters.accept],
|
|
661
|
+
serializer
|
|
662
|
+
};
|
|
663
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
664
|
+
path: "{nextLink}",
|
|
665
|
+
httpMethod: "GET",
|
|
666
|
+
responses: {
|
|
667
|
+
200: {
|
|
668
|
+
bodyMapper: Mappers.ElasticSanList
|
|
669
|
+
},
|
|
670
|
+
default: {
|
|
671
|
+
bodyMapper: Mappers.ErrorModel
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
queryParameters: [Parameters.apiVersion],
|
|
675
|
+
urlParameters: [
|
|
676
|
+
Parameters.$host,
|
|
677
|
+
Parameters.subscriptionId,
|
|
678
|
+
Parameters.resourceGroupName,
|
|
679
|
+
Parameters.nextLink
|
|
680
|
+
],
|
|
681
|
+
headerParameters: [Parameters.accept],
|
|
682
|
+
serializer
|
|
683
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export * from "./operations";
|
|
10
|
+
export * from "./skus";
|
|
11
|
+
export * from "./elasticSans";
|
|
12
|
+
export * from "./volumeGroups";
|
|
13
|
+
export * from "./volumes";
|