From 332c63f201667e7153dce909e115b4d18a6ceb04 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 19 Jan 2022 16:54:43 +0000 Subject: [PATCH] CodeGen from PR 17408 in Azure/azure-rest-api-specs Merge c7b4026dfdf034b27aed799e2d799649685658f1 into 0bca06c5e06c6b12ea8e560c7416a5968136e276 --- sdk/appservice/arm-appservice/CHANGELOG.md | 22 ++--- sdk/appservice/arm-appservice/_meta.json | 6 +- .../arm-appservice/api-extractor.json | 25 ++++-- sdk/appservice/arm-appservice/package.json | 4 +- .../review/arm-appservice.api.md | 16 ++++ .../arm-appservice/src/models/index.ts | 14 +++ .../arm-appservice/src/operations/webApps.ts | 87 +++++++++++++++++++ .../src/operationsInterfaces/webApps.ts | 27 ++++++ .../src/webSiteManagementClient.ts | 2 +- .../arm-appservice/test/sampleTest.ts | 48 ++++++++++ sdk/appservice/arm-appservice/tsconfig.json | 16 +++- 11 files changed, 241 insertions(+), 26 deletions(-) create mode 100644 sdk/appservice/arm-appservice/test/sampleTest.ts diff --git a/sdk/appservice/arm-appservice/CHANGELOG.md b/sdk/appservice/arm-appservice/CHANGELOG.md index 2024f9301741..e9ac20cc8078 100644 --- a/sdk/appservice/arm-appservice/CHANGELOG.md +++ b/sdk/appservice/arm-appservice/CHANGELOG.md @@ -1,15 +1,17 @@ # Release History + +## 11.1.0 (2022-01-19) + +**Features** -## 11.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation WebApps.createOneDeployOperation + - Added operation WebApps.getOneDeployStatus + - Added Interface WebAppsCreateOneDeployOperationOptionalParams + - Added Interface WebAppsGetOneDeployStatusOptionalParams + - Added Type Alias WebAppsCreateOneDeployOperationResponse + - Added Type Alias WebAppsGetOneDeployStatusResponse + + ## 11.0.0 (2022-01-10) **Features** diff --git a/sdk/appservice/arm-appservice/_meta.json b/sdk/appservice/arm-appservice/_meta.json index 928a0438e56f..94ede3fd864e 100644 --- a/sdk/appservice/arm-appservice/_meta.json +++ b/sdk/appservice/arm-appservice/_meta.json @@ -1,7 +1,7 @@ { - "commit": "409af02e5ca217c7e7ec2acf50f4976c053496f8", + "commit": "cda04ccf6a3bd15e569e7c0edde9638c350c1cd9", "readme": "specification/web/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/web/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/web/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211217.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/appservice/arm-appservice/api-extractor.json b/sdk/appservice/arm-appservice/api-extractor.json index fc0bdb365c04..8f48a64b5e1f 100644 --- a/sdk/appservice/arm-appservice/api-extractor.json +++ b/sdk/appservice/arm-appservice/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-appservice.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/appservice/arm-appservice/package.json b/sdk/appservice/arm-appservice/package.json index 86b072316a82..30a8ef5f50af 100644 --- a/sdk/appservice/arm-appservice/package.json +++ b/sdk/appservice/arm-appservice/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for WebSiteManagementClient.", - "version": "11.0.1", + "version": "11.1.0", "engines": { "node": ">=12.0.0" }, @@ -99,4 +99,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/appservice/arm-appservice/review/arm-appservice.api.md b/sdk/appservice/arm-appservice/review/arm-appservice.api.md index bb4099c67807..f2199e4b5e71 100644 --- a/sdk/appservice/arm-appservice/review/arm-appservice.api.md +++ b/sdk/appservice/arm-appservice/review/arm-appservice.api.md @@ -7471,6 +7471,7 @@ export interface WebApps { beginSwapSlotWithProductionAndWait(resourceGroupName: string, name: string, slotSwapEntity: CsmSlotEntity, options?: WebAppsSwapSlotWithProductionOptionalParams): Promise; createDeployment(resourceGroupName: string, name: string, id: string, deployment: Deployment, options?: WebAppsCreateDeploymentOptionalParams): Promise; createDeploymentSlot(resourceGroupName: string, name: string, id: string, slot: string, deployment: Deployment, options?: WebAppsCreateDeploymentSlotOptionalParams): Promise; + createOneDeployOperation(resourceGroupName: string, name: string, options?: WebAppsCreateOneDeployOperationOptionalParams): Promise; createOrUpdateConfiguration(resourceGroupName: string, name: string, siteConfig: SiteConfigResource, options?: WebAppsCreateOrUpdateConfigurationOptionalParams): Promise; createOrUpdateConfigurationSlot(resourceGroupName: string, name: string, slot: string, siteConfig: SiteConfigResource, options?: WebAppsCreateOrUpdateConfigurationSlotOptionalParams): Promise; createOrUpdateDomainOwnershipIdentifier(resourceGroupName: string, name: string, domainOwnershipIdentifierName: string, domainOwnershipIdentifier: Identifier, options?: WebAppsCreateOrUpdateDomainOwnershipIdentifierOptionalParams): Promise; @@ -7601,6 +7602,7 @@ export interface WebApps { getNetworkTracesSlot(resourceGroupName: string, name: string, operationId: string, slot: string, options?: WebAppsGetNetworkTracesSlotOptionalParams): Promise; getNetworkTracesSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, options?: WebAppsGetNetworkTracesSlotV2OptionalParams): Promise; getNetworkTracesV2(resourceGroupName: string, name: string, operationId: string, options?: WebAppsGetNetworkTracesV2OptionalParams): Promise; + getOneDeployStatus(resourceGroupName: string, name: string, options?: WebAppsGetOneDeployStatusOptionalParams): Promise; getPremierAddOn(resourceGroupName: string, name: string, premierAddOnName: string, options?: WebAppsGetPremierAddOnOptionalParams): Promise; getPremierAddOnSlot(resourceGroupName: string, name: string, premierAddOnName: string, slot: string, options?: WebAppsGetPremierAddOnSlotOptionalParams): Promise; getPrivateAccess(resourceGroupName: string, name: string, options?: WebAppsGetPrivateAccessOptionalParams): Promise; @@ -7959,6 +7961,13 @@ export interface WebAppsCreateMSDeployOperationSlotOptionalParams extends coreCl // @public export type WebAppsCreateMSDeployOperationSlotResponse = MSDeployStatus; +// @public +export interface WebAppsCreateOneDeployOperationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebAppsCreateOneDeployOperationResponse = Record; + // @public export interface WebAppsCreateOrUpdateConfigurationOptionalParams extends coreClient.OperationOptions { } @@ -8836,6 +8845,13 @@ export interface WebAppsGetNetworkTracesV2OptionalParams extends coreClient.Oper // @public export type WebAppsGetNetworkTracesV2Response = NetworkTrace[]; +// @public +export interface WebAppsGetOneDeployStatusOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebAppsGetOneDeployStatusResponse = Record; + // @public export interface WebAppsGetOptionalParams extends coreClient.OperationOptions { } diff --git a/sdk/appservice/arm-appservice/src/models/index.ts b/sdk/appservice/arm-appservice/src/models/index.ts index b32f79a854c2..763e3bb623d4 100644 --- a/sdk/appservice/arm-appservice/src/models/index.ts +++ b/sdk/appservice/arm-appservice/src/models/index.ts @@ -12044,6 +12044,20 @@ export interface WebAppsGetMSDeployLogOptionalParams /** Contains response data for the getMSDeployLog operation. */ export type WebAppsGetMSDeployLogResponse = MSDeployLog; +/** Optional parameters. */ +export interface WebAppsGetOneDeployStatusOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getOneDeployStatus operation. */ +export type WebAppsGetOneDeployStatusResponse = Record; + +/** Optional parameters. */ +export interface WebAppsCreateOneDeployOperationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOneDeployOperation operation. */ +export type WebAppsCreateOneDeployOperationResponse = Record; + /** Optional parameters. */ export interface WebAppsListFunctionsOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/appservice/arm-appservice/src/operations/webApps.ts b/sdk/appservice/arm-appservice/src/operations/webApps.ts index 9d0ce117cf5d..12a008b1ea72 100644 --- a/sdk/appservice/arm-appservice/src/operations/webApps.ts +++ b/sdk/appservice/arm-appservice/src/operations/webApps.ts @@ -305,6 +305,10 @@ import { WebAppsCreateMSDeployOperationResponse, WebAppsGetMSDeployLogOptionalParams, WebAppsGetMSDeployLogResponse, + WebAppsGetOneDeployStatusOptionalParams, + WebAppsGetOneDeployStatusResponse, + WebAppsCreateOneDeployOperationOptionalParams, + WebAppsCreateOneDeployOperationResponse, WebAppsListFunctionsResponse, WebAppsGetFunctionsAdminTokenOptionalParams, WebAppsGetFunctionsAdminTokenResponse, @@ -7362,6 +7366,41 @@ export class WebAppsImpl implements WebApps { ); } + /** + * Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the + * site + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param options The options parameters. + */ + getOneDeployStatus( + resourceGroupName: string, + name: string, + options?: WebAppsGetOneDeployStatusOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + getOneDeployStatusOperationSpec + ); + } + + /** + * Description for Invoke the OneDeploy publish web app extension. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param options The options parameters. + */ + createOneDeployOperation( + resourceGroupName: string, + name: string, + options?: WebAppsCreateOneDeployOperationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + createOneDeployOperationOperationSpec + ); + } + /** * Description for List the functions for a web site, or a deployment slot. * @param resourceGroupName Name of the resource group to which the resource belongs. @@ -19341,6 +19380,54 @@ const getMSDeployLogOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const getOneDeployStatusOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOneDeployOperationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + headerParameters: [Parameters.accept], + serializer +}; const listFunctionsOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", diff --git a/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts b/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts index c8f1715d7f59..6dd67d3f99d8 100644 --- a/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts +++ b/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts @@ -225,6 +225,10 @@ import { WebAppsCreateMSDeployOperationResponse, WebAppsGetMSDeployLogOptionalParams, WebAppsGetMSDeployLogResponse, + WebAppsGetOneDeployStatusOptionalParams, + WebAppsGetOneDeployStatusResponse, + WebAppsCreateOneDeployOperationOptionalParams, + WebAppsCreateOneDeployOperationResponse, WebAppsGetFunctionsAdminTokenOptionalParams, WebAppsGetFunctionsAdminTokenResponse, WebAppsGetFunctionOptionalParams, @@ -2398,6 +2402,29 @@ export interface WebApps { name: string, options?: WebAppsGetMSDeployLogOptionalParams ): Promise; + /** + * Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the + * site + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param options The options parameters. + */ + getOneDeployStatus( + resourceGroupName: string, + name: string, + options?: WebAppsGetOneDeployStatusOptionalParams + ): Promise; + /** + * Description for Invoke the OneDeploy publish web app extension. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param options The options parameters. + */ + createOneDeployOperation( + resourceGroupName: string, + name: string, + options?: WebAppsCreateOneDeployOperationOptionalParams + ): Promise; /** * Description for Fetch a short lived token that can be exchanged for a master key. * @param resourceGroupName Name of the resource group to which the resource belongs. diff --git a/sdk/appservice/arm-appservice/src/webSiteManagementClient.ts b/sdk/appservice/arm-appservice/src/webSiteManagementClient.ts index ba39a5f606f5..5e4eb8fa4d04 100644 --- a/sdk/appservice/arm-appservice/src/webSiteManagementClient.ts +++ b/sdk/appservice/arm-appservice/src/webSiteManagementClient.ts @@ -149,7 +149,7 @@ export class WebSiteManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-appservice/11.0.0`; + const packageDetails = `azsdk-js-arm-appservice/11.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/appservice/arm-appservice/test/sampleTest.ts b/sdk/appservice/arm-appservice/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/appservice/arm-appservice/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * 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 { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + 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" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/appservice/arm-appservice/tsconfig.json b/sdk/appservice/arm-appservice/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/appservice/arm-appservice/tsconfig.json +++ b/sdk/appservice/arm-appservice/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file