From 5fc2dd314af353624102eec830384c969e51c3a3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 14 Jan 2022 03:17:47 +0000 Subject: [PATCH] CodeGen from PR 17353 in Azure/azure-rest-api-specs Merge 34e89ba30cdd52b5a83904af8e832e1e35d9aab0 into 7a8d743f49ae5f91cf8bb6452422974d72533b01 --- sdk/appservice/arm-appservice/CHANGELOG.md | 9 ++++ sdk/appservice/arm-appservice/_meta.json | 6 +-- sdk/appservice/arm-appservice/package.json | 2 +- .../review/arm-appservice.api.md | 8 ++++ .../arm-appservice/src/models/index.ts | 7 +++ .../arm-appservice/src/operations/webApps.ts | 45 +++++++++++++++++ .../src/operationsInterfaces/webApps.ts | 16 +++++++ .../src/webSiteManagementClient.ts | 2 +- .../arm-appservice/test/sampleTest.ts | 48 +++++++++++++++++++ 9 files changed, 138 insertions(+), 5 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 086de9394bda..056d3d5bc818 100644 --- a/sdk/appservice/arm-appservice/CHANGELOG.md +++ b/sdk/appservice/arm-appservice/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +## 11.1.0 (2022-01-14) + +**Features** + + - Added operation WebApps.getAuthSettingsV2WithoutSecretsSlot + - Added Interface WebAppsGetAuthSettingsV2WithoutSecretsSlotOptionalParams + - Added Type Alias WebAppsGetAuthSettingsV2WithoutSecretsSlotResponse + + ## 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..fffe6dbc9459 100644 --- a/sdk/appservice/arm-appservice/_meta.json +++ b/sdk/appservice/arm-appservice/_meta.json @@ -1,7 +1,7 @@ { - "commit": "409af02e5ca217c7e7ec2acf50f4976c053496f8", + "commit": "27c8e3882a880dddc08bcec4e5fb8a1ccd4cc24b", "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/package.json b/sdk/appservice/arm-appservice/package.json index dacf6ca639ad..26af1ae8c7e4 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.0", + "version": "11.1.0", "engines": { "node": ">=12.0.0" }, "dependencies": { "@azure/core-lro": "^2.2.0", diff --git a/sdk/appservice/arm-appservice/review/arm-appservice.api.md b/sdk/appservice/arm-appservice/review/arm-appservice.api.md index bb4099c67807..b035a7e2d2b6 100644 --- a/sdk/appservice/arm-appservice/review/arm-appservice.api.md +++ b/sdk/appservice/arm-appservice/review/arm-appservice.api.md @@ -7547,6 +7547,7 @@ export interface WebApps { getAuthSettingsV2(resourceGroupName: string, name: string, options?: WebAppsGetAuthSettingsV2OptionalParams): Promise; getAuthSettingsV2Slot(resourceGroupName: string, name: string, slot: string, options?: WebAppsGetAuthSettingsV2SlotOptionalParams): Promise; getAuthSettingsV2WithoutSecrets(resourceGroupName: string, name: string, options?: WebAppsGetAuthSettingsV2WithoutSecretsOptionalParams): Promise; + getAuthSettingsV2WithoutSecretsSlot(resourceGroupName: string, name: string, slot: string, options?: WebAppsGetAuthSettingsV2WithoutSecretsSlotOptionalParams): Promise; getBackupConfiguration(resourceGroupName: string, name: string, options?: WebAppsGetBackupConfigurationOptionalParams): Promise; getBackupConfigurationSlot(resourceGroupName: string, name: string, slot: string, options?: WebAppsGetBackupConfigurationSlotOptionalParams): Promise; getBackupStatus(resourceGroupName: string, name: string, backupId: string, options?: WebAppsGetBackupStatusOptionalParams): Promise; @@ -8442,6 +8443,13 @@ export interface WebAppsGetAuthSettingsV2WithoutSecretsOptionalParams extends co // @public export type WebAppsGetAuthSettingsV2WithoutSecretsResponse = SiteAuthSettingsV2; +// @public +export interface WebAppsGetAuthSettingsV2WithoutSecretsSlotOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebAppsGetAuthSettingsV2WithoutSecretsSlotResponse = SiteAuthSettingsV2; + // @public export interface WebAppsGetBackupConfigurationOptionalParams 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..0d92618f0f96 100644 --- a/sdk/appservice/arm-appservice/src/models/index.ts +++ b/sdk/appservice/arm-appservice/src/models/index.ts @@ -12936,6 +12936,13 @@ export interface WebAppsGetAuthSettingsSlotOptionalParams /** Contains response data for the getAuthSettingsSlot operation. */ export type WebAppsGetAuthSettingsSlotResponse = SiteAuthSettings; +/** Optional parameters. */ +export interface WebAppsGetAuthSettingsV2WithoutSecretsSlotOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getAuthSettingsV2WithoutSecretsSlot operation. */ +export type WebAppsGetAuthSettingsV2WithoutSecretsSlotResponse = SiteAuthSettingsV2; + /** Optional parameters. */ export interface WebAppsUpdateAuthSettingsV2SlotOptionalParams 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..5998a300731a 100644 --- a/sdk/appservice/arm-appservice/src/operations/webApps.ts +++ b/sdk/appservice/arm-appservice/src/operations/webApps.ts @@ -509,6 +509,8 @@ import { WebAppsUpdateAuthSettingsSlotResponse, WebAppsGetAuthSettingsSlotOptionalParams, WebAppsGetAuthSettingsSlotResponse, + WebAppsGetAuthSettingsV2WithoutSecretsSlotOptionalParams, + WebAppsGetAuthSettingsV2WithoutSecretsSlotResponse, WebAppsUpdateAuthSettingsV2SlotOptionalParams, WebAppsUpdateAuthSettingsV2SlotResponse, WebAppsGetAuthSettingsV2SlotOptionalParams, @@ -10635,6 +10637,26 @@ export class WebAppsImpl implements WebApps { ); } + /** + * Gets site's Authentication / Authorization settings for apps via the V2 format + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings + * for the production slot. + * @param options The options parameters. + */ + getAuthSettingsV2WithoutSecretsSlot( + resourceGroupName: string, + name: string, + slot: string, + options?: WebAppsGetAuthSettingsV2WithoutSecretsSlotOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, slot, options }, + getAuthSettingsV2WithoutSecretsSlotOperationSpec + ); + } + /** * Description for Updates site's Authentication / Authorization settings for apps via the V2 format * @param resourceGroupName Name of the resource group to which the resource belongs. @@ -22311,6 +22333,29 @@ const getAuthSettingsSlotOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const getAuthSettingsV2WithoutSecretsSlotOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SiteAuthSettingsV2 + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.slot + ], + headerParameters: [Parameters.accept], + serializer +}; const updateAuthSettingsV2SlotOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2", diff --git a/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts b/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts index c8f1715d7f59..1c54cd7a1709 100644 --- a/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts +++ b/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts @@ -411,6 +411,8 @@ import { WebAppsUpdateAuthSettingsSlotResponse, WebAppsGetAuthSettingsSlotOptionalParams, WebAppsGetAuthSettingsSlotResponse, + WebAppsGetAuthSettingsV2WithoutSecretsSlotOptionalParams, + WebAppsGetAuthSettingsV2WithoutSecretsSlotResponse, WebAppsUpdateAuthSettingsV2SlotOptionalParams, WebAppsUpdateAuthSettingsV2SlotResponse, WebAppsGetAuthSettingsV2SlotOptionalParams, @@ -4006,6 +4008,20 @@ export interface WebApps { slot: string, options?: WebAppsGetAuthSettingsSlotOptionalParams ): Promise; + /** + * Gets site's Authentication / Authorization settings for apps via the V2 format + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings + * for the production slot. + * @param options The options parameters. + */ + getAuthSettingsV2WithoutSecretsSlot( + resourceGroupName: string, + name: string, + slot: string, + options?: WebAppsGetAuthSettingsV2WithoutSecretsSlotOptionalParams + ): Promise; /** * Description for Updates site's Authentication / Authorization settings for apps via the V2 format * @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!"); + }); +});