From 44519e1682a4a333e386326e6f6d19dad805c182 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 26 Oct 2018 14:10:43 -0700 Subject: [PATCH] [AutoPR] web/resource-manager (#324) * [AutoPR web/resource-manager] Fix network trace API REST format (#249) * Generated from 5d96e9d924cbd71c7d5a54352736be5621364013 Fix network trace API REST format * Generated from f05337dd6b902f7f9125a4cc1d2096d315646214 Fix operationIds * Generated from 25ba387503fdb8834ed08a9334068c0d8a0b2698 Fix operation Ids --- packages/@azure/arm-appservice/README.md | 2 +- .../@azure/arm-appservice/lib/models/index.ts | 272 ++++++++ .../arm-appservice/lib/operations/webApps.ts | 599 +++++++++++++++++- .../lib/webSiteManagementClientContext.ts | 9 +- packages/@azure/arm-appservice/package.json | 15 +- 5 files changed, 884 insertions(+), 13 deletions(-) diff --git a/packages/@azure/arm-appservice/README.md b/packages/@azure/arm-appservice/README.md index fdf56a0f405f..ce999a4418ef 100644 --- a/packages/@azure/arm-appservice/README.md +++ b/packages/@azure/arm-appservice/README.md @@ -62,7 +62,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to console.log("The result is:"); console.log(result); }).catch((err) => { - console.log('An error occurred:'); + console.log("An error occurred:"); console.error(err); }); }); diff --git a/packages/@azure/arm-appservice/lib/models/index.ts b/packages/@azure/arm-appservice/lib/models/index.ts index 41d14577738d..c69c21e69afd 100644 --- a/packages/@azure/arm-appservice/lib/models/index.ts +++ b/packages/@azure/arm-appservice/lib/models/index.ts @@ -9970,6 +9970,30 @@ export interface WebAppsRestartSlotOptionalParams extends msRest.RequestOptionsB synchronous?: boolean; } +/** + * @interface + * An interface representing WebAppsStartNetworkTraceSlotOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface WebAppsStartNetworkTraceSlotOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {number} [durationInSeconds] The duration to keep capturing in + * seconds. + */ + durationInSeconds?: number; + /** + * @member {number} [maxFrameLength] The maximum frame length in bytes + * (Optional). + */ + maxFrameLength?: number; + /** + * @member {string} [sasUrl] The Blob URL to store capture file. + */ + sasUrl?: string; +} + /** * @interface * An interface representing WebAppsListUsagesSlotOptionalParams. @@ -9987,6 +10011,30 @@ export interface WebAppsListUsagesSlotOptionalParams extends msRest.RequestOptio filter?: string; } +/** + * @interface + * An interface representing WebAppsStartNetworkTraceOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface WebAppsStartNetworkTraceOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {number} [durationInSeconds] The duration to keep capturing in + * seconds. + */ + durationInSeconds?: number; + /** + * @member {number} [maxFrameLength] The maximum frame length in bytes + * (Optional). + */ + maxFrameLength?: number; + /** + * @member {string} [sasUrl] The Blob URL to store capture file. + */ + sasUrl?: string; +} + /** * @interface * An interface representing WebAppsListUsagesOptionalParams. @@ -10052,6 +10100,54 @@ export interface WebAppsBeginStartWebSiteNetworkTraceOperationSlotOptionalParams sasUrl?: string; } +/** + * @interface + * An interface representing WebAppsBeginStartNetworkTraceSlotOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface WebAppsBeginStartNetworkTraceSlotOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {number} [durationInSeconds] The duration to keep capturing in + * seconds. + */ + durationInSeconds?: number; + /** + * @member {number} [maxFrameLength] The maximum frame length in bytes + * (Optional). + */ + maxFrameLength?: number; + /** + * @member {string} [sasUrl] The Blob URL to store capture file. + */ + sasUrl?: string; +} + +/** + * @interface + * An interface representing WebAppsBeginStartNetworkTraceOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface WebAppsBeginStartNetworkTraceOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {number} [durationInSeconds] The duration to keep capturing in + * seconds. + */ + durationInSeconds?: number; + /** + * @member {number} [maxFrameLength] The maximum frame length in bytes + * (Optional). + */ + maxFrameLength?: number; + /** + * @member {string} [sasUrl] The Blob URL to store capture file. + */ + sasUrl?: string; +} + /** * @interface * An interface representing AppServiceEnvironmentsDeleteMethodOptionalParams. @@ -16220,6 +16316,48 @@ export type WebAppsGetNetworkTracesResponse = Array & { }; }; +/** + * Contains response data for the getNetworkTraceOperationV2 operation. + */ +export type WebAppsGetNetworkTraceOperationV2Response = { + /** + * The parsed response body. + */ + body: any; + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; +}; + +/** + * Contains response data for the getNetworkTracesV2 operation. + */ +export type WebAppsGetNetworkTracesV2Response = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NetworkTrace[]; + }; +}; + /** * Contains response data for the listPerfMonCounters operation. */ @@ -18370,6 +18508,48 @@ export type WebAppsGetNetworkTracesSlotResponse = Array & { }; }; +/** + * Contains response data for the getNetworkTraceOperationSlotV2 operation. + */ +export type WebAppsGetNetworkTraceOperationSlotV2Response = { + /** + * The parsed response body. + */ + body: any; + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; +}; + +/** + * Contains response data for the getNetworkTracesSlotV2 operation. + */ +export type WebAppsGetNetworkTracesSlotV2Response = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NetworkTrace[]; + }; +}; + /** * Contains response data for the listPerfMonCountersSlot operation. */ @@ -18893,6 +19073,29 @@ export type WebAppsUpdateSourceControlSlotResponse = SiteSourceControl & { }; }; +/** + * Contains response data for the startNetworkTraceSlot operation. + */ +export type WebAppsStartNetworkTraceSlotResponse = { + /** + * The parsed response body. + */ + body: any; + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; +}; + /** * Contains response data for the listTriggeredWebJobsSlot operation. */ @@ -19254,6 +19457,29 @@ export type WebAppsUpdateSourceControlResponse = SiteSourceControl & { }; }; +/** + * Contains response data for the startNetworkTrace operation. + */ +export type WebAppsStartNetworkTraceResponse = { + /** + * The parsed response body. + */ + body: any; + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; +}; + /** * Contains response data for the listTriggeredWebJobs operation. */ @@ -19851,6 +20077,29 @@ export type WebAppsBeginCreateOrUpdateSourceControlSlotResponse = SiteSourceCont }; }; +/** + * Contains response data for the beginStartNetworkTraceSlot operation. + */ +export type WebAppsBeginStartNetworkTraceSlotResponse = { + /** + * The parsed response body. + */ + body: any; + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; +}; + /** * Contains response data for the beginCreateOrUpdateSourceControl operation. */ @@ -19870,6 +20119,29 @@ export type WebAppsBeginCreateOrUpdateSourceControlResponse = SiteSourceControl }; }; +/** + * Contains response data for the beginStartNetworkTrace operation. + */ +export type WebAppsBeginStartNetworkTraceResponse = { + /** + * The parsed response body. + */ + body: any; + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: any; + }; +}; + /** * Contains response data for the listNext operation. */ diff --git a/packages/@azure/arm-appservice/lib/operations/webApps.ts b/packages/@azure/arm-appservice/lib/operations/webApps.ts index cc33a90003d7..3eb20e865163 100644 --- a/packages/@azure/arm-appservice/lib/operations/webApps.ts +++ b/packages/@azure/arm-appservice/lib/operations/webApps.ts @@ -3970,6 +3970,82 @@ export class WebApps { callback) as Promise; } + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * @summary Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param [options] The optional parameters + * @returns Promise + */ + getNetworkTraceOperationV2(resourceGroupName: string, name: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param callback The callback + */ + getNetworkTraceOperationV2(resourceGroupName: string, name: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param options The optional parameters + * @param callback The callback + */ + getNetworkTraceOperationV2(resourceGroupName: string, name: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getNetworkTraceOperationV2(resourceGroupName: string, name: string, operationId: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + operationId, + options + }, + getNetworkTraceOperationV2OperationSpec, + callback) as Promise; + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * @summary Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param [options] The optional parameters + * @returns Promise + */ + getNetworkTracesV2(resourceGroupName: string, name: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param callback The callback + */ + getNetworkTracesV2(resourceGroupName: string, name: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param options The optional parameters + * @param callback The callback + */ + getNetworkTracesV2(resourceGroupName: string, name: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getNetworkTracesV2(resourceGroupName: string, name: string, operationId: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + operationId, + options + }, + getNetworkTracesV2OperationSpec, + callback) as Promise; + } + /** * Generates a new publishing password for an app (or deployment slot, if specified). * @summary Generates a new publishing password for an app (or deployment slot, if specified). @@ -9523,6 +9599,96 @@ export class WebApps { callback) as Promise; } + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * @summary Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an + * operation for the production slot. + * @param [options] The optional parameters + * @returns Promise + */ + getNetworkTraceOperationSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an + * operation for the production slot. + * @param callback The callback + */ + getNetworkTraceOperationSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an + * operation for the production slot. + * @param options The optional parameters + * @param callback The callback + */ + getNetworkTraceOperationSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getNetworkTraceOperationSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + operationId, + slot, + options + }, + getNetworkTraceOperationSlotV2OperationSpec, + callback) as Promise; + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * @summary Gets a named operation for a network trace capturing (or deployment slot, if + * specified). + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an + * operation for the production slot. + * @param [options] The optional parameters + * @returns Promise + */ + getNetworkTracesSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an + * operation for the production slot. + * @param callback The callback + */ + getNetworkTracesSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an + * operation for the production slot. + * @param options The optional parameters + * @param callback The callback + */ + getNetworkTracesSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getNetworkTracesSlotV2(resourceGroupName: string, name: string, operationId: string, slot: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + operationId, + slot, + options + }, + getNetworkTracesSlotV2OperationSpec, + callback) as Promise; + } + /** * Generates a new publishing password for an app (or deployment slot, if specified). * @summary Generates a new publishing password for an app (or deployment slot, if specified). @@ -11085,6 +11251,20 @@ export class WebApps { callback); } + /** + * Start capturing network packets for the site. + * @summary Start capturing network packets for the site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param [options] The optional parameters + * @returns Promise + */ + startNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options?: Models.WebAppsStartNetworkTraceSlotOptionalParams): Promise { + return this.beginStartNetworkTraceSlot(resourceGroupName,name,slot,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Stops an app (or deployment slot, if specified). * @summary Stops an app (or deployment slot, if specified). @@ -11125,6 +11305,43 @@ export class WebApps { callback); } + /** + * Stop ongoing capturing network packets for the site. + * @summary Stop ongoing capturing network packets for the site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param [options] The optional parameters + * @returns Promise + */ + stopNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param callback The callback + */ + stopNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param options The optional parameters + * @param callback The callback + */ + stopNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + stopNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + slot, + options + }, + stopNetworkTraceSlotOperationSpec, + callback); + } + /** * Sync web app repository. * @summary Sync web app repository. @@ -12204,6 +12421,19 @@ export class WebApps { callback); } + /** + * Start capturing network packets for the site. + * @summary Start capturing network packets for the site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param [options] The optional parameters + * @returns Promise + */ + startNetworkTrace(resourceGroupName: string, name: string, options?: Models.WebAppsStartNetworkTraceOptionalParams): Promise { + return this.beginStartNetworkTrace(resourceGroupName,name,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Stops an app (or deployment slot, if specified). * @summary Stops an app (or deployment slot, if specified). @@ -12237,6 +12467,39 @@ export class WebApps { callback); } + /** + * Stop ongoing capturing network packets for the site. + * @summary Stop ongoing capturing network packets for the site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param [options] The optional parameters + * @returns Promise + */ + stopNetworkTrace(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param callback The callback + */ + stopNetworkTrace(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param options The optional parameters + * @param callback The callback + */ + stopNetworkTrace(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + stopNetworkTrace(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + stopNetworkTraceOperationSpec, + callback); + } + /** * Sync web app repository. * @summary Sync web app repository. @@ -13544,6 +13807,27 @@ export class WebApps { options); } + /** + * Start capturing network packets for the site. + * @summary Start capturing network packets for the site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param [options] The optional parameters + * @returns Promise + */ + beginStartNetworkTraceSlot(resourceGroupName: string, name: string, slot: string, options?: Models.WebAppsBeginStartNetworkTraceSlotOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + slot, + options + }, + beginStartNetworkTraceSlotOperationSpec, + options); + } + /** * Swaps two deployment slots of an app. * @summary Swaps two deployment slots of an app. @@ -13586,6 +13870,25 @@ export class WebApps { options); } + /** + * Start capturing network packets for the site. + * @summary Start capturing network packets for the site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param [options] The optional parameters + * @returns Promise + */ + beginStartNetworkTrace(resourceGroupName: string, name: string, options?: Models.WebAppsBeginStartNetworkTraceOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + options + }, + beginStartNetworkTraceOperationSpec, + options); + } + /** * Get all apps for a subscription. * @summary Get all apps for a subscription. @@ -18080,9 +18383,86 @@ const getNetworkTracesOperationSpec: msRest.OperationSpec = { serializer }; -const generateNewSitePublishingPasswordOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", +const getNetworkTraceOperationV2OperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.operationId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkTrace" + } + } + } + } + }, + 202: { + bodyMapper: Mappers.Operation + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const getNetworkTracesV2OperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.operationId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkTrace" + } + } + } + } + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const generateNewSitePublishingPasswordOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -21736,6 +22116,85 @@ const getNetworkTracesSlotOperationSpec: msRest.OperationSpec = { serializer }; +const getNetworkTraceOperationSlotV2OperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.operationId, + Parameters.slot, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkTrace" + } + } + } + } + }, + 202: { + bodyMapper: Mappers.Operation + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const getNetworkTracesSlotV2OperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.operationId, + Parameters.slot, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkTrace" + } + } + } + } + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + const generateNewSitePublishingPasswordSlotOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword", @@ -22733,6 +23192,31 @@ const stopSlotOperationSpec: msRest.OperationSpec = { serializer }; +const stopNetworkTraceSlotOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.slot, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const syncRepositorySlotOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync", @@ -23478,6 +23962,30 @@ const stopOperationSpec: msRest.OperationSpec = { serializer }; +const stopNetworkTraceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const syncRepositoryOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync", @@ -24868,6 +25376,49 @@ const beginCreateOrUpdateSourceControlSlotOperationSpec: msRest.OperationSpec = serializer }; +const beginStartNetworkTraceSlotOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.slot, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.durationInSeconds, + Parameters.maxFrameLength, + Parameters.sasUrl, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkTrace" + } + } + } + } + }, + 202: { + bodyMapper: Mappers.Operation + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + const beginSwapSlotWithProductionOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap", @@ -24937,6 +25488,48 @@ const beginCreateOrUpdateSourceControlOperationSpec: msRest.OperationSpec = { serializer }; +const beginStartNetworkTraceOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.durationInSeconds, + Parameters.maxFrameLength, + Parameters.sasUrl, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkTrace" + } + } + } + } + }, + 202: { + bodyMapper: Mappers.Operation + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", diff --git a/packages/@azure/arm-appservice/lib/webSiteManagementClientContext.ts b/packages/@azure/arm-appservice/lib/webSiteManagementClientContext.ts index 8b350e14efb4..2ce3b3248e6e 100644 --- a/packages/@azure/arm-appservice/lib/webSiteManagementClientContext.ts +++ b/packages/@azure/arm-appservice/lib/webSiteManagementClientContext.ts @@ -16,16 +16,9 @@ const packageName = "@azure/arm-appservice"; const packageVersion = "1.0.0"; export class WebSiteManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; - subscriptionId: string; - - apiVersion: string; - - acceptLanguage: string; - - longRunningOperationRetryTimeout: number; + apiVersion?: string; /** * Initializes a new instance of the WebSiteManagementClient class. diff --git a/packages/@azure/arm-appservice/package.json b/packages/@azure/arm-appservice/package.json index 3bdc26ff6dcd..8c6ce1d955c0 100644 --- a/packages/@azure/arm-appservice/package.json +++ b/packages/@azure/arm-appservice/package.json @@ -33,10 +33,23 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-js/issues" }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "lib/**/*.ts", + "rollup.config.js", + "tsconfig.json" + ], "scripts": { "build": "tsc && rollup -c rollup.config.js && npm run minify", "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-appservice.js.map'\" -o ./dist/arm-appservice.min.js ./dist/arm-appservice.js", - "prepare": "npm run build" + "prepack": "npm install && npm run build" }, "sideEffects": false }