@azure/arm-storagecache 5.0.0 → 5.1.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 +19 -0
- package/README.md +11 -0
- package/dist/index.js +425 -67
- 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/ascOperationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/ascOperationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ascOperationsGetSample.js +31 -0
- package/dist-esm/samples-dev/ascOperationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/ascUsagesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/ascUsagesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ascUsagesListSample.js +44 -0
- package/dist-esm/samples-dev/ascUsagesListSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesCreateOrUpdateSample.js +151 -0
- package/dist-esm/samples-dev/cachesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesDebugInfoSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesDebugInfoSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesDebugInfoSample.js +31 -0
- package/dist-esm/samples-dev/cachesDebugInfoSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesDeleteSample.js +31 -0
- package/dist-esm/samples-dev/cachesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesFlushSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesFlushSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesFlushSample.js +31 -0
- package/dist-esm/samples-dev/cachesFlushSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesGetSample.js +31 -0
- package/dist-esm/samples-dev/cachesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/cachesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesListSample.js +43 -0
- package/dist-esm/samples-dev/cachesListSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesStartSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesStartSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesStartSample.js +31 -0
- package/dist-esm/samples-dev/cachesStartSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesStopSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesStopSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesStopSample.js +31 -0
- package/dist-esm/samples-dev/cachesStopSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesUpdateSample.js +191 -0
- package/dist-esm/samples-dev/cachesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/cachesUpgradeFirmwareSample.d.ts +2 -0
- package/dist-esm/samples-dev/cachesUpgradeFirmwareSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/cachesUpgradeFirmwareSample.js +31 -0
- package/dist-esm/samples-dev/cachesUpgradeFirmwareSample.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 +43 -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 +43 -0
- package/dist-esm/samples-dev/skusListSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetFlushSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetFlushSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetFlushSample.js +32 -0
- package/dist-esm/samples-dev/storageTargetFlushSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetInvalidateSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetInvalidateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetInvalidateSample.js +32 -0
- package/dist-esm/samples-dev/storageTargetInvalidateSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetResumeSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetResumeSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetResumeSample.js +32 -0
- package/dist-esm/samples-dev/storageTargetResumeSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetSuspendSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetSuspendSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetSuspendSample.js +32 -0
- package/dist-esm/samples-dev/storageTargetSuspendSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetsCreateOrUpdateSample.js +103 -0
- package/dist-esm/samples-dev/storageTargetsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetsDeleteSample.js +32 -0
- package/dist-esm/samples-dev/storageTargetsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetsDnsRefreshSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetsDnsRefreshSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetsDnsRefreshSample.js +32 -0
- package/dist-esm/samples-dev/storageTargetsDnsRefreshSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetsGetSample.js +32 -0
- package/dist-esm/samples-dev/storageTargetsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/storageTargetsListByCacheSample.d.ts +2 -0
- package/dist-esm/samples-dev/storageTargetsListByCacheSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/storageTargetsListByCacheSample.js +45 -0
- package/dist-esm/samples-dev/storageTargetsListByCacheSample.js.map +1 -0
- package/dist-esm/samples-dev/usageModelsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/usageModelsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usageModelsListSample.js +43 -0
- package/dist-esm/samples-dev/usageModelsListSample.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +62 -0
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +3 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +101 -0
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.js +1 -1
- package/dist-esm/src/operations/ascUsages.d.ts +35 -0
- package/dist-esm/src/operations/ascUsages.d.ts.map +1 -0
- package/dist-esm/src/operations/ascUsages.js +132 -0
- package/dist-esm/src/operations/ascUsages.js.map +1 -0
- 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/storageTargetOperations.d.ts +21 -1
- package/dist-esm/src/operations/storageTargetOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/storageTargetOperations.js +79 -0
- package/dist-esm/src/operations/storageTargetOperations.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/ascUsages.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/ascUsages.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/ascUsages.js +9 -0
- package/dist-esm/src/operationsInterfaces/ascUsages.js.map +1 -0
- 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/storageTargetOperations.d.ts +21 -1
- package/dist-esm/src/operationsInterfaces/storageTargetOperations.d.ts.map +1 -1
- package/dist-esm/src/storageCacheManagementClient.d.ts +2 -1
- package/dist-esm/src/storageCacheManagementClient.d.ts.map +1 -1
- package/dist-esm/src/storageCacheManagementClient.js +4 -3
- package/dist-esm/src/storageCacheManagementClient.js.map +1 -1
- package/package.json +25 -13
- package/review/arm-storagecache.api.md +50 -0
- package/rollup.config.js +6 -72
- package/src/models/index.ts +71 -0
- package/src/models/mappers.ts +104 -0
- package/src/models/parameters.ts +1 -1
- package/src/operations/ascUsages.ts +158 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/storageTargetOperations.ts +116 -1
- package/src/operationsInterfaces/ascUsages.ts +24 -0
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/storageTargetOperations.ts +32 -1
- package/src/storageCacheManagementClient.ts +6 -2
- package/tsconfig.json +18 -5
- package/types/arm-storagecache.d.ts +101 -0
|
@@ -0,0 +1,158 @@
|
|
|
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 { AscUsages } 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 { StorageCacheManagementClient } from "../storageCacheManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
ResourceUsage,
|
|
17
|
+
AscUsagesListNextOptionalParams,
|
|
18
|
+
AscUsagesListOptionalParams,
|
|
19
|
+
AscUsagesListResponse,
|
|
20
|
+
AscUsagesListNextResponse
|
|
21
|
+
} from "../models";
|
|
22
|
+
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Class containing AscUsages operations. */
|
|
25
|
+
export class AscUsagesImpl implements AscUsages {
|
|
26
|
+
private readonly client: StorageCacheManagementClient;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Initialize a new instance of the class AscUsages class.
|
|
30
|
+
* @param client Reference to the service client
|
|
31
|
+
*/
|
|
32
|
+
constructor(client: StorageCacheManagementClient) {
|
|
33
|
+
this.client = client;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Gets the quantity used and quota limit for resources
|
|
38
|
+
* @param location The name of the region to query for usage information.
|
|
39
|
+
* @param options The options parameters.
|
|
40
|
+
*/
|
|
41
|
+
public list(
|
|
42
|
+
location: string,
|
|
43
|
+
options?: AscUsagesListOptionalParams
|
|
44
|
+
): PagedAsyncIterableIterator<ResourceUsage> {
|
|
45
|
+
const iter = this.listPagingAll(location, options);
|
|
46
|
+
return {
|
|
47
|
+
next() {
|
|
48
|
+
return iter.next();
|
|
49
|
+
},
|
|
50
|
+
[Symbol.asyncIterator]() {
|
|
51
|
+
return this;
|
|
52
|
+
},
|
|
53
|
+
byPage: () => {
|
|
54
|
+
return this.listPagingPage(location, options);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private async *listPagingPage(
|
|
60
|
+
location: string,
|
|
61
|
+
options?: AscUsagesListOptionalParams
|
|
62
|
+
): AsyncIterableIterator<ResourceUsage[]> {
|
|
63
|
+
let result = await this._list(location, options);
|
|
64
|
+
yield result.value || [];
|
|
65
|
+
let continuationToken = result.nextLink;
|
|
66
|
+
while (continuationToken) {
|
|
67
|
+
result = await this._listNext(location, continuationToken, options);
|
|
68
|
+
continuationToken = result.nextLink;
|
|
69
|
+
yield result.value || [];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private async *listPagingAll(
|
|
74
|
+
location: string,
|
|
75
|
+
options?: AscUsagesListOptionalParams
|
|
76
|
+
): AsyncIterableIterator<ResourceUsage> {
|
|
77
|
+
for await (const page of this.listPagingPage(location, options)) {
|
|
78
|
+
yield* page;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Gets the quantity used and quota limit for resources
|
|
84
|
+
* @param location The name of the region to query for usage information.
|
|
85
|
+
* @param options The options parameters.
|
|
86
|
+
*/
|
|
87
|
+
private _list(
|
|
88
|
+
location: string,
|
|
89
|
+
options?: AscUsagesListOptionalParams
|
|
90
|
+
): Promise<AscUsagesListResponse> {
|
|
91
|
+
return this.client.sendOperationRequest(
|
|
92
|
+
{ location, options },
|
|
93
|
+
listOperationSpec
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* ListNext
|
|
99
|
+
* @param location The name of the region to query for usage information.
|
|
100
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
101
|
+
* @param options The options parameters.
|
|
102
|
+
*/
|
|
103
|
+
private _listNext(
|
|
104
|
+
location: string,
|
|
105
|
+
nextLink: string,
|
|
106
|
+
options?: AscUsagesListNextOptionalParams
|
|
107
|
+
): Promise<AscUsagesListNextResponse> {
|
|
108
|
+
return this.client.sendOperationRequest(
|
|
109
|
+
{ location, nextLink, options },
|
|
110
|
+
listNextOperationSpec
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Operation Specifications
|
|
115
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
116
|
+
|
|
117
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
118
|
+
path:
|
|
119
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/usages",
|
|
120
|
+
httpMethod: "GET",
|
|
121
|
+
responses: {
|
|
122
|
+
200: {
|
|
123
|
+
bodyMapper: Mappers.ResourceUsagesListResult
|
|
124
|
+
},
|
|
125
|
+
default: {
|
|
126
|
+
bodyMapper: Mappers.CloudError
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
queryParameters: [Parameters.apiVersion],
|
|
130
|
+
urlParameters: [
|
|
131
|
+
Parameters.$host,
|
|
132
|
+
Parameters.subscriptionId,
|
|
133
|
+
Parameters.location
|
|
134
|
+
],
|
|
135
|
+
headerParameters: [Parameters.accept],
|
|
136
|
+
serializer
|
|
137
|
+
};
|
|
138
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
139
|
+
path: "{nextLink}",
|
|
140
|
+
httpMethod: "GET",
|
|
141
|
+
responses: {
|
|
142
|
+
200: {
|
|
143
|
+
bodyMapper: Mappers.ResourceUsagesListResult
|
|
144
|
+
},
|
|
145
|
+
default: {
|
|
146
|
+
bodyMapper: Mappers.CloudError
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
queryParameters: [Parameters.apiVersion],
|
|
150
|
+
urlParameters: [
|
|
151
|
+
Parameters.$host,
|
|
152
|
+
Parameters.nextLink,
|
|
153
|
+
Parameters.subscriptionId,
|
|
154
|
+
Parameters.location
|
|
155
|
+
],
|
|
156
|
+
headerParameters: [Parameters.accept],
|
|
157
|
+
serializer
|
|
158
|
+
};
|
package/src/operations/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./operations";
|
|
|
10
10
|
export * from "./skus";
|
|
11
11
|
export * from "./usageModels";
|
|
12
12
|
export * from "./ascOperations";
|
|
13
|
+
export * from "./ascUsages";
|
|
13
14
|
export * from "./caches";
|
|
14
15
|
export * from "./storageTargets";
|
|
15
16
|
export * from "./storageTargetOperations";
|
|
@@ -16,7 +16,8 @@ import { LroImpl } from "../lroImpl";
|
|
|
16
16
|
import {
|
|
17
17
|
StorageTargetFlushOptionalParams,
|
|
18
18
|
StorageTargetSuspendOptionalParams,
|
|
19
|
-
StorageTargetResumeOptionalParams
|
|
19
|
+
StorageTargetResumeOptionalParams,
|
|
20
|
+
StorageTargetInvalidateOptionalParams
|
|
20
21
|
} from "../models";
|
|
21
22
|
|
|
22
23
|
/** Class containing StorageTargetOperations operations. */
|
|
@@ -296,6 +297,96 @@ export class StorageTargetOperationsImpl implements StorageTargetOperations {
|
|
|
296
297
|
);
|
|
297
298
|
return poller.pollUntilDone();
|
|
298
299
|
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Invalidate all cached data for a storage target. Cached files are discarded and fetched from the
|
|
303
|
+
* back end on the next request.
|
|
304
|
+
* @param resourceGroupName Target resource group.
|
|
305
|
+
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from
|
|
306
|
+
* the [-0-9a-zA-Z_] char class.
|
|
307
|
+
* @param storageTargetName Name of Storage Target.
|
|
308
|
+
* @param options The options parameters.
|
|
309
|
+
*/
|
|
310
|
+
async beginInvalidate(
|
|
311
|
+
resourceGroupName: string,
|
|
312
|
+
cacheName: string,
|
|
313
|
+
storageTargetName: string,
|
|
314
|
+
options?: StorageTargetInvalidateOptionalParams
|
|
315
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
316
|
+
const directSendOperation = async (
|
|
317
|
+
args: coreClient.OperationArguments,
|
|
318
|
+
spec: coreClient.OperationSpec
|
|
319
|
+
): Promise<void> => {
|
|
320
|
+
return this.client.sendOperationRequest(args, spec);
|
|
321
|
+
};
|
|
322
|
+
const sendOperation = async (
|
|
323
|
+
args: coreClient.OperationArguments,
|
|
324
|
+
spec: coreClient.OperationSpec
|
|
325
|
+
) => {
|
|
326
|
+
let currentRawResponse:
|
|
327
|
+
| coreClient.FullOperationResponse
|
|
328
|
+
| undefined = undefined;
|
|
329
|
+
const providedCallback = args.options?.onResponse;
|
|
330
|
+
const callback: coreClient.RawResponseCallback = (
|
|
331
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
332
|
+
flatResponse: unknown
|
|
333
|
+
) => {
|
|
334
|
+
currentRawResponse = rawResponse;
|
|
335
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
336
|
+
};
|
|
337
|
+
const updatedArgs = {
|
|
338
|
+
...args,
|
|
339
|
+
options: {
|
|
340
|
+
...args.options,
|
|
341
|
+
onResponse: callback
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
345
|
+
return {
|
|
346
|
+
flatResponse,
|
|
347
|
+
rawResponse: {
|
|
348
|
+
statusCode: currentRawResponse!.status,
|
|
349
|
+
body: currentRawResponse!.parsedBody,
|
|
350
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
const lro = new LroImpl(
|
|
356
|
+
sendOperation,
|
|
357
|
+
{ resourceGroupName, cacheName, storageTargetName, options },
|
|
358
|
+
invalidateOperationSpec
|
|
359
|
+
);
|
|
360
|
+
return new LroEngine(lro, {
|
|
361
|
+
resumeFrom: options?.resumeFrom,
|
|
362
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
363
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Invalidate all cached data for a storage target. Cached files are discarded and fetched from the
|
|
369
|
+
* back end on the next request.
|
|
370
|
+
* @param resourceGroupName Target resource group.
|
|
371
|
+
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from
|
|
372
|
+
* the [-0-9a-zA-Z_] char class.
|
|
373
|
+
* @param storageTargetName Name of Storage Target.
|
|
374
|
+
* @param options The options parameters.
|
|
375
|
+
*/
|
|
376
|
+
async beginInvalidateAndWait(
|
|
377
|
+
resourceGroupName: string,
|
|
378
|
+
cacheName: string,
|
|
379
|
+
storageTargetName: string,
|
|
380
|
+
options?: StorageTargetInvalidateOptionalParams
|
|
381
|
+
): Promise<void> {
|
|
382
|
+
const poller = await this.beginInvalidate(
|
|
383
|
+
resourceGroupName,
|
|
384
|
+
cacheName,
|
|
385
|
+
storageTargetName,
|
|
386
|
+
options
|
|
387
|
+
);
|
|
388
|
+
return poller.pollUntilDone();
|
|
389
|
+
}
|
|
299
390
|
}
|
|
300
391
|
// Operation Specifications
|
|
301
392
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -372,3 +463,27 @@ const resumeOperationSpec: coreClient.OperationSpec = {
|
|
|
372
463
|
headerParameters: [Parameters.accept],
|
|
373
464
|
serializer
|
|
374
465
|
};
|
|
466
|
+
const invalidateOperationSpec: coreClient.OperationSpec = {
|
|
467
|
+
path:
|
|
468
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/invalidate",
|
|
469
|
+
httpMethod: "POST",
|
|
470
|
+
responses: {
|
|
471
|
+
200: {},
|
|
472
|
+
201: {},
|
|
473
|
+
202: {},
|
|
474
|
+
204: {},
|
|
475
|
+
default: {
|
|
476
|
+
bodyMapper: Mappers.CloudError
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
queryParameters: [Parameters.apiVersion],
|
|
480
|
+
urlParameters: [
|
|
481
|
+
Parameters.$host,
|
|
482
|
+
Parameters.subscriptionId,
|
|
483
|
+
Parameters.resourceGroupName,
|
|
484
|
+
Parameters.cacheName,
|
|
485
|
+
Parameters.storageTargetName
|
|
486
|
+
],
|
|
487
|
+
headerParameters: [Parameters.accept],
|
|
488
|
+
serializer
|
|
489
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { ResourceUsage, AscUsagesListOptionalParams } from "../models";
|
|
11
|
+
|
|
12
|
+
/// <reference lib="esnext.asynciterable" />
|
|
13
|
+
/** Interface representing a AscUsages. */
|
|
14
|
+
export interface AscUsages {
|
|
15
|
+
/**
|
|
16
|
+
* Gets the quantity used and quota limit for resources
|
|
17
|
+
* @param location The name of the region to query for usage information.
|
|
18
|
+
* @param options The options parameters.
|
|
19
|
+
*/
|
|
20
|
+
list(
|
|
21
|
+
location: string,
|
|
22
|
+
options?: AscUsagesListOptionalParams
|
|
23
|
+
): PagedAsyncIterableIterator<ResourceUsage>;
|
|
24
|
+
}
|
|
@@ -10,6 +10,7 @@ export * from "./operations";
|
|
|
10
10
|
export * from "./skus";
|
|
11
11
|
export * from "./usageModels";
|
|
12
12
|
export * from "./ascOperations";
|
|
13
|
+
export * from "./ascUsages";
|
|
13
14
|
export * from "./caches";
|
|
14
15
|
export * from "./storageTargets";
|
|
15
16
|
export * from "./storageTargetOperations";
|
|
@@ -10,7 +10,8 @@ import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|
|
10
10
|
import {
|
|
11
11
|
StorageTargetFlushOptionalParams,
|
|
12
12
|
StorageTargetSuspendOptionalParams,
|
|
13
|
-
StorageTargetResumeOptionalParams
|
|
13
|
+
StorageTargetResumeOptionalParams,
|
|
14
|
+
StorageTargetInvalidateOptionalParams
|
|
14
15
|
} from "../models";
|
|
15
16
|
|
|
16
17
|
/** Interface representing a StorageTargetOperations. */
|
|
@@ -101,4 +102,34 @@ export interface StorageTargetOperations {
|
|
|
101
102
|
storageTargetName: string,
|
|
102
103
|
options?: StorageTargetResumeOptionalParams
|
|
103
104
|
): Promise<void>;
|
|
105
|
+
/**
|
|
106
|
+
* Invalidate all cached data for a storage target. Cached files are discarded and fetched from the
|
|
107
|
+
* back end on the next request.
|
|
108
|
+
* @param resourceGroupName Target resource group.
|
|
109
|
+
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from
|
|
110
|
+
* the [-0-9a-zA-Z_] char class.
|
|
111
|
+
* @param storageTargetName Name of Storage Target.
|
|
112
|
+
* @param options The options parameters.
|
|
113
|
+
*/
|
|
114
|
+
beginInvalidate(
|
|
115
|
+
resourceGroupName: string,
|
|
116
|
+
cacheName: string,
|
|
117
|
+
storageTargetName: string,
|
|
118
|
+
options?: StorageTargetInvalidateOptionalParams
|
|
119
|
+
): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
120
|
+
/**
|
|
121
|
+
* Invalidate all cached data for a storage target. Cached files are discarded and fetched from the
|
|
122
|
+
* back end on the next request.
|
|
123
|
+
* @param resourceGroupName Target resource group.
|
|
124
|
+
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from
|
|
125
|
+
* the [-0-9a-zA-Z_] char class.
|
|
126
|
+
* @param storageTargetName Name of Storage Target.
|
|
127
|
+
* @param options The options parameters.
|
|
128
|
+
*/
|
|
129
|
+
beginInvalidateAndWait(
|
|
130
|
+
resourceGroupName: string,
|
|
131
|
+
cacheName: string,
|
|
132
|
+
storageTargetName: string,
|
|
133
|
+
options?: StorageTargetInvalidateOptionalParams
|
|
134
|
+
): Promise<void>;
|
|
104
135
|
}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
SkusImpl,
|
|
14
14
|
UsageModelsImpl,
|
|
15
15
|
AscOperationsImpl,
|
|
16
|
+
AscUsagesImpl,
|
|
16
17
|
CachesImpl,
|
|
17
18
|
StorageTargetsImpl,
|
|
18
19
|
StorageTargetOperationsImpl
|
|
@@ -22,6 +23,7 @@ import {
|
|
|
22
23
|
Skus,
|
|
23
24
|
UsageModels,
|
|
24
25
|
AscOperations,
|
|
26
|
+
AscUsages,
|
|
25
27
|
Caches,
|
|
26
28
|
StorageTargets,
|
|
27
29
|
StorageTargetOperations
|
|
@@ -61,7 +63,7 @@ export class StorageCacheManagementClient extends coreClient.ServiceClient {
|
|
|
61
63
|
credential: credentials
|
|
62
64
|
};
|
|
63
65
|
|
|
64
|
-
const packageDetails = `azsdk-js-arm-storagecache/5.
|
|
66
|
+
const packageDetails = `azsdk-js-arm-storagecache/5.1.0`;
|
|
65
67
|
const userAgentPrefix =
|
|
66
68
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
67
69
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
@@ -84,11 +86,12 @@ export class StorageCacheManagementClient extends coreClient.ServiceClient {
|
|
|
84
86
|
|
|
85
87
|
// Assigning values to Constant parameters
|
|
86
88
|
this.$host = options.$host || "https://management.azure.com";
|
|
87
|
-
this.apiVersion = options.apiVersion || "
|
|
89
|
+
this.apiVersion = options.apiVersion || "2022-01-01";
|
|
88
90
|
this.operations = new OperationsImpl(this);
|
|
89
91
|
this.skus = new SkusImpl(this);
|
|
90
92
|
this.usageModels = new UsageModelsImpl(this);
|
|
91
93
|
this.ascOperations = new AscOperationsImpl(this);
|
|
94
|
+
this.ascUsages = new AscUsagesImpl(this);
|
|
92
95
|
this.caches = new CachesImpl(this);
|
|
93
96
|
this.storageTargets = new StorageTargetsImpl(this);
|
|
94
97
|
this.storageTargetOperations = new StorageTargetOperationsImpl(this);
|
|
@@ -98,6 +101,7 @@ export class StorageCacheManagementClient extends coreClient.ServiceClient {
|
|
|
98
101
|
skus: Skus;
|
|
99
102
|
usageModels: UsageModels;
|
|
100
103
|
ascOperations: AscOperations;
|
|
104
|
+
ascUsages: AscUsages;
|
|
101
105
|
caches: Caches;
|
|
102
106
|
storageTargets: StorageTargets;
|
|
103
107
|
storageTargetOperations: StorageTargetOperations;
|
package/tsconfig.json
CHANGED
|
@@ -9,12 +9,25 @@
|
|
|
9
9
|
"esModuleInterop": true,
|
|
10
10
|
"allowSyntheticDefaultImports": true,
|
|
11
11
|
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"lib": [
|
|
12
|
+
"lib": [
|
|
13
|
+
"es6",
|
|
14
|
+
"dom"
|
|
15
|
+
],
|
|
13
16
|
"declaration": true,
|
|
14
17
|
"outDir": "./dist-esm",
|
|
15
18
|
"importHelpers": true,
|
|
16
|
-
"paths": {
|
|
19
|
+
"paths": {
|
|
20
|
+
"@azure/arm-storagecache": [
|
|
21
|
+
"./src/index"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
17
24
|
},
|
|
18
|
-
"include": [
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
"include": [
|
|
26
|
+
"./src/**/*.ts",
|
|
27
|
+
"./test/**/*.ts",
|
|
28
|
+
"samples-dev/**/*.ts"
|
|
29
|
+
],
|
|
30
|
+
"exclude": [
|
|
31
|
+
"node_modules"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -82,6 +82,30 @@ export declare interface AscOperationsGetOptionalParams extends coreClient.Opera
|
|
|
82
82
|
/** Contains response data for the get operation. */
|
|
83
83
|
export declare type AscOperationsGetResponse = AscOperation;
|
|
84
84
|
|
|
85
|
+
/** Interface representing a AscUsages. */
|
|
86
|
+
export declare interface AscUsages {
|
|
87
|
+
/**
|
|
88
|
+
* Gets the quantity used and quota limit for resources
|
|
89
|
+
* @param location The name of the region to query for usage information.
|
|
90
|
+
* @param options The options parameters.
|
|
91
|
+
*/
|
|
92
|
+
list(location: string, options?: AscUsagesListOptionalParams): PagedAsyncIterableIterator<ResourceUsage>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Optional parameters. */
|
|
96
|
+
export declare interface AscUsagesListNextOptionalParams extends coreClient.OperationOptions {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Contains response data for the listNext operation. */
|
|
100
|
+
export declare type AscUsagesListNextResponse = ResourceUsagesListResult;
|
|
101
|
+
|
|
102
|
+
/** Optional parameters. */
|
|
103
|
+
export declare interface AscUsagesListOptionalParams extends coreClient.OperationOptions {
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Contains response data for the list operation. */
|
|
107
|
+
export declare type AscUsagesListResponse = ResourceUsagesListResult;
|
|
108
|
+
|
|
85
109
|
/** Properties pertaining to the BlobNfsTarget. */
|
|
86
110
|
export declare interface BlobNfsTarget {
|
|
87
111
|
/** Resource ID of the storage container. */
|
|
@@ -154,6 +178,8 @@ declare interface Cache_2 {
|
|
|
154
178
|
securitySettings?: CacheSecuritySettings;
|
|
155
179
|
/** Specifies Directory Services settings of the cache. */
|
|
156
180
|
directoryServicesSettings?: CacheDirectorySettings;
|
|
181
|
+
/** Availability zones for resources. This field should only contain a single element in the array. */
|
|
182
|
+
zones?: string[];
|
|
157
183
|
}
|
|
158
184
|
export { Cache_2 as Cache }
|
|
159
185
|
|
|
@@ -1034,6 +1060,52 @@ export declare interface ResourceSkusResult {
|
|
|
1034
1060
|
readonly value?: ResourceSku[];
|
|
1035
1061
|
}
|
|
1036
1062
|
|
|
1063
|
+
/** The usage and limit (quota) for a resource. */
|
|
1064
|
+
export declare interface ResourceUsage {
|
|
1065
|
+
/**
|
|
1066
|
+
* The limit (quota) for this resource.
|
|
1067
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1068
|
+
*/
|
|
1069
|
+
readonly limit?: number;
|
|
1070
|
+
/**
|
|
1071
|
+
* Unit that the limit and usages are expressed in, such as 'Count'.
|
|
1072
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1073
|
+
*/
|
|
1074
|
+
readonly unit?: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* The current usage of this resource.
|
|
1077
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1078
|
+
*/
|
|
1079
|
+
readonly currentValue?: number;
|
|
1080
|
+
/**
|
|
1081
|
+
* Naming information for this resource type.
|
|
1082
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1083
|
+
*/
|
|
1084
|
+
readonly name?: ResourceUsageName;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
/** Naming information for this resource type. */
|
|
1088
|
+
export declare interface ResourceUsageName {
|
|
1089
|
+
/** Canonical name for this resource type. */
|
|
1090
|
+
value?: string;
|
|
1091
|
+
/** Localized name for this resource type. */
|
|
1092
|
+
localizedValue?: string;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
/** Result of the request to list resource usages. It contains a list of resource usages & limits and a URL link to get the next set of results. */
|
|
1096
|
+
export declare interface ResourceUsagesListResult {
|
|
1097
|
+
/**
|
|
1098
|
+
* URL to get the next set of resource usage list results if there are any.
|
|
1099
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1100
|
+
*/
|
|
1101
|
+
readonly nextLink?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* List of usages and limits for resources controlled by the Microsoft.StorageCache resource provider.
|
|
1104
|
+
* NOTE: This property will not be serialized. It can only be populated by the server.
|
|
1105
|
+
*/
|
|
1106
|
+
readonly value?: ResourceUsage[];
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1037
1109
|
/** The restrictions preventing this SKU from being used. */
|
|
1038
1110
|
export declare interface Restriction {
|
|
1039
1111
|
/**
|
|
@@ -1089,6 +1161,7 @@ export declare class StorageCacheManagementClient extends coreClient.ServiceClie
|
|
|
1089
1161
|
skus: Skus;
|
|
1090
1162
|
usageModels: UsageModels;
|
|
1091
1163
|
ascOperations: AscOperations;
|
|
1164
|
+
ascUsages: AscUsages;
|
|
1092
1165
|
caches: Caches;
|
|
1093
1166
|
storageTargets: StorageTargets;
|
|
1094
1167
|
storageTargetOperations: StorageTargetOperations;
|
|
@@ -1135,6 +1208,14 @@ export declare interface StorageTargetFlushOptionalParams extends coreClient.Ope
|
|
|
1135
1208
|
resumeFrom?: string;
|
|
1136
1209
|
}
|
|
1137
1210
|
|
|
1211
|
+
/** Optional parameters. */
|
|
1212
|
+
export declare interface StorageTargetInvalidateOptionalParams extends coreClient.OperationOptions {
|
|
1213
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
1214
|
+
updateIntervalInMs?: number;
|
|
1215
|
+
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
|
|
1216
|
+
resumeFrom?: string;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1138
1219
|
/** Interface representing a StorageTargetOperations. */
|
|
1139
1220
|
export declare interface StorageTargetOperations {
|
|
1140
1221
|
/**
|
|
@@ -1193,6 +1274,26 @@ export declare interface StorageTargetOperations {
|
|
|
1193
1274
|
* @param options The options parameters.
|
|
1194
1275
|
*/
|
|
1195
1276
|
beginResumeAndWait(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetResumeOptionalParams): Promise<void>;
|
|
1277
|
+
/**
|
|
1278
|
+
* Invalidate all cached data for a storage target. Cached files are discarded and fetched from the
|
|
1279
|
+
* back end on the next request.
|
|
1280
|
+
* @param resourceGroupName Target resource group.
|
|
1281
|
+
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from
|
|
1282
|
+
* the [-0-9a-zA-Z_] char class.
|
|
1283
|
+
* @param storageTargetName Name of Storage Target.
|
|
1284
|
+
* @param options The options parameters.
|
|
1285
|
+
*/
|
|
1286
|
+
beginInvalidate(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetInvalidateOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
1287
|
+
/**
|
|
1288
|
+
* Invalidate all cached data for a storage target. Cached files are discarded and fetched from the
|
|
1289
|
+
* back end on the next request.
|
|
1290
|
+
* @param resourceGroupName Target resource group.
|
|
1291
|
+
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from
|
|
1292
|
+
* the [-0-9a-zA-Z_] char class.
|
|
1293
|
+
* @param storageTargetName Name of Storage Target.
|
|
1294
|
+
* @param options The options parameters.
|
|
1295
|
+
*/
|
|
1296
|
+
beginInvalidateAndWait(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: StorageTargetInvalidateOptionalParams): Promise<void>;
|
|
1196
1297
|
}
|
|
1197
1298
|
|
|
1198
1299
|
/** Resource used by a Cache. */
|