From 2bd3ae0bb22b0ee3bcad853c6703d02eacc9e111 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 28 Apr 2020 01:51:48 +0000 Subject: [PATCH] Generated from ed827993ea1edc547aedd043097957e038ae7c90 Add basicpublishingcredentialspolicies to Microsoft.Web stable 2019-08-01 --- .../arm-appservice/src/models/index.ts | 124 +++++++ .../arm-appservice/src/models/mappers.ts | 43 +++ .../src/models/webAppsMappers.ts | 2 + .../arm-appservice/src/operations/webApps.ts | 323 ++++++++++++++++++ 4 files changed, 492 insertions(+) diff --git a/sdk/appservice/arm-appservice/src/models/index.ts b/sdk/appservice/arm-appservice/src/models/index.ts index d76e0c90f48f..2ba32cc85724 100644 --- a/sdk/appservice/arm-appservice/src/models/index.ts +++ b/sdk/appservice/arm-appservice/src/models/index.ts @@ -4758,6 +4758,30 @@ export interface CsmCopySlotEntity { siteConfig: SiteConfig; } +/** + * Publishing Credentials Policies parameters. + */ +export interface CsmPublishingCredentialsPoliciesEntity { + /** + * true to allow access to a publishing method; otherwise, false. + */ + allow: boolean; +} + +/** + * Publishing Credentials Policies collection. + */ +export interface CsmPublishingCredentialsPoliciesCollection { + /** + * Whether FTP is allowed. + */ + ftp: CsmPublishingCredentialsPoliciesEntity; + /** + * Whether Scm Basic Auth is allowed. + */ + scm: CsmPublishingCredentialsPoliciesEntity; +} + /** * Publishing options for requested profile. */ @@ -12857,6 +12881,106 @@ export type WebAppsListBackupStatusSecretsResponse = BackupItem & { }; }; +/** + * Contains response data for the getBasicPublishingCredentialsPolicies operation. + */ +export type WebAppsGetBasicPublishingCredentialsPoliciesResponse = CsmPublishingCredentialsPoliciesCollection & { + /** + * 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: CsmPublishingCredentialsPoliciesCollection; + }; +}; + +/** + * Contains response data for the getFtpAllowed operation. + */ +export type WebAppsGetFtpAllowedResponse = CsmPublishingCredentialsPoliciesEntity & { + /** + * 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: CsmPublishingCredentialsPoliciesEntity; + }; +}; + +/** + * Contains response data for the updateFtpAllowed operation. + */ +export type WebAppsUpdateFtpAllowedResponse = CsmPublishingCredentialsPoliciesEntity & { + /** + * 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: CsmPublishingCredentialsPoliciesEntity; + }; +}; + +/** + * Contains response data for the getScmAllowed operation. + */ +export type WebAppsGetScmAllowedResponse = CsmPublishingCredentialsPoliciesEntity & { + /** + * 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: CsmPublishingCredentialsPoliciesEntity; + }; +}; + +/** + * Contains response data for the updateUserCredsAllowed operation. + */ +export type WebAppsUpdateUserCredsAllowedResponse = CsmPublishingCredentialsPoliciesEntity & { + /** + * 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: CsmPublishingCredentialsPoliciesEntity; + }; +}; + /** * Contains response data for the listConfigurations operation. */ diff --git a/sdk/appservice/arm-appservice/src/models/mappers.ts b/sdk/appservice/arm-appservice/src/models/mappers.ts index f2a95f4541f7..bb9968726078 100644 --- a/sdk/appservice/arm-appservice/src/models/mappers.ts +++ b/sdk/appservice/arm-appservice/src/models/mappers.ts @@ -8476,6 +8476,49 @@ export const CsmCopySlotEntity: msRest.CompositeMapper = { } }; +export const CsmPublishingCredentialsPoliciesEntity: msRest.CompositeMapper = { + serializedName: "CsmPublishingCredentialsPoliciesEntity", + type: { + name: "Composite", + className: "CsmPublishingCredentialsPoliciesEntity", + modelProperties: { + allow: { + required: true, + serializedName: "allow", + type: { + name: "Boolean" + } + } + } + } +}; + +export const CsmPublishingCredentialsPoliciesCollection: msRest.CompositeMapper = { + serializedName: "CsmPublishingCredentialsPoliciesCollection", + type: { + name: "Composite", + className: "CsmPublishingCredentialsPoliciesCollection", + modelProperties: { + ftp: { + required: true, + serializedName: "ftp", + type: { + name: "Composite", + className: "CsmPublishingCredentialsPoliciesEntity" + } + }, + scm: { + required: true, + serializedName: "scm", + type: { + name: "Composite", + className: "CsmPublishingCredentialsPoliciesEntity" + } + } + } + } +}; + export const CsmPublishingProfileOptions: msRest.CompositeMapper = { serializedName: "CsmPublishingProfileOptions", type: { diff --git a/sdk/appservice/arm-appservice/src/models/webAppsMappers.ts b/sdk/appservice/arm-appservice/src/models/webAppsMappers.ts index 328d721a0094..c06a40a28eb0 100644 --- a/sdk/appservice/arm-appservice/src/models/webAppsMappers.ts +++ b/sdk/appservice/arm-appservice/src/models/webAppsMappers.ts @@ -65,6 +65,8 @@ export { ContinuousWebJobCollection, CorsSettings, CsmCopySlotEntity, + CsmPublishingCredentialsPoliciesCollection, + CsmPublishingCredentialsPoliciesEntity, CsmPublishingProfileOptions, CsmSlotEntity, CsmUsageQuota, diff --git a/sdk/appservice/arm-appservice/src/operations/webApps.ts b/sdk/appservice/arm-appservice/src/operations/webApps.ts index 79e109f5de22..25a74268dd27 100644 --- a/sdk/appservice/arm-appservice/src/operations/webApps.ts +++ b/sdk/appservice/arm-appservice/src/operations/webApps.ts @@ -483,6 +483,186 @@ export class WebApps { .then(lroPoller => lroPoller.pollUntilFinished()); } + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given + * site. + * @summary Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param [options] The optional parameters + * @returns Promise + */ + getBasicPublishingCredentialsPolicies(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param callback The callback + */ + getBasicPublishingCredentialsPolicies(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param options The optional parameters + * @param callback The callback + */ + getBasicPublishingCredentialsPolicies(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getBasicPublishingCredentialsPolicies(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getBasicPublishingCredentialsPoliciesOperationSpec, + callback) as Promise; + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * @summary Returns whether FTP is allowed on the site or not. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param [options] The optional parameters + * @returns Promise + */ + getFtpAllowed(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param callback The callback + */ + getFtpAllowed(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param options The optional parameters + * @param callback The callback + */ + getFtpAllowed(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getFtpAllowed(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getFtpAllowedOperationSpec, + callback) as Promise; + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * @summary Updates whether FTP is allowed on the site or not. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param allow true to allow access to a publishing method; otherwise, + * false. + * @param [options] The optional parameters + * @returns Promise + */ + updateFtpAllowed(resourceGroupName: string, name: string, allow: boolean, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param allow true to allow access to a publishing method; otherwise, + * false. + * @param callback The callback + */ + updateFtpAllowed(resourceGroupName: string, name: string, allow: boolean, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param allow true to allow access to a publishing method; otherwise, + * false. + * @param options The optional parameters + * @param callback The callback + */ + updateFtpAllowed(resourceGroupName: string, name: string, allow: boolean, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateFtpAllowed(resourceGroupName: string, name: string, allow: boolean, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + allow, + options + }, + updateFtpAllowedOperationSpec, + callback) as Promise; + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * @summary Returns whether Scm basic auth is allowed on the site or not. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param [options] The optional parameters + * @returns Promise + */ + getScmAllowed(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param callback The callback + */ + getScmAllowed(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param options The optional parameters + * @param callback The callback + */ + getScmAllowed(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getScmAllowed(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getScmAllowedOperationSpec, + callback) as Promise; + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * @summary Updates whether user publishing credentials are allowed on the site or not. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param allow true to allow access to a publishing method; otherwise, + * false. + * @param [options] The optional parameters + * @returns Promise + */ + updateUserCredsAllowed(resourceGroupName: string, name: string, allow: boolean, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param allow true to allow access to a publishing method; otherwise, + * false. + * @param callback The callback + */ + updateUserCredsAllowed(resourceGroupName: string, name: string, allow: boolean, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param allow true to allow access to a publishing method; otherwise, + * false. + * @param options The optional parameters + * @param callback The callback + */ + updateUserCredsAllowed(resourceGroupName: string, name: string, allow: boolean, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateUserCredsAllowed(resourceGroupName: string, name: string, allow: boolean, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + allow, + options + }, + updateUserCredsAllowedOperationSpec, + callback) as Promise; + } + /** * Description for List the configurations of an app * @summary List the configurations of an app @@ -16603,6 +16783,149 @@ const listBackupStatusSecretsOperationSpec: msRest.OperationSpec = { serializer }; +const getBasicPublishingCredentialsPoliciesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicpublishingcredentialspolicies", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const getFtpAllowedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicpublishingcredentialspolicies/ftp", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesEntity + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const updateFtpAllowedOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicpublishingcredentialspolicies/ftp", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + allow: "allow" + }, + mapper: { + ...Mappers.CsmPublishingCredentialsPoliciesEntity, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesEntity + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const getScmAllowedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicpublishingcredentialspolicies/scm", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesEntity + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + +const updateUserCredsAllowedOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicpublishingcredentialspolicies/scm", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + allow: "allow" + }, + mapper: { + ...Mappers.CsmPublishingCredentialsPoliciesEntity, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CsmPublishingCredentialsPoliciesEntity + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + serializer +}; + const listConfigurationsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config",