From 40095cfcbd13b9bd7d39612333107ad7447437ef Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 8 May 2024 02:46:08 +0000 Subject: [PATCH] CodeGen from PR 28718 in Azure/azure-rest-api-specs Merge c4d294073a212f95088efddd9bcf32d3e451132c into dd1b1d0a58a10c4a34f55231c7035c80dd09b746 --- common/config/rush/pnpm-lock.yaml | 3 +- .../arm-storageactions/CHANGELOG.md | 16 ++----- .../arm-storageactions/README.md | 2 +- .../arm-storageactions/_meta.json | 8 ++-- .../arm-storageactions/package.json | 15 ++----- .../review/arm-storageactions.api.md | 4 +- .../arm-storageactions/src/models/index.ts | 36 ++++++++-------- .../storageTaskAssignmentOperations.ts | 4 +- .../storageTaskAssignmentOperations.ts | 2 +- .../src/storageActionsManagementClient.ts | 2 +- .../arm-storageactions/test/sampleTest.ts | 43 +++++++++++++++++++ .../arm-storageactions/tsconfig.json | 10 +---- 12 files changed, 83 insertions(+), 62 deletions(-) create mode 100644 sdk/storageactions/arm-storageactions/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9670f5475e91..02249aa120cb 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -17483,7 +17483,7 @@ packages: dev: false file:projects/arm-storageactions.tgz: - resolution: {integrity: sha512-52BOt5r0mcgSvrSHGx5/vqQJniOui9kc05Ys/RHLxWgMiiMOUxDR898doXz45EgURSHfuG+/Vyr9moTebro1IQ==, tarball: file:projects/arm-storageactions.tgz} + resolution: {integrity: sha512-Il4TJxaK0nXCxUuzh72qM3wPxX7wHeJhX0nWlpskj2ftImPOssSeuw9xB+5vzv+lpHR6XExieERHUrxmrcv/Qg==, tarball: file:projects/arm-storageactions.tgz} name: '@rush-temp/arm-storageactions' version: 0.0.0 dependencies: @@ -17504,6 +17504,7 @@ packages: rimraf: 5.0.5 ts-node: 10.9.2(@types/node@18.19.32)(typescript@5.4.5) tslib: 2.6.2 + tsx: 4.9.3 typescript: 5.4.5 uglify-js: 3.17.4 transitivePeerDependencies: diff --git a/sdk/storageactions/arm-storageactions/CHANGELOG.md b/sdk/storageactions/arm-storageactions/CHANGELOG.md index ddc31fc4e094..bc677e14b89e 100644 --- a/sdk/storageactions/arm-storageactions/CHANGELOG.md +++ b/sdk/storageactions/arm-storageactions/CHANGELOG.md @@ -1,15 +1,5 @@ # Release History + +## 1.0.0 (2024-05-08) -## 1.0.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.1 (2024-03-07) - -The package of @azure/arm-storageactions is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +The package of @azure/arm-storageactions is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/storageactions/arm-storageactions/README.md b/sdk/storageactions/arm-storageactions/README.md index 4407b2dbb82c..a7ea655e276b 100644 --- a/sdk/storageactions/arm-storageactions/README.md +++ b/sdk/storageactions/arm-storageactions/README.md @@ -6,7 +6,7 @@ The Azure Storage Actions Management API. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storageactions/arm-storageactions) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-storageactions) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-storageactions?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-storageactions) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/storageactions/arm-storageactions/_meta.json b/sdk/storageactions/arm-storageactions/_meta.json index 39d793e5fa4b..74c784b164e1 100644 --- a/sdk/storageactions/arm-storageactions/_meta.json +++ b/sdk/storageactions/arm-storageactions/_meta.json @@ -1,8 +1,8 @@ { - "commit": "84849e5293de3a8e01cbdde13b2d7086d3fb34d6", + "commit": "8cbc671daa5e025927f2d983151cbcfe1f4b6ec0", "readme": "specification/storageactions/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --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\\storageactions\\resource-manager\\readme.md --use=@autorest/typescript@6.0.17 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --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/storageactions/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", - "use": "@autorest/typescript@6.0.17" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.8", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/storageactions/arm-storageactions/package.json b/sdk/storageactions/arm-storageactions/package.json index 188f770dca9b..77dc26c69165 100644 --- a/sdk/storageactions/arm-storageactions/package.json +++ b/sdk/storageactions/arm-storageactions/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for StorageActionsManagementClient.", - "version": "1.0.0-beta.2", + "version": "1.0.0", "engines": { "node": ">=18.0.0" }, @@ -40,6 +40,7 @@ "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", "@types/mocha": "^10.0.0", + "tsx": "^4.7.1", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", @@ -105,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storageactions/arm-storageactions", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storageactions?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storageactions/arm-storageactions" +} \ No newline at end of file diff --git a/sdk/storageactions/arm-storageactions/review/arm-storageactions.api.md b/sdk/storageactions/arm-storageactions/review/arm-storageactions.api.md index 34ac2a15e01f..6996e6650092 100644 --- a/sdk/storageactions/arm-storageactions/review/arm-storageactions.api.md +++ b/sdk/storageactions/arm-storageactions/review/arm-storageactions.api.md @@ -218,8 +218,8 @@ export interface StorageActionsManagementClientOptionalParams extends coreClient // @public export interface StorageTask extends TrackedResource { - identity?: ManagedServiceIdentity; - properties?: StorageTaskProperties; + identity: ManagedServiceIdentity; + properties: StorageTaskProperties; } // @public diff --git a/sdk/storageactions/arm-storageactions/src/models/index.ts b/sdk/storageactions/arm-storageactions/src/models/index.ts index 3df90bd9fbbc..42e89f1f0545 100644 --- a/sdk/storageactions/arm-storageactions/src/models/index.ts +++ b/sdk/storageactions/arm-storageactions/src/models/index.ts @@ -190,7 +190,7 @@ export interface StorageTaskAction { /** The if block of storage task operation */ export interface IfCondition { - /** The condition predicate which is composed of object properties, eg: blob and container properties. */ + /** Condition predicate to evaluate each object. See https://aka.ms/storagetaskconditions for valid properties and operators. */ condition: string; /** List of operations to execute when the condition predicate satisfies. */ operations: StorageTaskOperation[]; @@ -264,7 +264,7 @@ export interface StorageTaskUpdateParameters { properties?: StorageTaskProperties; } -/** The response from the List Storage Tasks operation. */ +/** The response from the List Storage Task operation. */ export interface StorageTasksListResult { /** * Gets the list of storage tasks and their properties. @@ -281,21 +281,21 @@ export interface StorageTasksListResult { /** The response from the List Storage Tasks operation. */ export interface StorageTaskAssignmentsListResult { /** - * Gets the list of storage task assignment Ids. + * List of Storage Task Assignment Resource IDs associated with this Storage Task. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly value?: StorageTaskAssignment[]; /** - * Request URL that can be used to query next page of storage task assignment Ids. Returned when total number of requested storage task assignment Ids exceed maximum page size. + * Request URL that can be used to query next page of Resource IDs. Returned when total number of requested Resource IDs exceed maximum page size. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly nextLink?: string; } -/** Fetch the Storage task assignment ARM ids. */ +/** Storage Task Assignment associated with this Storage Task. */ export interface StorageTaskAssignment { /** - * ARM Id of the storage task assignments, associated with the storage tasks. + * Resource ID of the Storage Task Assignment. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -318,12 +318,12 @@ export interface StorageTaskReportSummary { /** Storage task execution report for a run instance. */ export interface StorageTaskReportProperties { /** - * Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + * Resource ID of the Storage Task Assignment associated with this reported run. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly taskAssignmentId?: string; /** - * Represents the Storage Account Id where the storage task definition was applied and executed. + * Resource ID of the Storage Account where this reported run executed. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly storageAccountId?: string; @@ -373,7 +373,7 @@ export interface StorageTaskReportProperties { */ readonly summaryReportPath?: string; /** - * Storage Task Arm Id. + * Resource ID of the Storage Task applied during this run. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly taskId?: string; @@ -397,17 +397,17 @@ export interface StorageTaskPreviewAction { /** Storage task preview action properties. */ export interface StorageTaskPreviewActionProperties { - /** Preview action container properties to be tested for a match with the provided condition. */ + /** Properties of a sample container to test for a match with the preview action. */ container: StorageTaskPreviewContainerProperties; - /** Preview action container properties to be tested for a match with the provided condition. */ + /** Properties of some sample blobs in the container to test for matches with the preview action. */ blobs: StorageTaskPreviewBlobProperties[]; - /** Preview action container properties to be tested for a match with the provided condition. */ + /** Preview action to test */ action: StorageTaskPreviewActionCondition; } /** Storage task preview container properties */ export interface StorageTaskPreviewContainerProperties { - /** property for the container name. */ + /** Name of test container */ name?: string; /** metadata key value pairs to be tested for a match against the provided condition. */ metadata?: StorageTaskPreviewKeyValueProperties[]; @@ -423,7 +423,7 @@ export interface StorageTaskPreviewKeyValueProperties { /** Storage task preview container properties */ export interface StorageTaskPreviewBlobProperties { - /** property for the container name. */ + /** Name of test blob */ name?: string; /** properties key value pairs to be tested for a match against the provided condition. */ properties?: StorageTaskPreviewKeyValueProperties[]; @@ -466,9 +466,9 @@ export interface ProxyResource extends Resource {} /** Represents Storage Task. */ export interface StorageTask extends TrackedResource { /** The managed service identity of the resource. */ - identity?: ManagedServiceIdentity; + identity: ManagedServiceIdentity; /** Properties of the storage task. */ - properties?: StorageTaskProperties; + properties: StorageTaskProperties; } /** Storage Tasks run report instance */ @@ -771,7 +771,7 @@ export type StorageTasksListByResourceGroupNextResponse = /** Optional parameters. */ export interface StorageTaskAssignmentListOptionalParams extends coreClient.OperationOptions { - /** Optional, specifies the maximum number of storage task assignment Ids to be included in the list response. */ + /** Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. */ maxpagesize?: string; } @@ -790,7 +790,7 @@ export type StorageTaskAssignmentListNextResponse = /** Optional parameters. */ export interface StorageTasksReportListOptionalParams extends coreClient.OperationOptions { - /** Optional, specifies the maximum number of storage task assignment Ids to be included in the list response. */ + /** Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included in the list response. */ maxpagesize?: string; /** Optional. When specified, it can be used to query using reporting properties. */ filter?: string; diff --git a/sdk/storageactions/arm-storageactions/src/operations/storageTaskAssignmentOperations.ts b/sdk/storageactions/arm-storageactions/src/operations/storageTaskAssignmentOperations.ts index 49d0f8b7662d..e76643bfee3a 100644 --- a/sdk/storageactions/arm-storageactions/src/operations/storageTaskAssignmentOperations.ts +++ b/sdk/storageactions/arm-storageactions/src/operations/storageTaskAssignmentOperations.ts @@ -37,7 +37,7 @@ export class StorageTaskAssignmentOperationsImpl } /** - * Lists all the storage tasks available under the given resource group. + * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageTaskName The name of the storage task within the specified resource group. Storage * task names must be between 3 and 18 characters in length and use numbers and lower-case letters @@ -119,7 +119,7 @@ export class StorageTaskAssignmentOperationsImpl } /** - * Lists all the storage tasks available under the given resource group. + * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageTaskName The name of the storage task within the specified resource group. Storage * task names must be between 3 and 18 characters in length and use numbers and lower-case letters diff --git a/sdk/storageactions/arm-storageactions/src/operationsInterfaces/storageTaskAssignmentOperations.ts b/sdk/storageactions/arm-storageactions/src/operationsInterfaces/storageTaskAssignmentOperations.ts index e9f46f565e0e..b4ec262742df 100644 --- a/sdk/storageactions/arm-storageactions/src/operationsInterfaces/storageTaskAssignmentOperations.ts +++ b/sdk/storageactions/arm-storageactions/src/operationsInterfaces/storageTaskAssignmentOperations.ts @@ -16,7 +16,7 @@ import { /** Interface representing a StorageTaskAssignmentOperations. */ export interface StorageTaskAssignmentOperations { /** - * Lists all the storage tasks available under the given resource group. + * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageTaskName The name of the storage task within the specified resource group. Storage * task names must be between 3 and 18 characters in length and use numbers and lower-case letters diff --git a/sdk/storageactions/arm-storageactions/src/storageActionsManagementClient.ts b/sdk/storageactions/arm-storageactions/src/storageActionsManagementClient.ts index 91a2bc368afb..1717302f018d 100644 --- a/sdk/storageactions/arm-storageactions/src/storageActionsManagementClient.ts +++ b/sdk/storageactions/arm-storageactions/src/storageActionsManagementClient.ts @@ -60,7 +60,7 @@ export class StorageActionsManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-storageactions/1.0.0-beta.2`; + const packageDetails = `azsdk-js-arm-storageactions/1.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/storageactions/arm-storageactions/test/sampleTest.ts b/sdk/storageactions/arm-storageactions/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/storageactions/arm-storageactions/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/storageactions/arm-storageactions/tsconfig.json b/sdk/storageactions/arm-storageactions/tsconfig.json index 5806369b3472..3e6ae96443f3 100644 --- a/sdk/storageactions/arm-storageactions/tsconfig.json +++ b/sdk/storageactions/arm-storageactions/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-storageactions": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"