diff --git a/sdk/storagecache/arm-storagecache/CHANGELOG.md b/sdk/storagecache/arm-storagecache/CHANGELOG.md index 94c254f9a34d..0e4bda4ee998 100644 --- a/sdk/storagecache/arm-storagecache/CHANGELOG.md +++ b/sdk/storagecache/arm-storagecache/CHANGELOG.md @@ -1,15 +1,20 @@ # Release History + +## 8.0.0 (2023-06-21) + +**Features** -## 7.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Interface UserAssignedIdentitiesValueAutoGenerated -### Other Changes +**Breaking Changes** + - Type of parameter userAssignedIdentities of interface CacheIdentity is changed from { + [propertyName: string]: UserAssignedIdentitiesValue; + } to { + [propertyName: string]: UserAssignedIdentitiesValueAutoGenerated; + } + + ## 7.0.0 (2023-06-09) **Features** diff --git a/sdk/storagecache/arm-storagecache/_meta.json b/sdk/storagecache/arm-storagecache/_meta.json index fecd50a757fd..1b48389cb1ae 100644 --- a/sdk/storagecache/arm-storagecache/_meta.json +++ b/sdk/storagecache/arm-storagecache/_meta.json @@ -1,8 +1,8 @@ { - "commit": "a04dcf17baa7d980c29248fa00c14a7c5b69e67f", + "commit": "c2f2afb78c92fa9dadc29801f7fcf5bac260f8bb", "readme": "specification/storagecache/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\storagecache\\resource-manager\\readme.md --use=@autorest/typescript@6.0.2 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/storagecache/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", - "use": "@autorest/typescript@6.0.2" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/storagecache/arm-storagecache/package.json b/sdk/storagecache/arm-storagecache/package.json index 0c3fe21e2d39..d411e97a3523 100644 --- a/sdk/storagecache/arm-storagecache/package.json +++ b/sdk/storagecache/arm-storagecache/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for StorageCacheManagementClient.", - "version": "7.0.1", + "version": "8.0.0", "engines": { "node": ">=14.0.0" }, @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagecache/arm-storagecache", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storagecache?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagecache/arm-storagecache" +} \ No newline at end of file diff --git a/sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md b/sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md index 4f64ef41d997..847404413905 100644 --- a/sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md +++ b/sdk/storagecache/arm-storagecache/review/arm-storagecache.api.md @@ -407,7 +407,7 @@ export interface CacheIdentity { readonly tenantId?: string; type?: CacheIdentityType; userAssignedIdentities?: { - [propertyName: string]: UserAssignedIdentitiesValue; + [propertyName: string]: UserAssignedIdentitiesValueAutoGenerated; }; } @@ -1448,6 +1448,12 @@ export interface UserAssignedIdentitiesValue { readonly principalId?: string; } +// @public (undocumented) +export interface UserAssignedIdentitiesValueAutoGenerated { + readonly clientId?: string; + readonly principalId?: string; +} + // @public export type UsernameDownloadedType = string; diff --git a/sdk/storagecache/arm-storagecache/src/models/index.ts b/sdk/storagecache/arm-storagecache/src/models/index.ts index 091cc5580788..7cb5cf132054 100644 --- a/sdk/storagecache/arm-storagecache/src/models/index.ts +++ b/sdk/storagecache/arm-storagecache/src/models/index.ts @@ -672,10 +672,23 @@ export interface CacheIdentity { type?: CacheIdentityType; /** A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary. */ userAssignedIdentities?: { - [propertyName: string]: UserAssignedIdentitiesValue; + [propertyName: string]: UserAssignedIdentitiesValueAutoGenerated; }; } +export interface UserAssignedIdentitiesValueAutoGenerated { + /** + * The principal ID of the user-assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the user-assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; +} + /** An indication of cache health. Gives more information about health than just that related to provisioning. */ export interface CacheHealth { /** List of cache health states. Down is when the cluster is not responding. Degraded is when its functioning but has some alerts. Transitioning when it is creating or deleting. Unknown will be returned in old api versions when a new value is added in future versions. WaitingForKey is when the create is waiting for the system assigned identity to be given access to the encryption key in the encryption settings. */ @@ -1744,14 +1757,14 @@ export type CacheIdentityType = /** Optional parameters. */ export interface AmlFilesystemsListOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type AmlFilesystemsListResponse = AmlFilesystemsListResult; /** Optional parameters. */ export interface AmlFilesystemsListByResourceGroupOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ export type AmlFilesystemsListByResourceGroupResponse = AmlFilesystemsListResult; @@ -1767,7 +1780,7 @@ export interface AmlFilesystemsDeleteOptionalParams /** Optional parameters. */ export interface AmlFilesystemsGetOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type AmlFilesystemsGetResponse = AmlFilesystem; @@ -1805,18 +1818,18 @@ export interface AmlFilesystemsArchiveOptionalParams /** Optional parameters. */ export interface AmlFilesystemsCancelArchiveOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Optional parameters. */ export interface AmlFilesystemsListNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type AmlFilesystemsListNextResponse = AmlFilesystemsListResult; /** Optional parameters. */ export interface AmlFilesystemsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type AmlFilesystemsListByResourceGroupNextResponse = AmlFilesystemsListResult; @@ -1840,75 +1853,75 @@ export type GetRequiredAmlFSSubnetsSizeResponse = RequiredAmlFilesystemSubnetsSi /** Optional parameters. */ export interface OperationsListOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type OperationsListResponse = ApiOperationListResult; /** Optional parameters. */ export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = ApiOperationListResult; /** Optional parameters. */ -export interface SkusListOptionalParams extends coreClient.OperationOptions { } +export interface SkusListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type SkusListResponse = ResourceSkusResult; /** Optional parameters. */ export interface SkusListNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type SkusListNextResponse = ResourceSkusResult; /** Optional parameters. */ export interface UsageModelsListOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type UsageModelsListResponse = UsageModelsResult; /** Optional parameters. */ export interface UsageModelsListNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type UsageModelsListNextResponse = UsageModelsResult; /** Optional parameters. */ export interface AscOperationsGetOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type AscOperationsGetResponse = AscOperation; /** Optional parameters. */ export interface AscUsagesListOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type AscUsagesListResponse = ResourceUsagesListResult; /** Optional parameters. */ export interface AscUsagesListNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type AscUsagesListNextResponse = ResourceUsagesListResult; /** Optional parameters. */ -export interface CachesListOptionalParams extends coreClient.OperationOptions { } +export interface CachesListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type CachesListResponse = CachesListResult; /** Optional parameters. */ export interface CachesListByResourceGroupOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ export type CachesListByResourceGroupResponse = CachesListResult; @@ -1923,7 +1936,7 @@ export interface CachesDeleteOptionalParams } /** Optional parameters. */ -export interface CachesGetOptionalParams extends coreClient.OperationOptions { } +export interface CachesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type CachesGetResponse = Cache; @@ -2068,14 +2081,14 @@ export type CachesSpaceAllocationResponse = CachesSpaceAllocationHeaders; /** Optional parameters. */ export interface CachesListNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type CachesListNextResponse = CachesListResult; /** Optional parameters. */ export interface CachesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ export type CachesListByResourceGroupNextResponse = CachesListResult; @@ -2091,7 +2104,7 @@ export interface StorageTargetsDnsRefreshOptionalParams /** Optional parameters. */ export interface StorageTargetsListByCacheOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listByCache operation. */ export type StorageTargetsListByCacheResponse = StorageTargetsResult; @@ -2109,7 +2122,7 @@ export interface StorageTargetsDeleteOptionalParams /** Optional parameters. */ export interface StorageTargetsGetOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ export type StorageTargetsGetResponse = StorageTarget; @@ -2137,7 +2150,7 @@ export interface StorageTargetsRestoreDefaultsOptionalParams /** Optional parameters. */ export interface StorageTargetsListByCacheNextOptionalParams - extends coreClient.OperationOptions { } + extends coreClient.OperationOptions {} /** Contains response data for the listByCacheNext operation. */ export type StorageTargetsListByCacheNextResponse = StorageTargetsResult; diff --git a/sdk/storagecache/arm-storagecache/src/models/mappers.ts b/sdk/storagecache/arm-storagecache/src/models/mappers.ts index c3146b306707..20645a709b7f 100644 --- a/sdk/storagecache/arm-storagecache/src/models/mappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/mappers.ts @@ -1676,7 +1676,7 @@ export const CacheIdentity: coreClient.CompositeMapper = { value: { type: { name: "Composite", - className: "UserAssignedIdentitiesValue" + className: "UserAssignedIdentitiesValueAutoGenerated" } } } @@ -1685,6 +1685,29 @@ export const CacheIdentity: coreClient.CompositeMapper = { } }; +export const UserAssignedIdentitiesValueAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentitiesValueAutoGenerated", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const CacheHealth: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts index 025dde69881b..bddca3462abd 100644 --- a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts +++ b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts @@ -77,7 +77,7 @@ export class StorageCacheManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-storagecache/7.0.1`; + const packageDetails = `azsdk-js-arm-storagecache/8.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/storagecache/arm-storagecache/test/sampleTest.ts b/sdk/storagecache/arm-storagecache/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/storagecache/arm-storagecache/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/storagecache/arm-storagecache/tsconfig.json b/sdk/storagecache/arm-storagecache/tsconfig.json index 1054055624f9..3e6ae96443f3 100644 --- a/sdk/storagecache/arm-storagecache/tsconfig.json +++ b/sdk/storagecache/arm-storagecache/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-storagecache": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"