@azure/arm-netapp 15.1.1 → 16.0.0
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 +57 -0
- package/dist/index.js +3787 -3016
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/accountBackupsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/accountBackupsGetSample.js +1 -1
- package/dist-esm/samples-dev/accountBackupsListSample.js +1 -1
- package/dist-esm/samples-dev/accountsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/accountsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/accountsGetSample.js +1 -1
- package/dist-esm/samples-dev/accountsListBySubscriptionSample.js +1 -1
- package/dist-esm/samples-dev/accountsListSample.js +1 -1
- package/dist-esm/samples-dev/accountsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/backupPoliciesCreateSample.js +1 -1
- package/dist-esm/samples-dev/backupPoliciesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/backupPoliciesGetSample.js +1 -1
- package/dist-esm/samples-dev/backupPoliciesListSample.js +1 -1
- package/dist-esm/samples-dev/backupPoliciesUpdateSample.js +1 -1
- package/dist-esm/samples-dev/backupsCreateSample.js +1 -1
- package/dist-esm/samples-dev/backupsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/backupsGetSample.js +1 -1
- package/dist-esm/samples-dev/backupsGetStatusSample.js +1 -1
- package/dist-esm/samples-dev/backupsGetVolumeRestoreStatusSample.js +1 -1
- package/dist-esm/samples-dev/backupsListSample.js +1 -1
- package/dist-esm/samples-dev/backupsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/netAppResourceCheckFilePathAvailabilitySample.js +1 -1
- package/dist-esm/samples-dev/netAppResourceCheckNameAvailabilitySample.js +1 -1
- package/dist-esm/samples-dev/netAppResourceCheckQuotaAvailabilitySample.js +1 -1
- package/dist-esm/samples-dev/netAppResourceQuotaLimitsGetSample.js +1 -1
- package/dist-esm/samples-dev/netAppResourceQuotaLimitsListSample.js +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +1 -1
- package/dist-esm/samples-dev/poolsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/poolsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/poolsGetSample.js +1 -1
- package/dist-esm/samples-dev/poolsListSample.js +1 -1
- package/dist-esm/samples-dev/poolsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/snapshotPoliciesCreateSample.js +1 -1
- package/dist-esm/samples-dev/snapshotPoliciesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/snapshotPoliciesGetSample.js +1 -1
- package/dist-esm/samples-dev/snapshotPoliciesListSample.js +1 -1
- package/dist-esm/samples-dev/snapshotPoliciesListVolumesSample.js +1 -1
- package/dist-esm/samples-dev/snapshotPoliciesUpdateSample.js +1 -1
- package/dist-esm/samples-dev/snapshotsCreateSample.js +1 -1
- package/dist-esm/samples-dev/snapshotsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/snapshotsGetSample.js +1 -1
- package/dist-esm/samples-dev/snapshotsListSample.js +1 -1
- package/dist-esm/samples-dev/snapshotsRestoreFilesSample.js +1 -1
- package/dist-esm/samples-dev/snapshotsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/subvolumesCreateSample.js +1 -1
- package/dist-esm/samples-dev/subvolumesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/subvolumesGetMetadataSample.js +1 -1
- package/dist-esm/samples-dev/subvolumesGetSample.js +1 -1
- package/dist-esm/samples-dev/subvolumesListByVolumeSample.js +1 -1
- package/dist-esm/samples-dev/subvolumesUpdateSample.js +1 -1
- package/dist-esm/samples-dev/vaultsListSample.js +1 -1
- package/dist-esm/samples-dev/volumeGroupsCreateSample.js +1 -1
- package/dist-esm/samples-dev/volumeGroupsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/volumeGroupsGetSample.js +1 -1
- package/dist-esm/samples-dev/volumeGroupsListByNetAppAccountSample.js +1 -1
- package/dist-esm/samples-dev/volumeQuotaRulesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeQuotaRulesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesCreateSample.js +40 -0
- package/dist-esm/samples-dev/volumeQuotaRulesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeQuotaRulesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesDeleteSample.js +34 -0
- package/dist-esm/samples-dev/volumeQuotaRulesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeQuotaRulesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesGetSample.js +34 -0
- package/dist-esm/samples-dev/volumeQuotaRulesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesListByVolumeSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeQuotaRulesListByVolumeSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesListByVolumeSample.js +47 -0
- package/dist-esm/samples-dev/volumeQuotaRulesListByVolumeSample.js.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumeQuotaRulesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumeQuotaRulesUpdateSample.js +35 -0
- package/dist-esm/samples-dev/volumeQuotaRulesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesAuthorizeReplicationSample.js +1 -1
- package/dist-esm/samples-dev/volumesBreakReplicationSample.js +1 -1
- package/dist-esm/samples-dev/volumesCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/volumesDeleteReplicationSample.js +1 -1
- package/dist-esm/samples-dev/volumesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/volumesFinalizeRelocationSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesFinalizeRelocationSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesFinalizeRelocationSample.js +33 -0
- package/dist-esm/samples-dev/volumesFinalizeRelocationSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesGetSample.js +1 -1
- package/dist-esm/samples-dev/volumesListReplicationsSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesListReplicationsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesListReplicationsSample.js +47 -0
- package/dist-esm/samples-dev/volumesListReplicationsSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesListSample.js +1 -1
- package/dist-esm/samples-dev/volumesPoolChangeSample.js +1 -1
- package/dist-esm/samples-dev/volumesReInitializeReplicationSample.js +1 -1
- package/dist-esm/samples-dev/volumesRelocateSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesRelocateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesRelocateSample.js +33 -0
- package/dist-esm/samples-dev/volumesRelocateSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesReplicationStatusSample.js +1 -1
- package/dist-esm/samples-dev/volumesResetCifsPasswordSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesResetCifsPasswordSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesResetCifsPasswordSample.js +33 -0
- package/dist-esm/samples-dev/volumesResetCifsPasswordSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesResyncReplicationSample.js +1 -1
- package/dist-esm/samples-dev/volumesRevertRelocationSample.d.ts +2 -0
- package/dist-esm/samples-dev/volumesRevertRelocationSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/volumesRevertRelocationSample.js +33 -0
- package/dist-esm/samples-dev/volumesRevertRelocationSample.js.map +1 -0
- package/dist-esm/samples-dev/volumesRevertSample.js +1 -1
- package/dist-esm/samples-dev/volumesUpdateSample.js +1 -1
- package/dist-esm/src/models/index.d.ts +788 -747
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +18 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +13 -6
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +1839 -1923
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +5 -2
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +23 -5
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/netAppManagementClient.d.ts +4 -1
- package/dist-esm/src/netAppManagementClient.d.ts.map +1 -1
- package/dist-esm/src/netAppManagementClient.js +33 -3
- package/dist-esm/src/netAppManagementClient.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +1 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/subvolumes.js +2 -2
- package/dist-esm/src/operations/volumeGroups.js +1 -1
- package/dist-esm/src/operations/volumeQuotaRules.d.ts +109 -0
- package/dist-esm/src/operations/volumeQuotaRules.d.ts.map +1 -0
- package/dist-esm/src/operations/volumeQuotaRules.js +429 -0
- package/dist-esm/src/operations/volumeQuotaRules.js.map +1 -0
- package/dist-esm/src/operations/volumes.d.ts +95 -1
- package/dist-esm/src/operations/volumes.d.ts.map +1 -1
- package/dist-esm/src/operations/volumes.js +360 -0
- package/dist-esm/src/operations/volumes.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +1 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/volumeQuotaRules.d.ts +90 -0
- package/dist-esm/src/operationsInterfaces/volumeQuotaRules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/volumeQuotaRules.js +9 -0
- package/dist-esm/src/operationsInterfaces/volumeQuotaRules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/volumes.d.ts +84 -1
- package/dist-esm/src/operationsInterfaces/volumes.d.ts.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +9 -5
- package/review/arm-netapp.api.md +226 -107
- package/src/models/index.ts +903 -810
- package/src/models/mappers.ts +1977 -1961
- package/src/models/parameters.ts +27 -4
- package/src/netAppManagementClient.ts +40 -2
- package/src/operations/index.ts +1 -0
- package/src/operations/subvolumes.ts +2 -2
- package/src/operations/volumeGroups.ts +1 -1
- package/src/operations/volumeQuotaRules.ts +640 -0
- package/src/operations/volumes.ts +560 -0
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/volumeQuotaRules.ts +179 -0
- package/src/operationsInterfaces/volumes.ts +144 -1
- package/types/arm-netapp.d.ts +404 -163
|
@@ -0,0 +1,640 @@
|
|
|
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 { VolumeQuotaRules } 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 { NetAppManagementClient } from "../netAppManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
VolumeQuotaRule,
|
|
19
|
+
VolumeQuotaRulesListByVolumeOptionalParams,
|
|
20
|
+
VolumeQuotaRulesListByVolumeResponse,
|
|
21
|
+
VolumeQuotaRulesGetOptionalParams,
|
|
22
|
+
VolumeQuotaRulesGetResponse,
|
|
23
|
+
VolumeQuotaRulesCreateOptionalParams,
|
|
24
|
+
VolumeQuotaRulesCreateResponse,
|
|
25
|
+
VolumeQuotaRulePatch,
|
|
26
|
+
VolumeQuotaRulesUpdateOptionalParams,
|
|
27
|
+
VolumeQuotaRulesUpdateResponse,
|
|
28
|
+
VolumeQuotaRulesDeleteOptionalParams
|
|
29
|
+
} from "../models";
|
|
30
|
+
|
|
31
|
+
/// <reference lib="esnext.asynciterable" />
|
|
32
|
+
/** Class containing VolumeQuotaRules operations. */
|
|
33
|
+
export class VolumeQuotaRulesImpl implements VolumeQuotaRules {
|
|
34
|
+
private readonly client: NetAppManagementClient;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Initialize a new instance of the class VolumeQuotaRules class.
|
|
38
|
+
* @param client Reference to the service client
|
|
39
|
+
*/
|
|
40
|
+
constructor(client: NetAppManagementClient) {
|
|
41
|
+
this.client = client;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* List all quota rules associated with the volume
|
|
46
|
+
* @param resourceGroupName The name of the resource group.
|
|
47
|
+
* @param accountName The name of the NetApp account
|
|
48
|
+
* @param poolName The name of the capacity pool
|
|
49
|
+
* @param volumeName The name of the volume
|
|
50
|
+
* @param options The options parameters.
|
|
51
|
+
*/
|
|
52
|
+
public listByVolume(
|
|
53
|
+
resourceGroupName: string,
|
|
54
|
+
accountName: string,
|
|
55
|
+
poolName: string,
|
|
56
|
+
volumeName: string,
|
|
57
|
+
options?: VolumeQuotaRulesListByVolumeOptionalParams
|
|
58
|
+
): PagedAsyncIterableIterator<VolumeQuotaRule> {
|
|
59
|
+
const iter = this.listByVolumePagingAll(
|
|
60
|
+
resourceGroupName,
|
|
61
|
+
accountName,
|
|
62
|
+
poolName,
|
|
63
|
+
volumeName,
|
|
64
|
+
options
|
|
65
|
+
);
|
|
66
|
+
return {
|
|
67
|
+
next() {
|
|
68
|
+
return iter.next();
|
|
69
|
+
},
|
|
70
|
+
[Symbol.asyncIterator]() {
|
|
71
|
+
return this;
|
|
72
|
+
},
|
|
73
|
+
byPage: () => {
|
|
74
|
+
return this.listByVolumePagingPage(
|
|
75
|
+
resourceGroupName,
|
|
76
|
+
accountName,
|
|
77
|
+
poolName,
|
|
78
|
+
volumeName,
|
|
79
|
+
options
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private async *listByVolumePagingPage(
|
|
86
|
+
resourceGroupName: string,
|
|
87
|
+
accountName: string,
|
|
88
|
+
poolName: string,
|
|
89
|
+
volumeName: string,
|
|
90
|
+
options?: VolumeQuotaRulesListByVolumeOptionalParams
|
|
91
|
+
): AsyncIterableIterator<VolumeQuotaRule[]> {
|
|
92
|
+
let result = await this._listByVolume(
|
|
93
|
+
resourceGroupName,
|
|
94
|
+
accountName,
|
|
95
|
+
poolName,
|
|
96
|
+
volumeName,
|
|
97
|
+
options
|
|
98
|
+
);
|
|
99
|
+
yield result.value || [];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
private async *listByVolumePagingAll(
|
|
103
|
+
resourceGroupName: string,
|
|
104
|
+
accountName: string,
|
|
105
|
+
poolName: string,
|
|
106
|
+
volumeName: string,
|
|
107
|
+
options?: VolumeQuotaRulesListByVolumeOptionalParams
|
|
108
|
+
): AsyncIterableIterator<VolumeQuotaRule> {
|
|
109
|
+
for await (const page of this.listByVolumePagingPage(
|
|
110
|
+
resourceGroupName,
|
|
111
|
+
accountName,
|
|
112
|
+
poolName,
|
|
113
|
+
volumeName,
|
|
114
|
+
options
|
|
115
|
+
)) {
|
|
116
|
+
yield* page;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* List all quota rules associated with the volume
|
|
122
|
+
* @param resourceGroupName The name of the resource group.
|
|
123
|
+
* @param accountName The name of the NetApp account
|
|
124
|
+
* @param poolName The name of the capacity pool
|
|
125
|
+
* @param volumeName The name of the volume
|
|
126
|
+
* @param options The options parameters.
|
|
127
|
+
*/
|
|
128
|
+
private _listByVolume(
|
|
129
|
+
resourceGroupName: string,
|
|
130
|
+
accountName: string,
|
|
131
|
+
poolName: string,
|
|
132
|
+
volumeName: string,
|
|
133
|
+
options?: VolumeQuotaRulesListByVolumeOptionalParams
|
|
134
|
+
): Promise<VolumeQuotaRulesListByVolumeResponse> {
|
|
135
|
+
return this.client.sendOperationRequest(
|
|
136
|
+
{ resourceGroupName, accountName, poolName, volumeName, options },
|
|
137
|
+
listByVolumeOperationSpec
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Get details of the specified quota rule
|
|
143
|
+
* @param resourceGroupName The name of the resource group.
|
|
144
|
+
* @param accountName The name of the NetApp account
|
|
145
|
+
* @param poolName The name of the capacity pool
|
|
146
|
+
* @param volumeName The name of the volume
|
|
147
|
+
* @param volumeQuotaRuleName The name of volume quota rule
|
|
148
|
+
* @param options The options parameters.
|
|
149
|
+
*/
|
|
150
|
+
get(
|
|
151
|
+
resourceGroupName: string,
|
|
152
|
+
accountName: string,
|
|
153
|
+
poolName: string,
|
|
154
|
+
volumeName: string,
|
|
155
|
+
volumeQuotaRuleName: string,
|
|
156
|
+
options?: VolumeQuotaRulesGetOptionalParams
|
|
157
|
+
): Promise<VolumeQuotaRulesGetResponse> {
|
|
158
|
+
return this.client.sendOperationRequest(
|
|
159
|
+
{
|
|
160
|
+
resourceGroupName,
|
|
161
|
+
accountName,
|
|
162
|
+
poolName,
|
|
163
|
+
volumeName,
|
|
164
|
+
volumeQuotaRuleName,
|
|
165
|
+
options
|
|
166
|
+
},
|
|
167
|
+
getOperationSpec
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Create the specified quota rule within the given volume
|
|
173
|
+
* @param resourceGroupName The name of the resource group.
|
|
174
|
+
* @param accountName The name of the NetApp account
|
|
175
|
+
* @param poolName The name of the capacity pool
|
|
176
|
+
* @param volumeName The name of the volume
|
|
177
|
+
* @param volumeQuotaRuleName The name of volume quota rule
|
|
178
|
+
* @param body Quota rule object supplied in the body of the operation.
|
|
179
|
+
* @param options The options parameters.
|
|
180
|
+
*/
|
|
181
|
+
async beginCreate(
|
|
182
|
+
resourceGroupName: string,
|
|
183
|
+
accountName: string,
|
|
184
|
+
poolName: string,
|
|
185
|
+
volumeName: string,
|
|
186
|
+
volumeQuotaRuleName: string,
|
|
187
|
+
body: VolumeQuotaRule,
|
|
188
|
+
options?: VolumeQuotaRulesCreateOptionalParams
|
|
189
|
+
): Promise<
|
|
190
|
+
PollerLike<
|
|
191
|
+
PollOperationState<VolumeQuotaRulesCreateResponse>,
|
|
192
|
+
VolumeQuotaRulesCreateResponse
|
|
193
|
+
>
|
|
194
|
+
> {
|
|
195
|
+
const directSendOperation = async (
|
|
196
|
+
args: coreClient.OperationArguments,
|
|
197
|
+
spec: coreClient.OperationSpec
|
|
198
|
+
): Promise<VolumeQuotaRulesCreateResponse> => {
|
|
199
|
+
return this.client.sendOperationRequest(args, spec);
|
|
200
|
+
};
|
|
201
|
+
const sendOperation = async (
|
|
202
|
+
args: coreClient.OperationArguments,
|
|
203
|
+
spec: coreClient.OperationSpec
|
|
204
|
+
) => {
|
|
205
|
+
let currentRawResponse:
|
|
206
|
+
| coreClient.FullOperationResponse
|
|
207
|
+
| undefined = undefined;
|
|
208
|
+
const providedCallback = args.options?.onResponse;
|
|
209
|
+
const callback: coreClient.RawResponseCallback = (
|
|
210
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
211
|
+
flatResponse: unknown
|
|
212
|
+
) => {
|
|
213
|
+
currentRawResponse = rawResponse;
|
|
214
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
215
|
+
};
|
|
216
|
+
const updatedArgs = {
|
|
217
|
+
...args,
|
|
218
|
+
options: {
|
|
219
|
+
...args.options,
|
|
220
|
+
onResponse: callback
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
224
|
+
return {
|
|
225
|
+
flatResponse,
|
|
226
|
+
rawResponse: {
|
|
227
|
+
statusCode: currentRawResponse!.status,
|
|
228
|
+
body: currentRawResponse!.parsedBody,
|
|
229
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const lro = new LroImpl(
|
|
235
|
+
sendOperation,
|
|
236
|
+
{
|
|
237
|
+
resourceGroupName,
|
|
238
|
+
accountName,
|
|
239
|
+
poolName,
|
|
240
|
+
volumeName,
|
|
241
|
+
volumeQuotaRuleName,
|
|
242
|
+
body,
|
|
243
|
+
options
|
|
244
|
+
},
|
|
245
|
+
createOperationSpec
|
|
246
|
+
);
|
|
247
|
+
const poller = new LroEngine(lro, {
|
|
248
|
+
resumeFrom: options?.resumeFrom,
|
|
249
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
250
|
+
lroResourceLocationConfig: "location"
|
|
251
|
+
});
|
|
252
|
+
await poller.poll();
|
|
253
|
+
return poller;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Create the specified quota rule within the given volume
|
|
258
|
+
* @param resourceGroupName The name of the resource group.
|
|
259
|
+
* @param accountName The name of the NetApp account
|
|
260
|
+
* @param poolName The name of the capacity pool
|
|
261
|
+
* @param volumeName The name of the volume
|
|
262
|
+
* @param volumeQuotaRuleName The name of volume quota rule
|
|
263
|
+
* @param body Quota rule object supplied in the body of the operation.
|
|
264
|
+
* @param options The options parameters.
|
|
265
|
+
*/
|
|
266
|
+
async beginCreateAndWait(
|
|
267
|
+
resourceGroupName: string,
|
|
268
|
+
accountName: string,
|
|
269
|
+
poolName: string,
|
|
270
|
+
volumeName: string,
|
|
271
|
+
volumeQuotaRuleName: string,
|
|
272
|
+
body: VolumeQuotaRule,
|
|
273
|
+
options?: VolumeQuotaRulesCreateOptionalParams
|
|
274
|
+
): Promise<VolumeQuotaRulesCreateResponse> {
|
|
275
|
+
const poller = await this.beginCreate(
|
|
276
|
+
resourceGroupName,
|
|
277
|
+
accountName,
|
|
278
|
+
poolName,
|
|
279
|
+
volumeName,
|
|
280
|
+
volumeQuotaRuleName,
|
|
281
|
+
body,
|
|
282
|
+
options
|
|
283
|
+
);
|
|
284
|
+
return poller.pollUntilDone();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Patch a quota rule
|
|
289
|
+
* @param resourceGroupName The name of the resource group.
|
|
290
|
+
* @param accountName The name of the NetApp account
|
|
291
|
+
* @param poolName The name of the capacity pool
|
|
292
|
+
* @param volumeName The name of the volume
|
|
293
|
+
* @param volumeQuotaRuleName The name of volume quota rule
|
|
294
|
+
* @param body Quota rule object supplied in the body of the operation.
|
|
295
|
+
* @param options The options parameters.
|
|
296
|
+
*/
|
|
297
|
+
async beginUpdate(
|
|
298
|
+
resourceGroupName: string,
|
|
299
|
+
accountName: string,
|
|
300
|
+
poolName: string,
|
|
301
|
+
volumeName: string,
|
|
302
|
+
volumeQuotaRuleName: string,
|
|
303
|
+
body: VolumeQuotaRulePatch,
|
|
304
|
+
options?: VolumeQuotaRulesUpdateOptionalParams
|
|
305
|
+
): Promise<
|
|
306
|
+
PollerLike<
|
|
307
|
+
PollOperationState<VolumeQuotaRulesUpdateResponse>,
|
|
308
|
+
VolumeQuotaRulesUpdateResponse
|
|
309
|
+
>
|
|
310
|
+
> {
|
|
311
|
+
const directSendOperation = async (
|
|
312
|
+
args: coreClient.OperationArguments,
|
|
313
|
+
spec: coreClient.OperationSpec
|
|
314
|
+
): Promise<VolumeQuotaRulesUpdateResponse> => {
|
|
315
|
+
return this.client.sendOperationRequest(args, spec);
|
|
316
|
+
};
|
|
317
|
+
const sendOperation = async (
|
|
318
|
+
args: coreClient.OperationArguments,
|
|
319
|
+
spec: coreClient.OperationSpec
|
|
320
|
+
) => {
|
|
321
|
+
let currentRawResponse:
|
|
322
|
+
| coreClient.FullOperationResponse
|
|
323
|
+
| undefined = undefined;
|
|
324
|
+
const providedCallback = args.options?.onResponse;
|
|
325
|
+
const callback: coreClient.RawResponseCallback = (
|
|
326
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
327
|
+
flatResponse: unknown
|
|
328
|
+
) => {
|
|
329
|
+
currentRawResponse = rawResponse;
|
|
330
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
331
|
+
};
|
|
332
|
+
const updatedArgs = {
|
|
333
|
+
...args,
|
|
334
|
+
options: {
|
|
335
|
+
...args.options,
|
|
336
|
+
onResponse: callback
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
340
|
+
return {
|
|
341
|
+
flatResponse,
|
|
342
|
+
rawResponse: {
|
|
343
|
+
statusCode: currentRawResponse!.status,
|
|
344
|
+
body: currentRawResponse!.parsedBody,
|
|
345
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
const lro = new LroImpl(
|
|
351
|
+
sendOperation,
|
|
352
|
+
{
|
|
353
|
+
resourceGroupName,
|
|
354
|
+
accountName,
|
|
355
|
+
poolName,
|
|
356
|
+
volumeName,
|
|
357
|
+
volumeQuotaRuleName,
|
|
358
|
+
body,
|
|
359
|
+
options
|
|
360
|
+
},
|
|
361
|
+
updateOperationSpec
|
|
362
|
+
);
|
|
363
|
+
const poller = new LroEngine(lro, {
|
|
364
|
+
resumeFrom: options?.resumeFrom,
|
|
365
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
366
|
+
lroResourceLocationConfig: "location"
|
|
367
|
+
});
|
|
368
|
+
await poller.poll();
|
|
369
|
+
return poller;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Patch a quota rule
|
|
374
|
+
* @param resourceGroupName The name of the resource group.
|
|
375
|
+
* @param accountName The name of the NetApp account
|
|
376
|
+
* @param poolName The name of the capacity pool
|
|
377
|
+
* @param volumeName The name of the volume
|
|
378
|
+
* @param volumeQuotaRuleName The name of volume quota rule
|
|
379
|
+
* @param body Quota rule object supplied in the body of the operation.
|
|
380
|
+
* @param options The options parameters.
|
|
381
|
+
*/
|
|
382
|
+
async beginUpdateAndWait(
|
|
383
|
+
resourceGroupName: string,
|
|
384
|
+
accountName: string,
|
|
385
|
+
poolName: string,
|
|
386
|
+
volumeName: string,
|
|
387
|
+
volumeQuotaRuleName: string,
|
|
388
|
+
body: VolumeQuotaRulePatch,
|
|
389
|
+
options?: VolumeQuotaRulesUpdateOptionalParams
|
|
390
|
+
): Promise<VolumeQuotaRulesUpdateResponse> {
|
|
391
|
+
const poller = await this.beginUpdate(
|
|
392
|
+
resourceGroupName,
|
|
393
|
+
accountName,
|
|
394
|
+
poolName,
|
|
395
|
+
volumeName,
|
|
396
|
+
volumeQuotaRuleName,
|
|
397
|
+
body,
|
|
398
|
+
options
|
|
399
|
+
);
|
|
400
|
+
return poller.pollUntilDone();
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Delete quota rule
|
|
405
|
+
* @param resourceGroupName The name of the resource group.
|
|
406
|
+
* @param accountName The name of the NetApp account
|
|
407
|
+
* @param poolName The name of the capacity pool
|
|
408
|
+
* @param volumeName The name of the volume
|
|
409
|
+
* @param volumeQuotaRuleName The name of volume quota rule
|
|
410
|
+
* @param options The options parameters.
|
|
411
|
+
*/
|
|
412
|
+
async beginDelete(
|
|
413
|
+
resourceGroupName: string,
|
|
414
|
+
accountName: string,
|
|
415
|
+
poolName: string,
|
|
416
|
+
volumeName: string,
|
|
417
|
+
volumeQuotaRuleName: string,
|
|
418
|
+
options?: VolumeQuotaRulesDeleteOptionalParams
|
|
419
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
420
|
+
const directSendOperation = async (
|
|
421
|
+
args: coreClient.OperationArguments,
|
|
422
|
+
spec: coreClient.OperationSpec
|
|
423
|
+
): Promise<void> => {
|
|
424
|
+
return this.client.sendOperationRequest(args, spec);
|
|
425
|
+
};
|
|
426
|
+
const sendOperation = async (
|
|
427
|
+
args: coreClient.OperationArguments,
|
|
428
|
+
spec: coreClient.OperationSpec
|
|
429
|
+
) => {
|
|
430
|
+
let currentRawResponse:
|
|
431
|
+
| coreClient.FullOperationResponse
|
|
432
|
+
| undefined = undefined;
|
|
433
|
+
const providedCallback = args.options?.onResponse;
|
|
434
|
+
const callback: coreClient.RawResponseCallback = (
|
|
435
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
436
|
+
flatResponse: unknown
|
|
437
|
+
) => {
|
|
438
|
+
currentRawResponse = rawResponse;
|
|
439
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
440
|
+
};
|
|
441
|
+
const updatedArgs = {
|
|
442
|
+
...args,
|
|
443
|
+
options: {
|
|
444
|
+
...args.options,
|
|
445
|
+
onResponse: callback
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
449
|
+
return {
|
|
450
|
+
flatResponse,
|
|
451
|
+
rawResponse: {
|
|
452
|
+
statusCode: currentRawResponse!.status,
|
|
453
|
+
body: currentRawResponse!.parsedBody,
|
|
454
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
const lro = new LroImpl(
|
|
460
|
+
sendOperation,
|
|
461
|
+
{
|
|
462
|
+
resourceGroupName,
|
|
463
|
+
accountName,
|
|
464
|
+
poolName,
|
|
465
|
+
volumeName,
|
|
466
|
+
volumeQuotaRuleName,
|
|
467
|
+
options
|
|
468
|
+
},
|
|
469
|
+
deleteOperationSpec
|
|
470
|
+
);
|
|
471
|
+
const poller = new LroEngine(lro, {
|
|
472
|
+
resumeFrom: options?.resumeFrom,
|
|
473
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
474
|
+
lroResourceLocationConfig: "location"
|
|
475
|
+
});
|
|
476
|
+
await poller.poll();
|
|
477
|
+
return poller;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Delete quota rule
|
|
482
|
+
* @param resourceGroupName The name of the resource group.
|
|
483
|
+
* @param accountName The name of the NetApp account
|
|
484
|
+
* @param poolName The name of the capacity pool
|
|
485
|
+
* @param volumeName The name of the volume
|
|
486
|
+
* @param volumeQuotaRuleName The name of volume quota rule
|
|
487
|
+
* @param options The options parameters.
|
|
488
|
+
*/
|
|
489
|
+
async beginDeleteAndWait(
|
|
490
|
+
resourceGroupName: string,
|
|
491
|
+
accountName: string,
|
|
492
|
+
poolName: string,
|
|
493
|
+
volumeName: string,
|
|
494
|
+
volumeQuotaRuleName: string,
|
|
495
|
+
options?: VolumeQuotaRulesDeleteOptionalParams
|
|
496
|
+
): Promise<void> {
|
|
497
|
+
const poller = await this.beginDelete(
|
|
498
|
+
resourceGroupName,
|
|
499
|
+
accountName,
|
|
500
|
+
poolName,
|
|
501
|
+
volumeName,
|
|
502
|
+
volumeQuotaRuleName,
|
|
503
|
+
options
|
|
504
|
+
);
|
|
505
|
+
return poller.pollUntilDone();
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
// Operation Specifications
|
|
509
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
510
|
+
|
|
511
|
+
const listByVolumeOperationSpec: coreClient.OperationSpec = {
|
|
512
|
+
path:
|
|
513
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules",
|
|
514
|
+
httpMethod: "GET",
|
|
515
|
+
responses: {
|
|
516
|
+
200: {
|
|
517
|
+
bodyMapper: Mappers.VolumeQuotaRulesList
|
|
518
|
+
},
|
|
519
|
+
default: {}
|
|
520
|
+
},
|
|
521
|
+
queryParameters: [Parameters.apiVersion],
|
|
522
|
+
urlParameters: [
|
|
523
|
+
Parameters.$host,
|
|
524
|
+
Parameters.subscriptionId,
|
|
525
|
+
Parameters.resourceGroupName,
|
|
526
|
+
Parameters.accountName,
|
|
527
|
+
Parameters.poolName,
|
|
528
|
+
Parameters.volumeName
|
|
529
|
+
],
|
|
530
|
+
headerParameters: [Parameters.accept],
|
|
531
|
+
serializer
|
|
532
|
+
};
|
|
533
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
534
|
+
path:
|
|
535
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}",
|
|
536
|
+
httpMethod: "GET",
|
|
537
|
+
responses: {
|
|
538
|
+
200: {
|
|
539
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
540
|
+
},
|
|
541
|
+
default: {}
|
|
542
|
+
},
|
|
543
|
+
queryParameters: [Parameters.apiVersion],
|
|
544
|
+
urlParameters: [
|
|
545
|
+
Parameters.$host,
|
|
546
|
+
Parameters.subscriptionId,
|
|
547
|
+
Parameters.resourceGroupName,
|
|
548
|
+
Parameters.accountName,
|
|
549
|
+
Parameters.poolName,
|
|
550
|
+
Parameters.volumeName,
|
|
551
|
+
Parameters.volumeQuotaRuleName
|
|
552
|
+
],
|
|
553
|
+
headerParameters: [Parameters.accept],
|
|
554
|
+
serializer
|
|
555
|
+
};
|
|
556
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
557
|
+
path:
|
|
558
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}",
|
|
559
|
+
httpMethod: "PUT",
|
|
560
|
+
responses: {
|
|
561
|
+
200: {
|
|
562
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
563
|
+
},
|
|
564
|
+
201: {
|
|
565
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
566
|
+
},
|
|
567
|
+
202: {
|
|
568
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
569
|
+
},
|
|
570
|
+
204: {
|
|
571
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
572
|
+
},
|
|
573
|
+
default: {}
|
|
574
|
+
},
|
|
575
|
+
requestBody: Parameters.body22,
|
|
576
|
+
queryParameters: [Parameters.apiVersion],
|
|
577
|
+
urlParameters: [
|
|
578
|
+
Parameters.$host,
|
|
579
|
+
Parameters.subscriptionId,
|
|
580
|
+
Parameters.resourceGroupName,
|
|
581
|
+
Parameters.accountName,
|
|
582
|
+
Parameters.poolName,
|
|
583
|
+
Parameters.volumeName,
|
|
584
|
+
Parameters.volumeQuotaRuleName
|
|
585
|
+
],
|
|
586
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
587
|
+
mediaType: "json",
|
|
588
|
+
serializer
|
|
589
|
+
};
|
|
590
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
591
|
+
path:
|
|
592
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}",
|
|
593
|
+
httpMethod: "PATCH",
|
|
594
|
+
responses: {
|
|
595
|
+
200: {
|
|
596
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
597
|
+
},
|
|
598
|
+
201: {
|
|
599
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
600
|
+
},
|
|
601
|
+
202: {
|
|
602
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
603
|
+
},
|
|
604
|
+
204: {
|
|
605
|
+
bodyMapper: Mappers.VolumeQuotaRule
|
|
606
|
+
},
|
|
607
|
+
default: {}
|
|
608
|
+
},
|
|
609
|
+
requestBody: Parameters.body23,
|
|
610
|
+
queryParameters: [Parameters.apiVersion],
|
|
611
|
+
urlParameters: [
|
|
612
|
+
Parameters.$host,
|
|
613
|
+
Parameters.subscriptionId,
|
|
614
|
+
Parameters.resourceGroupName,
|
|
615
|
+
Parameters.accountName,
|
|
616
|
+
Parameters.poolName,
|
|
617
|
+
Parameters.volumeName,
|
|
618
|
+
Parameters.volumeQuotaRuleName
|
|
619
|
+
],
|
|
620
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
621
|
+
mediaType: "json",
|
|
622
|
+
serializer
|
|
623
|
+
};
|
|
624
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
625
|
+
path:
|
|
626
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}",
|
|
627
|
+
httpMethod: "DELETE",
|
|
628
|
+
responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
|
|
629
|
+
queryParameters: [Parameters.apiVersion],
|
|
630
|
+
urlParameters: [
|
|
631
|
+
Parameters.$host,
|
|
632
|
+
Parameters.subscriptionId,
|
|
633
|
+
Parameters.resourceGroupName,
|
|
634
|
+
Parameters.accountName,
|
|
635
|
+
Parameters.poolName,
|
|
636
|
+
Parameters.volumeName,
|
|
637
|
+
Parameters.volumeQuotaRuleName
|
|
638
|
+
],
|
|
639
|
+
serializer
|
|
640
|
+
};
|