Skip to content

Commit bb59c82

Browse files
authored
storagecache-release (Azure#16664)
1 parent 9980055 commit bb59c82

13 files changed

+371
-28
lines changed

sdk/storagecache/arm-storagecache/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure StorageCacheManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for StorageCacheManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for StorageCacheManagementClient.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -21,7 +21,6 @@ Install both packages using the below command:
2121
```bash
2222
npm install --save @azure/arm-storagecache @azure/identity
2323
```
24-
2524
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
2625
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
2726

@@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3736

3837
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3938
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
40-
4139
#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
4240

4341
##### Sample code
@@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
5351
const client = new StorageCacheManagementClient(creds, subscriptionId);
54-
5552
client.operations.list().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
@@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8683
const credential = new InteractiveBrowserCredential(
8784
{
8885
clientId: "<client id for your Azure AD app>",
89-
tenantId: "<optional tenant for your organization>"
86+
tenant: "<optional tenant for your organization>"
9087
});
9188
const client = new Azure.ArmStoragecache.StorageCacheManagementClient(creds, subscriptionId);
9289
client.operations.list().then((result) => {

sdk/storagecache/arm-storagecache/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@azure/arm-storagecache",
33
"author": "Microsoft Corporation",
44
"description": "StorageCacheManagementClient Library with typescript type definitions for node.js and browser.",
5-
"version": "4.1.0",
5+
"version": "4.2.0",
66
"dependencies": {
77
"@azure/ms-rest-azure-js": "^2.1.0",
88
"@azure/ms-rest-js": "^2.2.0",
@@ -27,7 +27,7 @@
2727
"rollup-plugin-sourcemaps": "^0.4.2",
2828
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagecache/arm-storagecache",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/storagecache/arm-storagecache",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

sdk/storagecache/arm-storagecache/src/models/cachesMappers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export {
1616
CacheEncryptionSettings,
1717
CacheHealth,
1818
CacheIdentity,
19+
CacheIdentityUserAssignedIdentitiesValue,
1920
CacheNetworkSettings,
2021
CacheSecuritySettings,
2122
CacheSku,

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

Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,24 +201,46 @@ export interface AscOperation {
201201
output?: { [propertyName: string]: any };
202202
}
203203

204+
/**
205+
* An interface representing CacheIdentityUserAssignedIdentitiesValue.
206+
*/
207+
export interface CacheIdentityUserAssignedIdentitiesValue {
208+
/**
209+
* The principal ID of the user-assigned identity.
210+
* **NOTE: This property will not be serialized. It can only be populated by the server.**
211+
*/
212+
readonly principalId?: string;
213+
/**
214+
* The client ID of the user-assigned identity.
215+
* **NOTE: This property will not be serialized. It can only be populated by the server.**
216+
*/
217+
readonly clientId?: string;
218+
}
219+
204220
/**
205221
* Cache identity properties.
206222
*/
207223
export interface CacheIdentity {
208224
/**
209-
* The principal id of the cache.
225+
* The principal ID for the system-assigned identity of the cache.
210226
* **NOTE: This property will not be serialized. It can only be populated by the server.**
211227
*/
212228
readonly principalId?: string;
213229
/**
214-
* The tenant id associated with the cache.
230+
* The tenant ID associated with the cache.
215231
* **NOTE: This property will not be serialized. It can only be populated by the server.**
216232
*/
217233
readonly tenantId?: string;
218234
/**
219-
* The type of identity used for the cache. Possible values include: 'SystemAssigned', 'None'
235+
* The type of identity used for the cache. Possible values include: 'SystemAssigned',
236+
* 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'
220237
*/
221238
type?: CacheIdentityType;
239+
/**
240+
* A dictionary where each key is a user assigned identity resource ID, and each key's value is
241+
* an empty dictionary.
242+
*/
243+
userAssignedIdentities?: { [propertyName: string]: CacheIdentityUserAssignedIdentitiesValue };
222244
}
223245

224246
/**
@@ -346,7 +368,8 @@ export interface CacheNetworkSettings {
346368
*/
347369
dnsSearchDomain?: string;
348370
/**
349-
* NTP server IP Address or FQDN for the cache to use. The default is time.windows.com.
371+
* NTP server IP Address or FQDN for the cache to use. The default is time.windows.com. Default
372+
* value: 'time.windows.com'.
350373
*/
351374
ntpServer?: string;
352375
}
@@ -383,6 +406,11 @@ export interface CacheEncryptionSettings {
383406
* Specifies the location of the key encryption key in Key Vault.
384407
*/
385408
keyEncryptionKey?: KeyVaultKeyReference;
409+
/**
410+
* Specifies whether the service will automatically rotate to the newest version of the key in
411+
* the Key Vault.
412+
*/
413+
rotationToLatestKeyVersionEnabled?: boolean;
386414
}
387415

388416
/**
@@ -669,16 +697,18 @@ export interface Cache extends BaseResource {
669697
* https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
670698
* Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting',
671699
* 'Updating'
700+
* **NOTE: This property will not be serialized. It can only be populated by the server.**
672701
*/
673-
provisioningState?: ProvisioningStateType;
702+
readonly provisioningState?: ProvisioningStateType;
674703
/**
675704
* Subnet used for the Cache.
676705
*/
677706
subnet?: string;
678707
/**
679708
* Upgrade status of the Cache.
709+
* **NOTE: This property will not be serialized. It can only be populated by the server.**
680710
*/
681-
upgradeStatus?: CacheUpgradeStatus;
711+
readonly upgradeStatus?: CacheUpgradeStatus;
682712
/**
683713
* Specifies network settings of the cache.
684714
*/
@@ -718,7 +748,7 @@ export interface NamespaceJunction {
718748
*/
719749
nfsExport?: string;
720750
/**
721-
* Name of the access policy applied to this junction.
751+
* Name of the access policy applied to this junction. Default value: 'default'.
722752
*/
723753
nfsAccessPolicy?: string;
724754
}
@@ -819,8 +849,9 @@ export interface StorageTarget extends StorageTargetResource {
819849
* https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
820850
* Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting',
821851
* 'Updating'
852+
* **NOTE: This property will not be serialized. It can only be populated by the server.**
822853
*/
823-
provisioningState?: ProvisioningStateType;
854+
readonly provisioningState?: ProvisioningStateType;
824855
/**
825856
* Properties when targetType is nfs3.
826857
*/
@@ -986,6 +1017,17 @@ export interface CachesBeginCreateOrUpdateOptionalParams extends msRest.RequestO
9861017
cache?: Cache;
9871018
}
9881019

1020+
/**
1021+
* Optional Parameters.
1022+
*/
1023+
export interface StorageTargetsDeleteMethodOptionalParams extends msRest.RequestOptionsBase {
1024+
/**
1025+
* Boolean value requesting the force delete operation for a storage target. Force delete
1026+
* discards unwritten-data in the cache instead of flushing it to back-end storage.
1027+
*/
1028+
force?: string;
1029+
}
1030+
9891031
/**
9901032
* Optional Parameters.
9911033
*/
@@ -996,6 +1038,17 @@ export interface StorageTargetsCreateOrUpdateOptionalParams extends msRest.Reque
9961038
storagetarget?: StorageTarget;
9971039
}
9981040

1041+
/**
1042+
* Optional Parameters.
1043+
*/
1044+
export interface StorageTargetsBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase {
1045+
/**
1046+
* Boolean value requesting the force delete operation for a storage target. Force delete
1047+
* discards unwritten-data in the cache instead of flushing it to back-end storage.
1048+
*/
1049+
force?: string;
1050+
}
1051+
9991052
/**
10001053
* Optional Parameters.
10011054
*/
@@ -1086,11 +1139,12 @@ export type MetricAggregationType = 'NotSpecified' | 'None' | 'Average' | 'Minim
10861139

10871140
/**
10881141
* Defines values for CacheIdentityType.
1089-
* Possible values include: 'SystemAssigned', 'None'
1142+
* Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned',
1143+
* 'None'
10901144
* @readonly
10911145
* @enum {string}
10921146
*/
1093-
export type CacheIdentityType = 'SystemAssigned' | 'None';
1147+
export type CacheIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None';
10941148

10951149
/**
10961150
* Defines values for CreatedByType.

sdk/storagecache/arm-storagecache/src/models/mappers.ts

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,30 @@ export const AscOperation: msRest.CompositeMapper = {
333333
}
334334
};
335335

336+
export const CacheIdentityUserAssignedIdentitiesValue: msRest.CompositeMapper = {
337+
serializedName: "CacheIdentity_userAssignedIdentitiesValue",
338+
type: {
339+
name: "Composite",
340+
className: "CacheIdentityUserAssignedIdentitiesValue",
341+
modelProperties: {
342+
principalId: {
343+
readOnly: true,
344+
serializedName: "principalId",
345+
type: {
346+
name: "String"
347+
}
348+
},
349+
clientId: {
350+
readOnly: true,
351+
serializedName: "clientId",
352+
type: {
353+
name: "String"
354+
}
355+
}
356+
}
357+
}
358+
};
359+
336360
export const CacheIdentity: msRest.CompositeMapper = {
337361
serializedName: "CacheIdentity",
338362
type: {
@@ -359,9 +383,23 @@ export const CacheIdentity: msRest.CompositeMapper = {
359383
name: "Enum",
360384
allowedValues: [
361385
"SystemAssigned",
386+
"UserAssigned",
387+
"SystemAssigned, UserAssigned",
362388
"None"
363389
]
364390
}
391+
},
392+
userAssignedIdentities: {
393+
serializedName: "userAssignedIdentities",
394+
type: {
395+
name: "Dictionary",
396+
value: {
397+
type: {
398+
name: "Composite",
399+
className: "CacheIdentityUserAssignedIdentitiesValue"
400+
}
401+
}
402+
}
365403
}
366404
}
367405
}
@@ -565,6 +603,7 @@ export const CacheNetworkSettings: msRest.CompositeMapper = {
565603
},
566604
ntpServer: {
567605
serializedName: "ntpServer",
606+
defaultValue: 'time.windows.com',
568607
type: {
569608
name: "String"
570609
}
@@ -626,6 +665,12 @@ export const CacheEncryptionSettings: msRest.CompositeMapper = {
626665
name: "Composite",
627666
className: "KeyVaultKeyReference"
628667
}
668+
},
669+
rotationToLatestKeyVersionEnabled: {
670+
serializedName: "rotationToLatestKeyVersionEnabled",
671+
type: {
672+
name: "Boolean"
673+
}
629674
}
630675
}
631676
}
@@ -1061,6 +1106,7 @@ export const Cache: msRest.CompositeMapper = {
10611106
}
10621107
},
10631108
provisioningState: {
1109+
readOnly: true,
10641110
serializedName: "properties.provisioningState",
10651111
type: {
10661112
name: "String"
@@ -1073,6 +1119,7 @@ export const Cache: msRest.CompositeMapper = {
10731119
}
10741120
},
10751121
upgradeStatus: {
1122+
readOnly: true,
10761123
serializedName: "properties.upgradeStatus",
10771124
type: {
10781125
name: "Composite",
@@ -1144,6 +1191,7 @@ export const NamespaceJunction: msRest.CompositeMapper = {
11441191
},
11451192
nfsAccessPolicy: {
11461193
serializedName: "nfsAccessPolicy",
1194+
defaultValue: 'default',
11471195
type: {
11481196
name: "String"
11491197
}
@@ -1161,7 +1209,7 @@ export const Nfs3Target: msRest.CompositeMapper = {
11611209
target: {
11621210
serializedName: "target",
11631211
constraints: {
1164-
Pattern: /^[-.0-9a-zA-Z]+$/
1212+
Pattern: /^[-.,0-9a-zA-Z]+$/
11651213
},
11661214
type: {
11671215
name: "String"
@@ -1309,6 +1357,7 @@ export const StorageTarget: msRest.CompositeMapper = {
13091357
}
13101358
},
13111359
provisioningState: {
1360+
readOnly: true,
13121361
serializedName: "properties.provisioningState",
13131362
type: {
13141363
name: "String"

sdk/storagecache/arm-storagecache/src/models/parameters.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ export const cacheName: msRest.OperationURLParameter = {
4242
}
4343
}
4444
};
45+
export const force: msRest.OperationQueryParameter = {
46+
parameterPath: [
47+
"options",
48+
"force"
49+
],
50+
mapper: {
51+
serializedName: "force",
52+
type: {
53+
name: "String"
54+
}
55+
}
56+
};
4557
export const location: msRest.OperationURLParameter = {
4658
parameterPath: "location",
4759
mapper: {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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 {
10+
CloudError
11+
} from "../models/mappers";

sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export {
1616
CacheEncryptionSettings,
1717
CacheHealth,
1818
CacheIdentity,
19+
CacheIdentityUserAssignedIdentitiesValue,
1920
CacheNetworkSettings,
2021
CacheSecuritySettings,
2122
CacheSku,

sdk/storagecache/arm-storagecache/src/operations/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ export * from "./usageModels";
1313
export * from "./ascOperations";
1414
export * from "./caches";
1515
export * from "./storageTargets";
16+
export * from "./storageTargetOperations";

0 commit comments

Comments
 (0)