From b66fb601a859bf3a0603689141b3fcd0ccee4576 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 31 Jul 2018 11:00:37 -0700 Subject: [PATCH 1/5] Generated from a20537a953e03d3177877f92d7c1fc00d79ac635 (#3264) Fix documentation issues with metrics APIs --- .../lib/operations/appServiceEnvironments.js | 90 +++++------ .../lib/operations/appServicePlans.js | 18 +-- .../lib/operations/index.d.ts | 148 +++++++++--------- .../lib/operations/recommendations.js | 42 ++--- .../lib/operations/webApps.js | 72 ++++----- lib/services/websiteManagement2/package.json | 2 +- 6 files changed, 186 insertions(+), 186 deletions(-) diff --git a/lib/services/websiteManagement2/lib/operations/appServiceEnvironments.js b/lib/services/websiteManagement2/lib/operations/appServiceEnvironments.js index 4e8dcefbed..ad2df2aa00 100644 --- a/lib/services/websiteManagement2/lib/operations/appServiceEnvironments.js +++ b/lib/services/websiteManagement2/lib/operations/appServiceEnvironments.js @@ -1938,9 +1938,9 @@ function _listMetricDefinitions(resourceGroupName, name, options, callback) { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3357,9 +3357,9 @@ function _listMultiRoleMetricDefinitions(resourceGroupName, name, options, callb * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4709,9 +4709,9 @@ function _suspend(resourceGroupName, name, options, callback) { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5794,9 +5794,9 @@ function _listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, worke * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6164,9 +6164,9 @@ function _listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13191,9 +13191,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -13235,9 +13235,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14187,9 +14187,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -14237,9 +14237,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15046,9 +15046,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15087,9 +15087,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15853,9 +15853,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15903,9 +15903,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16073,9 +16073,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -16121,9 +16121,9 @@ class AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/websiteManagement2/lib/operations/appServicePlans.js b/lib/services/websiteManagement2/lib/operations/appServicePlans.js index edd4f486a6..6c1c7d8852 100644 --- a/lib/services/websiteManagement2/lib/operations/appServicePlans.js +++ b/lib/services/websiteManagement2/lib/operations/appServicePlans.js @@ -2392,9 +2392,9 @@ function _listMetricDefintions(resourceGroupName, name, options, callback) { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8026,9 +8026,9 @@ class AppServicePlans { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8070,9 +8070,9 @@ class AppServicePlans { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/websiteManagement2/lib/operations/index.d.ts b/lib/services/websiteManagement2/lib/operations/index.d.ts index 6383b5e281..3982559f3b 100644 --- a/lib/services/websiteManagement2/lib/operations/index.d.ts +++ b/lib/services/websiteManagement2/lib/operations/index.d.ts @@ -7933,9 +7933,9 @@ export interface Recommendations { * returns all recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7960,9 +7960,9 @@ export interface Recommendations { * returns all recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8129,9 +8129,9 @@ export interface Recommendations { * expired recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8162,9 +8162,9 @@ export interface Recommendations { * expired recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -8214,7 +8214,7 @@ export interface Recommendations { * returns all recommendations. * * @param {string} [options.filter] Return only channels specified in the - * filter. Filter is specified by using OData syntax. Example: $filter=channels + * filter. Filter is specified by using OData syntax. Example: $filter=channel * eq 'Api' or channel eq 'Notification' * * @param {object} [options.customHeaders] Headers that will be added to the @@ -8245,7 +8245,7 @@ export interface Recommendations { * returns all recommendations. * * @param {string} [options.filter] Return only channels specified in the - * filter. Filter is specified by using OData syntax. Example: $filter=channels + * filter. Filter is specified by using OData syntax. Example: $filter=channel * eq 'Api' or channel eq 'Notification' * * @param {object} [options.customHeaders] Headers that will be added to the @@ -19474,8 +19474,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19506,8 +19506,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20103,8 +20103,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20131,8 +20131,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -33645,8 +33645,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -33680,8 +33680,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -34113,8 +34113,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -34144,8 +34144,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -38132,8 +38132,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -38166,8 +38166,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -40365,8 +40365,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -40396,8 +40396,8 @@ export interface WebApps { * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -50134,9 +50134,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -50166,9 +50166,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -50914,9 +50914,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -50952,9 +50952,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -51530,9 +51530,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -51559,9 +51559,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -52175,9 +52175,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -52213,9 +52213,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -52341,9 +52341,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -52377,9 +52377,9 @@ export interface AppServiceEnvironments { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -56314,9 +56314,9 @@ export interface AppServicePlans { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -56346,9 +56346,9 @@ export interface AppServicePlans { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(name.value eq - * 'Metric1' or name.value eq 'Metric2') and startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z + * and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/websiteManagement2/lib/operations/recommendations.js b/lib/services/websiteManagement2/lib/operations/recommendations.js index 9a5449c349..82dd249fea 100644 --- a/lib/services/websiteManagement2/lib/operations/recommendations.js +++ b/lib/services/websiteManagement2/lib/operations/recommendations.js @@ -26,9 +26,9 @@ const WebResource = msRest.WebResource; * returns all recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -434,9 +434,9 @@ function _disableRecommendationForSubscription(name, options, callback) { * expired recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -621,7 +621,7 @@ function _listHistoryForWebApp(resourceGroupName, siteName, options, callback) { * returns all recommendations. * * @param {string} [options.filter] Return only channels specified in the - * filter. Filter is specified by using OData syntax. Example: $filter=channels + * filter. Filter is specified by using OData syntax. Example: $filter=channel * eq 'Api' or channel eq 'Notification' * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1846,9 +1846,9 @@ class Recommendations { * returns all recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1885,9 +1885,9 @@ class Recommendations { * returns all recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2123,9 +2123,9 @@ class Recommendations { * expired recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2168,9 +2168,9 @@ class Recommendations { * expired recommendations. * * @param {string} [options.filter] Filter is specified by using OData syntax. - * Example: $filter=channels eq 'Api' or channel eq 'Notification' and - * startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' - * and timeGrain eq duration'[PT1H|PT1M|P1D] + * Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + * eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2235,7 +2235,7 @@ class Recommendations { * returns all recommendations. * * @param {string} [options.filter] Return only channels specified in the - * filter. Filter is specified by using OData syntax. Example: $filter=channels + * filter. Filter is specified by using OData syntax. Example: $filter=channel * eq 'Api' or channel eq 'Notification' * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2278,7 +2278,7 @@ class Recommendations { * returns all recommendations. * * @param {string} [options.filter] Return only channels specified in the - * filter. Filter is specified by using OData syntax. Example: $filter=channels + * filter. Filter is specified by using OData syntax. Example: $filter=channel * eq 'Api' or channel eq 'Notification' * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/websiteManagement2/lib/operations/webApps.js b/lib/services/websiteManagement2/lib/operations/webApps.js index 1ddf143e63..5c95a51a65 100644 --- a/lib/services/websiteManagement2/lib/operations/webApps.js +++ b/lib/services/websiteManagement2/lib/operations/webApps.js @@ -18248,8 +18248,8 @@ function _listMetricDefinitions(resourceGroupName, name, options, callback) { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -19472,8 +19472,8 @@ function _generateNewSitePublishingPassword(resourceGroupName, name, options, ca * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -42789,8 +42789,8 @@ function _listMetricDefinitionsSlot(resourceGroupName, name, slot, options, call * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -43859,8 +43859,8 @@ function _generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, o * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -51780,8 +51780,8 @@ function _runTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot, opti * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -56523,8 +56523,8 @@ function _runTriggeredWebJob(resourceGroupName, name, webJobName, options, callb * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -85471,8 +85471,8 @@ class WebApps { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -85515,8 +85515,8 @@ class WebApps { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -86316,8 +86316,8 @@ class WebApps { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -86356,8 +86356,8 @@ class WebApps { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -103314,8 +103314,8 @@ class WebApps { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -103361,8 +103361,8 @@ class WebApps { * * @param {string} [options.filter] Return only metrics specified in the filter * (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - * name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime - * eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. + * name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime + * eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -103944,8 +103944,8 @@ class WebApps { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -103987,8 +103987,8 @@ class WebApps { * * @param {string} [options.filter] Return only usages/metrics specified in the * filter. Filter conforms to odata syntax. Example: $filter=(startTime eq - * '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain - * eq duration'[Hour|Minute|Day]'. + * 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -109259,8 +109259,8 @@ class WebApps { * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -109305,8 +109305,8 @@ class WebApps { * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -112248,8 +112248,8 @@ class WebApps { * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -112291,8 +112291,8 @@ class WebApps { * * @param {string} [options.filter] Return only information specified in the * filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' - * or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - * endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + * or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq * duration'[Hour|Minute|Day]'. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/websiteManagement2/package.json b/lib/services/websiteManagement2/package.json index bbf762e2d5..847cc2bc11 100644 --- a/lib/services/websiteManagement2/package.json +++ b/lib/services/websiteManagement2/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/webSiteManagementClient.js", "types": "./lib/webSiteManagementClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/lib/services/webSiteManagement2", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" From b7589fd1215a9f54a20d70f2c7f3cd91e3c1e9f5 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 3 Aug 2018 14:06:59 -0700 Subject: [PATCH 2/5] [AutoPR web/resource-manager] [DO NOT MERGE] Add API for adding external storage account configurations to a web app (#3204) * Generated from b3ca48ca58ec98acb66b2c6760819c0b609cd5d1 Make state of AzureStorageInfoValue readonly * Generated from b3ca48ca58ec98acb66b2c6760819c0b609cd5d1 Make state of AzureStorageInfoValue readonly --- .../lib/models/azureStorageInfoValue.js | 99 + .../azureStoragePropertyDictionaryResource.js | 95 + .../websiteManagement2/lib/models/index.d.ts | 51 + .../websiteManagement2/lib/models/index.js | 2 + .../websiteManagement2/lib/models/site.js | 2 + .../lib/models/siteConfig.js | 17 + .../lib/models/siteConfigResource.js | 17 + .../lib/models/sitePatchResource.js | 2 + .../lib/models/slotConfigNamesResource.js | 16 + .../lib/operations/index.d.ts | 370 ++ .../lib/operations/webApps.js | 3391 +++++++++++------ 11 files changed, 2983 insertions(+), 1079 deletions(-) create mode 100644 lib/services/websiteManagement2/lib/models/azureStorageInfoValue.js create mode 100644 lib/services/websiteManagement2/lib/models/azureStoragePropertyDictionaryResource.js diff --git a/lib/services/websiteManagement2/lib/models/azureStorageInfoValue.js b/lib/services/websiteManagement2/lib/models/azureStorageInfoValue.js new file mode 100644 index 0000000000..e30422f824 --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/azureStorageInfoValue.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Azure Files or Blob Storage access information value for dictionary storage. + * + */ +class AzureStorageInfoValue { + /** + * Create a AzureStorageInfoValue. + * @member {string} [type] Type of storage. Possible values include: + * 'AzureFiles', 'AzureBlob' + * @member {string} [accountName] Name of the storage account. + * @member {string} [shareName] Name of the file share (container name, for + * Blob storage). + * @member {string} [accessKey] Access key for the storage account. + * @member {string} [mountPath] Path to mount the storage within the site's + * runtime environment. + * @member {string} [state] State of the storage account. Possible values + * include: 'Ok', 'InvalidCredentials', 'InvalidShare' + */ + constructor() { + } + + /** + * Defines the metadata of AzureStorageInfoValue + * + * @returns {object} metadata of AzureStorageInfoValue + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureStorageInfoValue', + type: { + name: 'Composite', + className: 'AzureStorageInfoValue', + modelProperties: { + type: { + required: false, + serializedName: 'type', + type: { + name: 'Enum', + allowedValues: [ 'AzureFiles', 'AzureBlob' ] + } + }, + accountName: { + required: false, + serializedName: 'accountName', + type: { + name: 'String' + } + }, + shareName: { + required: false, + serializedName: 'shareName', + type: { + name: 'String' + } + }, + accessKey: { + required: false, + serializedName: 'accessKey', + type: { + name: 'String' + } + }, + mountPath: { + required: false, + serializedName: 'mountPath', + type: { + name: 'String' + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'Enum', + allowedValues: [ 'Ok', 'InvalidCredentials', 'InvalidShare' ] + } + } + } + } + }; + } +} + +module.exports = AzureStorageInfoValue; diff --git a/lib/services/websiteManagement2/lib/models/azureStoragePropertyDictionaryResource.js b/lib/services/websiteManagement2/lib/models/azureStoragePropertyDictionaryResource.js new file mode 100644 index 0000000000..0b1b19dc61 --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/azureStoragePropertyDictionaryResource.js @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * AzureStorageInfo dictionary resource. + * + * @extends models['ProxyOnlyResource'] + */ +class AzureStoragePropertyDictionaryResource extends models['ProxyOnlyResource'] { + /** + * Create a AzureStoragePropertyDictionaryResource. + * @member {object} [properties] Azure storage accounts. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of AzureStoragePropertyDictionaryResource + * + * @returns {object} metadata of AzureStoragePropertyDictionaryResource + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureStoragePropertyDictionaryResource', + type: { + name: 'Composite', + className: 'AzureStoragePropertyDictionaryResource', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serializedName: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + properties: { + required: false, + serializedName: 'properties', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'AzureStorageInfoValueElementType', + type: { + name: 'Composite', + className: 'AzureStorageInfoValue' + } + } + } + } + } + } + }; + } +} + +module.exports = AzureStoragePropertyDictionaryResource; diff --git a/lib/services/websiteManagement2/lib/models/index.d.ts b/lib/services/websiteManagement2/lib/models/index.d.ts index 9687aabe5c..c5b0b4418c 100644 --- a/lib/services/websiteManagement2/lib/models/index.d.ts +++ b/lib/services/websiteManagement2/lib/models/index.d.ts @@ -1110,6 +1110,32 @@ export interface ConnStringInfo { type?: string; } +/** + * @class + * Initializes a new instance of the AzureStorageInfoValue class. + * @constructor + * Azure Files or Blob Storage access information value for dictionary storage. + * + * @member {string} [type] Type of storage. Possible values include: + * 'AzureFiles', 'AzureBlob' + * @member {string} [accountName] Name of the storage account. + * @member {string} [shareName] Name of the file share (container name, for + * Blob storage). + * @member {string} [accessKey] Access key for the storage account. + * @member {string} [mountPath] Path to mount the storage within the site's + * runtime environment. + * @member {string} [state] State of the storage account. Possible values + * include: 'Ok', 'InvalidCredentials', 'InvalidShare' + */ +export interface AzureStorageInfoValue { + type?: string; + accountName?: string; + shareName?: string; + accessKey?: string; + mountPath?: string; + readonly state?: string; +} + /** * @class * Initializes a new instance of the NameValuePair class. @@ -1153,6 +1179,8 @@ export interface NameValuePair { * detailed error logging is enabled; otherwise, false. * @member {string} [publishingUsername] Publishing user name. * @member {array} [appSettings] Application settings. + * @member {object} [azureStorageAccounts] User-provided Azure storage + * accounts. * @member {array} [connectionStrings] Connection strings. * @member {object} [machineKey] Site MachineKey. * @member {string} [machineKey.validation] MachineKey validation. @@ -1281,6 +1309,7 @@ export interface SiteConfig { detailedErrorLoggingEnabled?: boolean; publishingUsername?: string; appSettings?: NameValuePair[]; + azureStorageAccounts?: { [propertyName: string]: AzureStorageInfoValue }; connectionStrings?: ConnStringInfo[]; readonly machineKey?: SiteMachineKey; handlerMappings?: HandlerMapping[]; @@ -1398,6 +1427,8 @@ export interface HostNameSslState { * if detailed error logging is enabled; otherwise, false. * @member {string} [siteConfig.publishingUsername] Publishing user name. * @member {array} [siteConfig.appSettings] Application settings. + * @member {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. * @member {array} [siteConfig.connectionStrings] Connection strings. * @member {object} [siteConfig.machineKey] Site MachineKey. * @member {string} [siteConfig.machineKey.validation] MachineKey validation. @@ -4184,6 +4215,18 @@ export interface AzureBlobStorageHttpLogsConfig { enabled?: boolean; } +/** + * @class + * Initializes a new instance of the AzureStoragePropertyDictionaryResource class. + * @constructor + * AzureStorageInfo dictionary resource. + * + * @member {object} [properties] Azure storage accounts. + */ +export interface AzureStoragePropertyDictionaryResource extends ProxyOnlyResource { + properties?: { [propertyName: string]: AzureStorageInfoValue }; +} + /** * @class * Initializes a new instance of the DatabaseBackupSetting class. @@ -5423,6 +5466,8 @@ export interface SiteCloneability { * detailed error logging is enabled; otherwise, false. * @member {string} [publishingUsername] Publishing user name. * @member {array} [appSettings] Application settings. + * @member {object} [azureStorageAccounts] User-provided Azure storage + * accounts. * @member {array} [connectionStrings] Connection strings. * @member {object} [machineKey] Site MachineKey. * @member {string} [machineKey.validation] MachineKey validation. @@ -5551,6 +5596,7 @@ export interface SiteConfigResource extends ProxyOnlyResource { detailedErrorLoggingEnabled?: boolean; publishingUsername?: string; appSettings?: NameValuePair[]; + azureStorageAccounts?: { [propertyName: string]: AzureStorageInfoValue }; connectionStrings?: ConnStringInfo[]; readonly machineKey?: SiteMachineKey; handlerMappings?: HandlerMapping[]; @@ -5786,6 +5832,8 @@ export interface SiteLogsConfig extends ProxyOnlyResource { * if detailed error logging is enabled; otherwise, false. * @member {string} [siteConfig.publishingUsername] Publishing user name. * @member {array} [siteConfig.appSettings] Application settings. + * @member {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. * @member {array} [siteConfig.connectionStrings] Connection strings. * @member {object} [siteConfig.machineKey] Site MachineKey. * @member {string} [siteConfig.machineKey.validation] MachineKey validation. @@ -6080,10 +6128,13 @@ export interface SiteSourceControl extends ProxyOnlyResource { * * @member {array} [connectionStringNames] List of connection string names. * @member {array} [appSettingNames] List of application settings names. + * @member {array} [azureStorageConfigNames] List of external Azure storage + * account identifiers. */ export interface SlotConfigNamesResource extends ProxyOnlyResource { connectionStringNames?: string[]; appSettingNames?: string[]; + azureStorageConfigNames?: string[]; } /** diff --git a/lib/services/websiteManagement2/lib/models/index.js b/lib/services/websiteManagement2/lib/models/index.js index af3e9c3c98..1310247339 100644 --- a/lib/services/websiteManagement2/lib/models/index.js +++ b/lib/services/websiteManagement2/lib/models/index.js @@ -65,6 +65,7 @@ exports.VirtualApplication = require('./virtualApplication'); exports.HandlerMapping = require('./handlerMapping'); exports.SiteMachineKey = require('./siteMachineKey'); exports.ConnStringInfo = require('./connStringInfo'); +exports.AzureStorageInfoValue = require('./azureStorageInfoValue'); exports.NameValuePair = require('./nameValuePair'); exports.SiteConfig = require('./siteConfig'); exports.HostNameSslState = require('./hostNameSslState'); @@ -161,6 +162,7 @@ exports.AzureTableStorageApplicationLogsConfig = require('./azureTableStorageApp exports.AzureBlobStorageApplicationLogsConfig = require('./azureBlobStorageApplicationLogsConfig'); exports.ApplicationLogsConfig = require('./applicationLogsConfig'); exports.AzureBlobStorageHttpLogsConfig = require('./azureBlobStorageHttpLogsConfig'); +exports.AzureStoragePropertyDictionaryResource = require('./azureStoragePropertyDictionaryResource'); exports.DatabaseBackupSetting = require('./databaseBackupSetting'); exports.BackupItem = require('./backupItem'); exports.BackupSchedule = require('./backupSchedule'); diff --git a/lib/services/websiteManagement2/lib/models/site.js b/lib/services/websiteManagement2/lib/models/site.js index 154c30bf71..bad3fa8eaa 100644 --- a/lib/services/websiteManagement2/lib/models/site.js +++ b/lib/services/websiteManagement2/lib/models/site.js @@ -73,6 +73,8 @@ class Site extends models['Resource'] { * false. * @member {string} [siteConfig.publishingUsername] Publishing user name. * @member {array} [siteConfig.appSettings] Application settings. + * @member {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. * @member {array} [siteConfig.connectionStrings] Connection strings. * @member {object} [siteConfig.machineKey] Site MachineKey. * @member {string} [siteConfig.machineKey.validation] MachineKey validation. diff --git a/lib/services/websiteManagement2/lib/models/siteConfig.js b/lib/services/websiteManagement2/lib/models/siteConfig.js index 9d2438791d..f7ef0d0b78 100644 --- a/lib/services/websiteManagement2/lib/models/siteConfig.js +++ b/lib/services/websiteManagement2/lib/models/siteConfig.js @@ -42,6 +42,8 @@ class SiteConfig { * detailed error logging is enabled; otherwise, false. * @member {string} [publishingUsername] Publishing user name. * @member {array} [appSettings] Application settings. + * @member {object} [azureStorageAccounts] User-provided Azure storage + * accounts. * @member {array} [connectionStrings] Connection strings. * @member {object} [machineKey] Site MachineKey. * @member {string} [machineKey.validation] MachineKey validation. @@ -307,6 +309,21 @@ class SiteConfig { } } }, + azureStorageAccounts: { + required: false, + serializedName: 'azureStorageAccounts', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'AzureStorageInfoValueElementType', + type: { + name: 'Composite', + className: 'AzureStorageInfoValue' + } + } + } + }, connectionStrings: { required: false, serializedName: 'connectionStrings', diff --git a/lib/services/websiteManagement2/lib/models/siteConfigResource.js b/lib/services/websiteManagement2/lib/models/siteConfigResource.js index c4f86d257f..bbfa3cc80c 100644 --- a/lib/services/websiteManagement2/lib/models/siteConfigResource.js +++ b/lib/services/websiteManagement2/lib/models/siteConfigResource.js @@ -43,6 +43,8 @@ class SiteConfigResource extends models['ProxyOnlyResource'] { * detailed error logging is enabled; otherwise, false. * @member {string} [publishingUsername] Publishing user name. * @member {array} [appSettings] Application settings. + * @member {object} [azureStorageAccounts] User-provided Azure storage + * accounts. * @member {array} [connectionStrings] Connection strings. * @member {object} [machineKey] Site MachineKey. * @member {string} [machineKey.validation] MachineKey validation. @@ -340,6 +342,21 @@ class SiteConfigResource extends models['ProxyOnlyResource'] { } } }, + azureStorageAccounts: { + required: false, + serializedName: 'properties.azureStorageAccounts', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'AzureStorageInfoValueElementType', + type: { + name: 'Composite', + className: 'AzureStorageInfoValue' + } + } + } + }, connectionStrings: { required: false, serializedName: 'properties.connectionStrings', diff --git a/lib/services/websiteManagement2/lib/models/sitePatchResource.js b/lib/services/websiteManagement2/lib/models/sitePatchResource.js index 575bc5a043..31ff62ab3c 100644 --- a/lib/services/websiteManagement2/lib/models/sitePatchResource.js +++ b/lib/services/websiteManagement2/lib/models/sitePatchResource.js @@ -73,6 +73,8 @@ class SitePatchResource extends models['ProxyOnlyResource'] { * false. * @member {string} [siteConfig.publishingUsername] Publishing user name. * @member {array} [siteConfig.appSettings] Application settings. + * @member {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. * @member {array} [siteConfig.connectionStrings] Connection strings. * @member {object} [siteConfig.machineKey] Site MachineKey. * @member {string} [siteConfig.machineKey.validation] MachineKey validation. diff --git a/lib/services/websiteManagement2/lib/models/slotConfigNamesResource.js b/lib/services/websiteManagement2/lib/models/slotConfigNamesResource.js index e64eb91f19..7bdcaa83e2 100644 --- a/lib/services/websiteManagement2/lib/models/slotConfigNamesResource.js +++ b/lib/services/websiteManagement2/lib/models/slotConfigNamesResource.js @@ -22,6 +22,8 @@ class SlotConfigNamesResource extends models['ProxyOnlyResource'] { * Create a SlotConfigNamesResource. * @member {array} [connectionStringNames] List of connection string names. * @member {array} [appSettingNames] List of application settings names. + * @member {array} [azureStorageConfigNames] List of external Azure storage + * account identifiers. */ constructor() { super(); @@ -99,6 +101,20 @@ class SlotConfigNamesResource extends models['ProxyOnlyResource'] { } } } + }, + azureStorageConfigNames: { + required: false, + serializedName: 'properties.azureStorageConfigNames', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/lib/services/websiteManagement2/lib/operations/index.d.ts b/lib/services/websiteManagement2/lib/operations/index.d.ts index 3982559f3b..5eec516d09 100644 --- a/lib/services/websiteManagement2/lib/operations/index.d.ts +++ b/lib/services/websiteManagement2/lib/operations/index.d.ts @@ -9026,6 +9026,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -9406,6 +9409,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -9885,6 +9891,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -10253,6 +10262,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -11982,6 +11994,150 @@ export interface WebApps { getAuthSettings(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary Updates the Azure storage account configurations of an app. + * + * Updates the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} azureStorageAccounts Azure storage accounts of the app. + * + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. + * + * @param {string} [azureStorageAccounts.kind] Kind of resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateAzureStorageAccountsWithHttpOperationResponse(resourceGroupName: string, name: string, azureStorageAccounts: models.AzureStoragePropertyDictionaryResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Updates the Azure storage account configurations of an app. + * + * Updates the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} azureStorageAccounts Azure storage accounts of the app. + * + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. + * + * @param {string} [azureStorageAccounts.kind] Kind of resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AzureStoragePropertyDictionaryResource} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AzureStoragePropertyDictionaryResource} [result] - The deserialized result object if an error did not occur. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateAzureStorageAccounts(resourceGroupName: string, name: string, azureStorageAccounts: models.AzureStoragePropertyDictionaryResource, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateAzureStorageAccounts(resourceGroupName: string, name: string, azureStorageAccounts: models.AzureStoragePropertyDictionaryResource, callback: ServiceCallback): void; + updateAzureStorageAccounts(resourceGroupName: string, name: string, azureStorageAccounts: models.AzureStoragePropertyDictionaryResource, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the Azure storage account configurations of an app. + * + * Gets the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listAzureStorageAccountsWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the Azure storage account configurations of an app. + * + * Gets the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AzureStoragePropertyDictionaryResource} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AzureStoragePropertyDictionaryResource} [result] - The deserialized result object if an error did not occur. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAzureStorageAccounts(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAzureStorageAccounts(resourceGroupName: string, name: string, callback: ServiceCallback): void; + listAzureStorageAccounts(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Updates the backup configuration of an app. * @@ -13162,6 +13318,9 @@ export interface WebApps { * @param {array} [slotConfigNames.appSettingNames] List of application * settings names. * + * @param {array} [slotConfigNames.azureStorageConfigNames] List of external + * Azure storage account identifiers. + * * @param {string} [slotConfigNames.kind] Kind of resource. * * @param {object} [options] Optional Parameters. @@ -13198,6 +13357,9 @@ export interface WebApps { * @param {array} [slotConfigNames.appSettingNames] List of application * settings names. * + * @param {array} [slotConfigNames.azureStorageConfigNames] List of external + * Azure storage account identifiers. + * * @param {string} [slotConfigNames.kind] Kind of resource. * * @param {object} [options] Optional Parameters. @@ -13690,6 +13852,9 @@ export interface WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -13934,6 +14099,9 @@ export interface WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -14197,6 +14365,9 @@ export interface WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -14441,6 +14612,9 @@ export interface WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -22774,6 +22948,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -23157,6 +23334,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -23645,6 +23825,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -24016,6 +24199,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -25830,6 +26016,166 @@ export interface WebApps { getAuthSettingsSlot(resourceGroupName: string, name: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary Updates the Azure storage account configurations of an app. + * + * Updates the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} azureStorageAccounts Azure storage accounts of the app. + * + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. + * + * @param {string} [azureStorageAccounts.kind] Kind of resource. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateAzureStorageAccountsSlotWithHttpOperationResponse(resourceGroupName: string, name: string, azureStorageAccounts: models.AzureStoragePropertyDictionaryResource, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Updates the Azure storage account configurations of an app. + * + * Updates the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} azureStorageAccounts Azure storage accounts of the app. + * + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. + * + * @param {string} [azureStorageAccounts.kind] Kind of resource. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AzureStoragePropertyDictionaryResource} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AzureStoragePropertyDictionaryResource} [result] - The deserialized result object if an error did not occur. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateAzureStorageAccountsSlot(resourceGroupName: string, name: string, azureStorageAccounts: models.AzureStoragePropertyDictionaryResource, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateAzureStorageAccountsSlot(resourceGroupName: string, name: string, azureStorageAccounts: models.AzureStoragePropertyDictionaryResource, slot: string, callback: ServiceCallback): void; + updateAzureStorageAccountsSlot(resourceGroupName: string, name: string, azureStorageAccounts: models.AzureStoragePropertyDictionaryResource, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the Azure storage account configurations of an app. + * + * Gets the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listAzureStorageAccountsSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the Azure storage account configurations of an app. + * + * Gets the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AzureStoragePropertyDictionaryResource} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AzureStoragePropertyDictionaryResource} [result] - The deserialized result object if an error did not occur. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAzureStorageAccountsSlot(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAzureStorageAccountsSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; + listAzureStorageAccountsSlot(resourceGroupName: string, name: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Updates the backup configuration of an app. * @@ -27494,6 +27840,9 @@ export interface WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -27741,6 +28090,9 @@ export interface WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -28007,6 +28359,9 @@ export interface WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -28254,6 +28609,9 @@ export interface WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -41331,6 +41689,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -41711,6 +42072,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -43318,6 +43682,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -43701,6 +44068,9 @@ export interface WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * diff --git a/lib/services/websiteManagement2/lib/operations/webApps.js b/lib/services/websiteManagement2/lib/operations/webApps.js index 5c95a51a65..f35d4fcc4a 100644 --- a/lib/services/websiteManagement2/lib/operations/webApps.js +++ b/lib/services/websiteManagement2/lib/operations/webApps.js @@ -563,6 +563,9 @@ function _get(resourceGroupName, name, options, callback) { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -1166,6 +1169,9 @@ function _deleteMethod(resourceGroupName, name, options, callback) { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -4007,48 +4013,20 @@ function _getAuthSettings(resourceGroupName, name, options, callback) { } /** - * @summary Updates the backup configuration of an app. + * @summary Updates the Azure storage account configurations of an app. * - * Updates the backup configuration of an app. + * Updates the Azure storage account configurations of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {object} request Edited backup configuration. - * - * @param {boolean} [request.enabled] True if the backup schedule is enabled - * (must be included in that case), false if the backup schedule should be - * disabled. - * - * @param {string} request.storageAccountUrl SAS URL to the container. - * - * @param {object} [request.backupSchedule] Schedule for the backup if it is - * executed periodically. - * - * @param {number} request.backupSchedule.frequencyInterval How often the - * backup should be executed (e.g. for weekly backup, this should be set to 7 - * and FrequencyUnit should be set to Day) - * - * @param {string} request.backupSchedule.frequencyUnit The unit of time for - * how often the backup should be executed (e.g. for weekly backup, this should - * be set to Day and FrequencyInterval should be set to 7). Possible values - * include: 'Day', 'Hour' - * - * @param {boolean} request.backupSchedule.keepAtLeastOneBackup True if the - * retention policy should always keep at least one backup in the storage - * account, regardless how old it is; false otherwise. - * - * @param {number} request.backupSchedule.retentionPeriodInDays After how many - * days backups should be deleted. - * - * @param {date} [request.backupSchedule.startTime] When the schedule should - * start working. + * @param {object} azureStorageAccounts Azure storage accounts of the app. * - * @param {array} [request.databases] Databases included in the backup. + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. * - * @param {string} [request.kind] Kind of resource. + * @param {string} [azureStorageAccounts.kind] Kind of resource. * * @param {object} [options] Optional Parameters. * @@ -4062,13 +4040,14 @@ function _getAuthSettings(resourceGroupName, name, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link BackupRequest} for more information. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateBackupConfiguration(resourceGroupName, name, request, options, callback) { +function _updateAzureStorageAccounts(resourceGroupName, name, azureStorageAccounts, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -4100,8 +4079,8 @@ function _updateBackupConfiguration(resourceGroupName, name, request, options, c if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (request === null || request === undefined) { - throw new Error('request cannot be null or undefined.'); + if (azureStorageAccounts === null || azureStorageAccounts === undefined) { + throw new Error('azureStorageAccounts cannot be null or undefined.'); } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -4118,7 +4097,7 @@ function _updateBackupConfiguration(resourceGroupName, name, request, options, c // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -4152,14 +4131,14 @@ function _updateBackupConfiguration(resourceGroupName, name, request, options, c let requestContent = null; let requestModel = null; try { - if (request !== null && request !== undefined) { - let requestModelMapper = new client.models['BackupRequest']().mapper(); - requestModel = client.serialize(requestModelMapper, request, 'request'); + if (azureStorageAccounts !== null && azureStorageAccounts !== undefined) { + let requestModelMapper = new client.models['AzureStoragePropertyDictionaryResource']().mapper(); + requestModel = client.serialize(requestModelMapper, azureStorageAccounts, 'azureStorageAccounts'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(request, null, 2)}.`); + `payload - ${JSON.stringify(azureStorageAccounts, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -4205,7 +4184,7 @@ function _updateBackupConfiguration(resourceGroupName, name, request, options, c parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['BackupRequest']().mapper(); + let resultMapper = new client.models['AzureStoragePropertyDictionaryResource']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -4221,9 +4200,9 @@ function _updateBackupConfiguration(resourceGroupName, name, request, options, c } /** - * @summary Deletes the backup configuration of an app. + * @summary Gets the Azure storage account configurations of an app. * - * Deletes the backup configuration of an app. + * Gets the Azure storage account configurations of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -4241,13 +4220,15 @@ function _updateBackupConfiguration(resourceGroupName, name, request, options, c * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteBackupConfiguration(resourceGroupName, name, options, callback) { +function _listAzureStorageAccounts(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -4294,7 +4275,7 @@ function _deleteBackupConfiguration(resourceGroupName, name, options, callback) // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -4306,7 +4287,7 @@ function _deleteBackupConfiguration(resourceGroupName, name, options, callback) // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4341,12 +4322,13 @@ function _deleteBackupConfiguration(resourceGroupName, name, options, callback) try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -4359,21 +4341,72 @@ function _deleteBackupConfiguration(resourceGroupName, name, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AzureStoragePropertyDictionaryResource']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Gets the backup configuration of an app. + * @summary Updates the backup configuration of an app. * - * Gets the backup configuration of an app. + * Updates the backup configuration of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * + * @param {object} request Edited backup configuration. + * + * @param {boolean} [request.enabled] True if the backup schedule is enabled + * (must be included in that case), false if the backup schedule should be + * disabled. + * + * @param {string} request.storageAccountUrl SAS URL to the container. + * + * @param {object} [request.backupSchedule] Schedule for the backup if it is + * executed periodically. + * + * @param {number} request.backupSchedule.frequencyInterval How often the + * backup should be executed (e.g. for weekly backup, this should be set to 7 + * and FrequencyUnit should be set to Day) + * + * @param {string} request.backupSchedule.frequencyUnit The unit of time for + * how often the backup should be executed (e.g. for weekly backup, this should + * be set to Day and FrequencyInterval should be set to 7). Possible values + * include: 'Day', 'Hour' + * + * @param {boolean} request.backupSchedule.keepAtLeastOneBackup True if the + * retention policy should always keep at least one backup in the storage + * account, regardless how old it is; false otherwise. + * + * @param {number} request.backupSchedule.retentionPeriodInDays After how many + * days backups should be deleted. + * + * @param {date} [request.backupSchedule.startTime] When the schedule should + * start working. + * + * @param {array} [request.databases] Databases included in the backup. + * + * @param {string} [request.kind] Kind of resource. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4392,7 +4425,7 @@ function _deleteBackupConfiguration(resourceGroupName, name, options, callback) * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getBackupConfiguration(resourceGroupName, name, options, callback) { +function _updateBackupConfiguration(resourceGroupName, name, request, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -4424,6 +4457,9 @@ function _getBackupConfiguration(resourceGroupName, name, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (request === null || request === undefined) { + throw new Error('request cannot be null or undefined.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -4439,7 +4475,7 @@ function _getBackupConfiguration(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -4451,7 +4487,7 @@ function _getBackupConfiguration(resourceGroupName, name, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4469,7 +4505,21 @@ function _getBackupConfiguration(resourceGroupName, name, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (request !== null && request !== undefined) { + let requestModelMapper = new client.models['BackupRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, request, 'request'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(request, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -4528,22 +4578,15 @@ function _getBackupConfiguration(resourceGroupName, name, options, callback) { } /** - * @summary Replaces the connection strings of an app. + * @summary Deletes the backup configuration of an app. * - * Replaces the connection strings of an app. + * Deletes the backup configuration of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {object} connectionStrings Connection strings of the app or - * deployment slot. See example. - * - * @param {object} [connectionStrings.properties] Connection strings. - * - * @param {string} [connectionStrings.kind] Kind of resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4555,15 +4598,13 @@ function _getBackupConfiguration(resourceGroupName, name, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ConnectionStringDictionary} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateConnectionStrings(resourceGroupName, name, connectionStrings, options, callback) { +function _deleteBackupConfiguration(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -4595,9 +4636,6 @@ function _updateConnectionStrings(resourceGroupName, name, connectionStrings, op if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (connectionStrings === null || connectionStrings === undefined) { - throw new Error('connectionStrings cannot be null or undefined.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -4613,7 +4651,7 @@ function _updateConnectionStrings(resourceGroupName, name, connectionStrings, op // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -4625,7 +4663,7 @@ function _updateConnectionStrings(resourceGroupName, name, connectionStrings, op // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4643,21 +4681,7 @@ function _updateConnectionStrings(resourceGroupName, name, connectionStrings, op } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (connectionStrings !== null && connectionStrings !== undefined) { - let requestModelMapper = new client.models['ConnectionStringDictionary']().mapper(); - requestModel = client.serialize(requestModelMapper, connectionStrings, 'connectionStrings'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(connectionStrings, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -4674,13 +4698,12 @@ function _updateConnectionStrings(resourceGroupName, name, connectionStrings, op try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { - let internalError = null; - if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; - error.code = internalError ? internalError.code : parsedErrorResponse.code; - error.message = internalError ? internalError.message : parsedErrorResponse.message; + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { @@ -4693,32 +4716,15 @@ function _updateConnectionStrings(resourceGroupName, name, connectionStrings, op // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ConnectionStringDictionary']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Gets the connection strings of an app. + * @summary Gets the backup configuration of an app. * - * Gets the connection strings of an app. + * Gets the backup configuration of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -4737,14 +4743,13 @@ function _updateConnectionStrings(resourceGroupName, name, connectionStrings, op * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ConnectionStringDictionary} for more - * information. + * See {@link BackupRequest} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listConnectionStrings(resourceGroupName, name, options, callback) { +function _getBackupConfiguration(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -4791,7 +4796,7 @@ function _listConnectionStrings(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -4864,7 +4869,7 @@ function _listConnectionStrings(resourceGroupName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ConnectionStringDictionary']().mapper(); + let resultMapper = new client.models['BackupRequest']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -4880,15 +4885,22 @@ function _listConnectionStrings(resourceGroupName, name, options, callback) { } /** - * @summary Gets the logging configuration of an app. + * @summary Replaces the connection strings of an app. * - * Gets the logging configuration of an app. + * Replaces the connection strings of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * + * @param {object} connectionStrings Connection strings of the app or + * deployment slot. See example. + * + * @param {object} [connectionStrings.properties] Connection strings. + * + * @param {string} [connectionStrings.kind] Kind of resource. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4901,13 +4913,14 @@ function _listConnectionStrings(resourceGroupName, name, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SiteLogsConfig} for more information. + * See {@link ConnectionStringDictionary} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callback) { +function _updateConnectionStrings(resourceGroupName, name, connectionStrings, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -4939,6 +4952,9 @@ function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callb if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (connectionStrings === null || connectionStrings === undefined) { + throw new Error('connectionStrings cannot be null or undefined.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -4954,7 +4970,7 @@ function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callb // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -4966,7 +4982,7 @@ function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callb // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4984,7 +5000,21 @@ function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callb } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (connectionStrings !== null && connectionStrings !== undefined) { + let requestModelMapper = new client.models['ConnectionStringDictionary']().mapper(); + requestModel = client.serialize(requestModelMapper, connectionStrings, 'connectionStrings'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(connectionStrings, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -5027,7 +5057,7 @@ function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callb parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SiteLogsConfig']().mapper(); + let resultMapper = new client.models['ConnectionStringDictionary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -5043,99 +5073,15 @@ function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callb } /** - * @summary Updates the logging configuration of an app. + * @summary Gets the connection strings of an app. * - * Updates the logging configuration of an app. + * Gets the connection strings of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {object} siteLogsConfig A SiteLogsConfig JSON object that contains - * the logging configuration to change in the "properties" property. - * - * @param {object} [siteLogsConfig.applicationLogs] Application logs - * configuration. - * - * @param {object} [siteLogsConfig.applicationLogs.fileSystem] Application logs - * to file system configuration. - * - * @param {string} [siteLogsConfig.applicationLogs.fileSystem.level] Log level. - * Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error' - * - * @param {object} [siteLogsConfig.applicationLogs.azureTableStorage] - * Application logs to azure table storage configuration. - * - * @param {string} [siteLogsConfig.applicationLogs.azureTableStorage.level] Log - * level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', - * 'Error' - * - * @param {string} siteLogsConfig.applicationLogs.azureTableStorage.sasUrl SAS - * URL to an Azure table with add/query/delete permissions. - * - * @param {object} [siteLogsConfig.applicationLogs.azureBlobStorage] - * Application logs to blob storage configuration. - * - * @param {string} [siteLogsConfig.applicationLogs.azureBlobStorage.level] Log - * level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', - * 'Error' - * - * @param {string} [siteLogsConfig.applicationLogs.azureBlobStorage.sasUrl] SAS - * url to a azure blob container with read/write/list/delete permissions. - * - * @param {number} - * [siteLogsConfig.applicationLogs.azureBlobStorage.retentionInDays] Retention - * in days. - * Remove blobs older than X days. - * 0 or lower means no retention. - * - * @param {object} [siteLogsConfig.httpLogs] HTTP logs configuration. - * - * @param {object} [siteLogsConfig.httpLogs.fileSystem] Http logs to file - * system configuration. - * - * @param {number} [siteLogsConfig.httpLogs.fileSystem.retentionInMb] Maximum - * size in megabytes that http log files can use. - * When reached old log files will be removed to make space for new ones. - * Value can range between 25 and 100. - * - * @param {number} [siteLogsConfig.httpLogs.fileSystem.retentionInDays] - * Retention in days. - * Remove files older than X days. - * 0 or lower means no retention. - * - * @param {boolean} [siteLogsConfig.httpLogs.fileSystem.enabled] True if - * configuration is enabled, false if it is disabled and null if configuration - * is not set. - * - * @param {object} [siteLogsConfig.httpLogs.azureBlobStorage] Http logs to - * azure blob storage configuration. - * - * @param {string} [siteLogsConfig.httpLogs.azureBlobStorage.sasUrl] SAS url to - * a azure blob container with read/write/list/delete permissions. - * - * @param {number} [siteLogsConfig.httpLogs.azureBlobStorage.retentionInDays] - * Retention in days. - * Remove blobs older than X days. - * 0 or lower means no retention. - * - * @param {boolean} [siteLogsConfig.httpLogs.azureBlobStorage.enabled] True if - * configuration is enabled, false if it is disabled and null if configuration - * is not set. - * - * @param {object} [siteLogsConfig.failedRequestsTracing] Failed requests - * tracing configuration. - * - * @param {object} [siteLogsConfig.detailedErrorMessages] Detailed error - * messages configuration. - * - * @param {boolean} [siteLogsConfig.detailedErrorMessages.enabled] True if - * configuration is enabled, false if it is disabled and null if configuration - * is not set. - * - * @param {string} [siteLogsConfig.kind] Kind of resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5148,13 +5094,14 @@ function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callb * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SiteLogsConfig} for more information. + * See {@link ConnectionStringDictionary} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, options, callback) { +function _listConnectionStrings(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -5186,9 +5133,6 @@ function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, op if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (siteLogsConfig === null || siteLogsConfig === undefined) { - throw new Error('siteLogsConfig cannot be null or undefined.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -5204,7 +5148,7 @@ function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, op // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -5216,7 +5160,7 @@ function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, op // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -5234,21 +5178,7 @@ function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, op } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (siteLogsConfig !== null && siteLogsConfig !== undefined) { - let requestModelMapper = new client.models['SiteLogsConfig']().mapper(); - requestModel = client.serialize(requestModelMapper, siteLogsConfig, 'siteLogsConfig'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(siteLogsConfig, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -5291,7 +5221,7 @@ function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, op parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SiteLogsConfig']().mapper(); + let resultMapper = new client.models['ConnectionStringDictionary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -5307,22 +5237,15 @@ function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, op } /** - * @summary Replaces the metadata of an app. + * @summary Gets the logging configuration of an app. * - * Replaces the metadata of an app. + * Gets the logging configuration of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {object} metadata Edited metadata of the app or deployment slot. See - * example. - * - * @param {object} [metadata.properties] Settings. - * - * @param {string} [metadata.kind] Kind of resource. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5335,13 +5258,13 @@ function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, op * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StringDictionary} for more information. + * See {@link SiteLogsConfig} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateMetadata(resourceGroupName, name, metadata, options, callback) { +function _getDiagnosticLogsConfiguration(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -5373,9 +5296,6 @@ function _updateMetadata(resourceGroupName, name, metadata, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (metadata === null || metadata === undefined) { - throw new Error('metadata cannot be null or undefined.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -5391,7 +5311,7 @@ function _updateMetadata(resourceGroupName, name, metadata, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -5403,7 +5323,7 @@ function _updateMetadata(resourceGroupName, name, metadata, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -5421,21 +5341,7 @@ function _updateMetadata(resourceGroupName, name, metadata, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (metadata !== null && metadata !== undefined) { - let requestModelMapper = new client.models['StringDictionary']().mapper(); - requestModel = client.serialize(requestModelMapper, metadata, 'metadata'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(metadata, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -5478,7 +5384,7 @@ function _updateMetadata(resourceGroupName, name, metadata, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StringDictionary']().mapper(); + let resultMapper = new client.models['SiteLogsConfig']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -5494,15 +5400,99 @@ function _updateMetadata(resourceGroupName, name, metadata, options, callback) { } /** - * @summary Gets the metadata of an app. + * @summary Updates the logging configuration of an app. * - * Gets the metadata of an app. + * Updates the logging configuration of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * + * @param {object} siteLogsConfig A SiteLogsConfig JSON object that contains + * the logging configuration to change in the "properties" property. + * + * @param {object} [siteLogsConfig.applicationLogs] Application logs + * configuration. + * + * @param {object} [siteLogsConfig.applicationLogs.fileSystem] Application logs + * to file system configuration. + * + * @param {string} [siteLogsConfig.applicationLogs.fileSystem.level] Log level. + * Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error' + * + * @param {object} [siteLogsConfig.applicationLogs.azureTableStorage] + * Application logs to azure table storage configuration. + * + * @param {string} [siteLogsConfig.applicationLogs.azureTableStorage.level] Log + * level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', + * 'Error' + * + * @param {string} siteLogsConfig.applicationLogs.azureTableStorage.sasUrl SAS + * URL to an Azure table with add/query/delete permissions. + * + * @param {object} [siteLogsConfig.applicationLogs.azureBlobStorage] + * Application logs to blob storage configuration. + * + * @param {string} [siteLogsConfig.applicationLogs.azureBlobStorage.level] Log + * level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', + * 'Error' + * + * @param {string} [siteLogsConfig.applicationLogs.azureBlobStorage.sasUrl] SAS + * url to a azure blob container with read/write/list/delete permissions. + * + * @param {number} + * [siteLogsConfig.applicationLogs.azureBlobStorage.retentionInDays] Retention + * in days. + * Remove blobs older than X days. + * 0 or lower means no retention. + * + * @param {object} [siteLogsConfig.httpLogs] HTTP logs configuration. + * + * @param {object} [siteLogsConfig.httpLogs.fileSystem] Http logs to file + * system configuration. + * + * @param {number} [siteLogsConfig.httpLogs.fileSystem.retentionInMb] Maximum + * size in megabytes that http log files can use. + * When reached old log files will be removed to make space for new ones. + * Value can range between 25 and 100. + * + * @param {number} [siteLogsConfig.httpLogs.fileSystem.retentionInDays] + * Retention in days. + * Remove files older than X days. + * 0 or lower means no retention. + * + * @param {boolean} [siteLogsConfig.httpLogs.fileSystem.enabled] True if + * configuration is enabled, false if it is disabled and null if configuration + * is not set. + * + * @param {object} [siteLogsConfig.httpLogs.azureBlobStorage] Http logs to + * azure blob storage configuration. + * + * @param {string} [siteLogsConfig.httpLogs.azureBlobStorage.sasUrl] SAS url to + * a azure blob container with read/write/list/delete permissions. + * + * @param {number} [siteLogsConfig.httpLogs.azureBlobStorage.retentionInDays] + * Retention in days. + * Remove blobs older than X days. + * 0 or lower means no retention. + * + * @param {boolean} [siteLogsConfig.httpLogs.azureBlobStorage.enabled] True if + * configuration is enabled, false if it is disabled and null if configuration + * is not set. + * + * @param {object} [siteLogsConfig.failedRequestsTracing] Failed requests + * tracing configuration. + * + * @param {object} [siteLogsConfig.detailedErrorMessages] Detailed error + * messages configuration. + * + * @param {boolean} [siteLogsConfig.detailedErrorMessages.enabled] True if + * configuration is enabled, false if it is disabled and null if configuration + * is not set. + * + * @param {string} [siteLogsConfig.kind] Kind of resource. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5515,13 +5505,13 @@ function _updateMetadata(resourceGroupName, name, metadata, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StringDictionary} for more information. + * See {@link SiteLogsConfig} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listMetadata(resourceGroupName, name, options, callback) { +function _updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -5553,6 +5543,9 @@ function _listMetadata(resourceGroupName, name, options, callback) { if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (siteLogsConfig === null || siteLogsConfig === undefined) { + throw new Error('siteLogsConfig cannot be null or undefined.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -5568,7 +5561,7 @@ function _listMetadata(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -5580,7 +5573,7 @@ function _listMetadata(resourceGroupName, name, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -5598,7 +5591,21 @@ function _listMetadata(resourceGroupName, name, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (siteLogsConfig !== null && siteLogsConfig !== undefined) { + let requestModelMapper = new client.models['SiteLogsConfig']().mapper(); + requestModel = client.serialize(requestModelMapper, siteLogsConfig, 'siteLogsConfig'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(siteLogsConfig, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -5641,7 +5648,7 @@ function _listMetadata(resourceGroupName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StringDictionary']().mapper(); + let resultMapper = new client.models['SiteLogsConfig']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -5656,118 +5663,22 @@ function _listMetadata(resourceGroupName, name, options, callback) { }); } - /** - * @summary Gets the Git/FTP publishing credentials of an app. + * @summary Replaces the metadata of an app. * - * Gets the Git/FTP publishing credentials of an app. + * Replaces the metadata of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link User} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _listPublishingCredentials(resourceGroupName, name, options, callback) { - /* jshint validthis: true */ - let client = this.client; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - - if (!callback) { - throw new Error('callback cannot be null.'); - } - - // Send request - this.beginListPublishingCredentials(resourceGroupName, name, options, (err, parsedResult, httpRequest, response) => { - if (err) return callback(err); - - let initialResult = new msRest.HttpOperationResponse(); - initialResult.request = httpRequest; - initialResult.response = response; - initialResult.body = response.body; - client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { - if (err) return callback(err); - - // Create Result - let result = null; - - httpRequest = pollingResult.request; - response = pollingResult.response; - let responseBody = pollingResult.body; - if (responseBody === '') responseBody = null; - - // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['User']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - - return callback(null, result, httpRequest, response); - }); - }); -} - -/** - * @summary Updates the Push settings associated with web app. - * - * Updates the Push settings associated with web app. - * - * @param {string} resourceGroupName Name of the resource group to which the - * resource belongs. - * - * @param {string} name Name of web app. - * - * @param {object} pushSettings Push settings associated with web app. - * - * @param {boolean} pushSettings.isPushEnabled Gets or sets a flag indicating - * whether the Push endpoint is enabled. - * - * @param {string} [pushSettings.tagWhitelistJson] Gets or sets a JSON string - * containing a list of tags that are whitelisted for use by the push - * registration endpoint. - * - * @param {string} [pushSettings.tagsRequiringAuth] Gets or sets a JSON string - * containing a list of tags that require user authentication to be used in the - * push registration endpoint. - * Tags can consist of alphanumeric characters and the following: - * '_', '@', '#', '.', ':', '-'. - * Validation should be performed at the PushRequestHandler. + * @param {object} metadata Edited metadata of the app or deployment slot. See + * example. * - * @param {string} [pushSettings.dynamicTagsJson] Gets or sets a JSON string - * containing a list of dynamic tags that will be evaluated from user claims in - * the push registration endpoint. + * @param {object} [metadata.properties] Settings. * - * @param {string} [pushSettings.kind] Kind of resource. + * @param {string} [metadata.kind] Kind of resource. * * @param {object} [options] Optional Parameters. * @@ -5781,13 +5692,13 @@ function _listPublishingCredentials(resourceGroupName, name, options, callback) * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PushSettings} for more information. + * See {@link StringDictionary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateSitePushSettings(resourceGroupName, name, pushSettings, options, callback) { +function _updateMetadata(resourceGroupName, name, metadata, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -5819,8 +5730,8 @@ function _updateSitePushSettings(resourceGroupName, name, pushSettings, options, if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (pushSettings === null || pushSettings === undefined) { - throw new Error('pushSettings cannot be null or undefined.'); + if (metadata === null || metadata === undefined) { + throw new Error('metadata cannot be null or undefined.'); } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -5837,7 +5748,7 @@ function _updateSitePushSettings(resourceGroupName, name, pushSettings, options, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -5871,14 +5782,14 @@ function _updateSitePushSettings(resourceGroupName, name, pushSettings, options, let requestContent = null; let requestModel = null; try { - if (pushSettings !== null && pushSettings !== undefined) { - let requestModelMapper = new client.models['PushSettings']().mapper(); - requestModel = client.serialize(requestModelMapper, pushSettings, 'pushSettings'); + if (metadata !== null && metadata !== undefined) { + let requestModelMapper = new client.models['StringDictionary']().mapper(); + requestModel = client.serialize(requestModelMapper, metadata, 'metadata'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(pushSettings, null, 2)}.`); + `payload - ${JSON.stringify(metadata, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -5924,7 +5835,7 @@ function _updateSitePushSettings(resourceGroupName, name, pushSettings, options, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PushSettings']().mapper(); + let resultMapper = new client.models['StringDictionary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -5940,14 +5851,14 @@ function _updateSitePushSettings(resourceGroupName, name, pushSettings, options, } /** - * @summary Gets the Push settings associated with web app. + * @summary Gets the metadata of an app. * - * Gets the Push settings associated with web app. + * Gets the metadata of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of web app. + * @param {string} name Name of the app. * * @param {object} [options] Optional Parameters. * @@ -5961,13 +5872,13 @@ function _updateSitePushSettings(resourceGroupName, name, pushSettings, options, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PushSettings} for more information. + * See {@link StringDictionary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSitePushSettings(resourceGroupName, name, options, callback) { +function _listMetadata(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -6014,7 +5925,7 @@ function _listSitePushSettings(resourceGroupName, name, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -6087,7 +5998,7 @@ function _listSitePushSettings(resourceGroupName, name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PushSettings']().mapper(); + let resultMapper = new client.models['StringDictionary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -6102,12 +6013,11 @@ function _listSitePushSettings(resourceGroupName, name, options, callback) { }); } + /** - * @summary Gets the names of app settings and connection strings that stick to - * the slot (not swapped). + * @summary Gets the Git/FTP publishing credentials of an app. * - * Gets the names of app settings and connection strings that stick to the slot - * (not swapped). + * Gets the Git/FTP publishing credentials of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -6126,14 +6036,115 @@ function _listSitePushSettings(resourceGroupName, name, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SlotConfigNamesResource} for more - * information. + * See {@link User} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSlotConfigurationNames(resourceGroupName, name, options, callback) { +function _listPublishingCredentials(resourceGroupName, name, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginListPublishingCredentials(resourceGroupName, name, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['User']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * @summary Updates the Push settings associated with web app. + * + * Updates the Push settings associated with web app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {object} pushSettings Push settings associated with web app. + * + * @param {boolean} pushSettings.isPushEnabled Gets or sets a flag indicating + * whether the Push endpoint is enabled. + * + * @param {string} [pushSettings.tagWhitelistJson] Gets or sets a JSON string + * containing a list of tags that are whitelisted for use by the push + * registration endpoint. + * + * @param {string} [pushSettings.tagsRequiringAuth] Gets or sets a JSON string + * containing a list of tags that require user authentication to be used in the + * push registration endpoint. + * Tags can consist of alphanumeric characters and the following: + * '_', '@', '#', '.', ':', '-'. + * Validation should be performed at the PushRequestHandler. + * + * @param {string} [pushSettings.dynamicTagsJson] Gets or sets a JSON string + * containing a list of dynamic tags that will be evaluated from user claims in + * the push registration endpoint. + * + * @param {string} [pushSettings.kind] Kind of resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PushSettings} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _updateSitePushSettings(resourceGroupName, name, pushSettings, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -6165,6 +6176,9 @@ function _listSlotConfigurationNames(resourceGroupName, name, options, callback) if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (pushSettings === null || pushSettings === undefined) { + throw new Error('pushSettings cannot be null or undefined.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -6180,7 +6194,7 @@ function _listSlotConfigurationNames(resourceGroupName, name, options, callback) // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -6192,7 +6206,7 @@ function _listSlotConfigurationNames(resourceGroupName, name, options, callback) // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -6210,7 +6224,21 @@ function _listSlotConfigurationNames(resourceGroupName, name, options, callback) } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (pushSettings !== null && pushSettings !== undefined) { + let requestModelMapper = new client.models['PushSettings']().mapper(); + requestModel = client.serialize(requestModelMapper, pushSettings, 'pushSettings'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(pushSettings, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -6253,7 +6281,7 @@ function _listSlotConfigurationNames(resourceGroupName, name, options, callback) parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SlotConfigNamesResource']().mapper(); + let resultMapper = new client.models['PushSettings']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -6269,27 +6297,14 @@ function _listSlotConfigurationNames(resourceGroupName, name, options, callback) } /** - * @summary Updates the names of application settings and connection string - * that remain with the slot during swap operation. + * @summary Gets the Push settings associated with web app. * - * Updates the names of application settings and connection string that remain - * with the slot during swap operation. + * Gets the Push settings associated with web app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. - * - * @param {object} slotConfigNames Names of application settings and connection - * strings. See example. - * - * @param {array} [slotConfigNames.connectionStringNames] List of connection - * string names. - * - * @param {array} [slotConfigNames.appSettingNames] List of application - * settings names. - * - * @param {string} [slotConfigNames.kind] Kind of resource. + * @param {string} name Name of web app. * * @param {object} [options] Optional Parameters. * @@ -6303,14 +6318,13 @@ function _listSlotConfigurationNames(resourceGroupName, name, options, callback) * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SlotConfigNamesResource} for more - * information. + * See {@link PushSettings} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, options, callback) { +function _listSitePushSettings(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -6342,9 +6356,6 @@ function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (slotConfigNames === null || slotConfigNames === undefined) { - throw new Error('slotConfigNames cannot be null or undefined.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -6360,7 +6371,7 @@ function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -6372,7 +6383,7 @@ function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PUT'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -6390,21 +6401,7 @@ function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (slotConfigNames !== null && slotConfigNames !== undefined) { - let requestModelMapper = new client.models['SlotConfigNamesResource']().mapper(); - requestModel = client.serialize(requestModelMapper, slotConfigNames, 'slotConfigNames'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(slotConfigNames, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -6447,7 +6444,7 @@ function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SlotConfigNamesResource']().mapper(); + let resultMapper = new client.models['PushSettings']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -6463,9 +6460,11 @@ function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, } /** - * @summary Gets a Swift Virtual Network connection. + * @summary Gets the names of app settings and connection strings that stick to + * the slot (not swapped). * - * Gets a Swift Virtual Network connection. + * Gets the names of app settings and connection strings that stick to the slot + * (not swapped). * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -6484,13 +6483,14 @@ function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SwiftVirtualNetwork} for more information. + * See {@link SlotConfigNamesResource} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSwiftVirtualNetworkConnection(resourceGroupName, name, options, callback) { +function _listSlotConfigurationNames(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -6537,7 +6537,7 @@ function _getSwiftVirtualNetworkConnection(resourceGroupName, name, options, cal // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -6610,7 +6610,7 @@ function _getSwiftVirtualNetworkConnection(resourceGroupName, name, options, cal parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SwiftVirtualNetwork']().mapper(); + let resultMapper = new client.models['SlotConfigNamesResource']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -6626,32 +6626,30 @@ function _getSwiftVirtualNetworkConnection(resourceGroupName, name, options, cal } /** - * @summary Integrates this Web App with a Virtual Network. This requires that - * 1) "swiftSupported" is true when doing a GET against this resource, and 2) - * that the target Subnet has already been delegated, and is not - * in use by another App Service Plan other than the one this App is in. + * @summary Updates the names of application settings and connection string + * that remain with the slot during swap operation. * - * Integrates this Web App with a Virtual Network. This requires that 1) - * "swiftSupported" is true when doing a GET against this resource, and 2) that - * the target Subnet has already been delegated, and is not - * in use by another App Service Plan other than the one this App is in. + * Updates the names of application settings and connection string that remain + * with the slot during swap operation. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * - * @param {object} connectionEnvelope Properties of the Virtual Network - * connection. See example. + * @param {object} slotConfigNames Names of application settings and connection + * strings. See example. * - * @param {string} [connectionEnvelope.subnetResourceId] The Virtual Network - * subnet's resource ID. This is the subnet that this Web App will join. This - * subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * @param {array} [slotConfigNames.connectionStringNames] List of connection + * string names. * - * @param {boolean} [connectionEnvelope.swiftSupported] A flag that specifies - * if the scale unit this Web App is on supports Swift integration. + * @param {array} [slotConfigNames.appSettingNames] List of application + * settings names. * - * @param {string} [connectionEnvelope.kind] Kind of resource. + * @param {array} [slotConfigNames.azureStorageConfigNames] List of external + * Azure storage account identifiers. + * + * @param {string} [slotConfigNames.kind] Kind of resource. * * @param {object} [options] Optional Parameters. * @@ -6665,13 +6663,14 @@ function _getSwiftVirtualNetworkConnection(resourceGroupName, name, options, cal * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SwiftVirtualNetwork} for more information. + * See {@link SlotConfigNamesResource} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createOrUpdateSwiftVirtualNetworkConnection(resourceGroupName, name, connectionEnvelope, options, callback) { +function _updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -6703,8 +6702,8 @@ function _createOrUpdateSwiftVirtualNetworkConnection(resourceGroupName, name, c if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (connectionEnvelope === null || connectionEnvelope === undefined) { - throw new Error('connectionEnvelope cannot be null or undefined.'); + if (slotConfigNames === null || slotConfigNames === undefined) { + throw new Error('slotConfigNames cannot be null or undefined.'); } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -6721,7 +6720,7 @@ function _createOrUpdateSwiftVirtualNetworkConnection(resourceGroupName, name, c // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); @@ -6755,14 +6754,375 @@ function _createOrUpdateSwiftVirtualNetworkConnection(resourceGroupName, name, c let requestContent = null; let requestModel = null; try { - if (connectionEnvelope !== null && connectionEnvelope !== undefined) { - let requestModelMapper = new client.models['SwiftVirtualNetwork']().mapper(); - requestModel = client.serialize(requestModelMapper, connectionEnvelope, 'connectionEnvelope'); + if (slotConfigNames !== null && slotConfigNames !== undefined) { + let requestModelMapper = new client.models['SlotConfigNamesResource']().mapper(); + requestModel = client.serialize(requestModelMapper, slotConfigNames, 'slotConfigNames'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(connectionEnvelope, null, 2)}.`); + `payload - ${JSON.stringify(slotConfigNames, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SlotConfigNamesResource']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets a Swift Virtual Network connection. + * + * Gets a Swift Virtual Network connection. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SwiftVirtualNetwork} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getSwiftVirtualNetworkConnection(resourceGroupName, name, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SwiftVirtualNetwork']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Integrates this Web App with a Virtual Network. This requires that + * 1) "swiftSupported" is true when doing a GET against this resource, and 2) + * that the target Subnet has already been delegated, and is not + * in use by another App Service Plan other than the one this App is in. + * + * Integrates this Web App with a Virtual Network. This requires that 1) + * "swiftSupported" is true when doing a GET against this resource, and 2) that + * the target Subnet has already been delegated, and is not + * in use by another App Service Plan other than the one this App is in. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} connectionEnvelope Properties of the Virtual Network + * connection. See example. + * + * @param {string} [connectionEnvelope.subnetResourceId] The Virtual Network + * subnet's resource ID. This is the subnet that this Web App will join. This + * subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * + * @param {boolean} [connectionEnvelope.swiftSupported] A flag that specifies + * if the scale unit this Web App is on supports Swift integration. + * + * @param {string} [connectionEnvelope.kind] Kind of resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SwiftVirtualNetwork} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdateSwiftVirtualNetworkConnection(resourceGroupName, name, connectionEnvelope, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (connectionEnvelope === null || connectionEnvelope === undefined) { + throw new Error('connectionEnvelope cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (connectionEnvelope !== null && connectionEnvelope !== undefined) { + let requestModelMapper = new client.models['SwiftVirtualNetwork']().mapper(); + requestModel = client.serialize(requestModelMapper, connectionEnvelope, 'connectionEnvelope'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(connectionEnvelope, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -7386,6 +7746,9 @@ function _getConfiguration(resourceGroupName, name, options, callback) { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -7787,6 +8150,9 @@ function _createOrUpdateConfiguration(resourceGroupName, name, siteConfig, optio * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -24814,6 +25180,9 @@ function _getSlot(resourceGroupName, name, slot, options, callback) { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -25427,6 +25796,9 @@ function _deleteSlot(resourceGroupName, name, slot, options, callback) { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -27083,11 +27455,490 @@ function _listBackupStatusSecretsSlot(resourceGroupName, name, backupId, request if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (backupId === null || backupId === undefined || typeof backupId.valueOf() !== 'string') { - throw new Error('backupId cannot be null or undefined and it must be of type string.'); - } - if (request === null || request === undefined) { - throw new Error('request cannot be null or undefined.'); + if (backupId === null || backupId === undefined || typeof backupId.valueOf() !== 'string') { + throw new Error('backupId cannot be null or undefined and it must be of type string.'); + } + if (request === null || request === undefined) { + throw new Error('request cannot be null or undefined.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{backupId}', encodeURIComponent(backupId)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (request !== null && request !== undefined) { + let requestModelMapper = new client.models['BackupRequest']().mapper(); + requestModel = client.serialize(requestModelMapper, request, 'request'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(request, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['BackupItem']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * @summary Restores a specific backup to another app (or deployment slot, if + * specified). + * + * Restores a specific backup to another app (or deployment slot, if + * specified). + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} backupId ID of the backup. + * + * @param {object} request Information on restore request . + * + * @param {string} request.storageAccountUrl SAS URL to the container. + * + * @param {string} [request.blobName] Name of a blob which contains the backup. + * + * @param {boolean} request.overwrite true if the restore + * operation can overwrite target app; otherwise, false. + * true is needed if trying to restore over an existing app. + * + * @param {string} [request.siteName] Name of an app. + * + * @param {array} [request.databases] Collection of databases which should be + * restored. This list has to match the list of databases included in the + * backup. + * + * @param {boolean} [request.ignoreConflictingHostNames] Changes a logic when + * restoring an app with custom domains. true to remove custom + * domains automatically. If false, custom domains are added to + * the app's object when it is being restored, but that might fail due to + * conflicts during the operation. + * + * @param {boolean} [request.ignoreDatabases] Ignore the databases and only + * restore the site content + * + * @param {string} [request.appServicePlan] Specify app service plan that will + * own restored site. + * + * @param {string} [request.operationType] Operation type. Possible values + * include: 'Default', 'Clone', 'Relocation', 'Snapshot', 'CloudFS' + * + * @param {boolean} [request.adjustConnectionStrings] true if + * SiteConfig.ConnectionStrings should be set in new app; otherwise, + * false. + * + * @param {string} [request.hostingEnvironment] App Service Environment name, + * if needed (only when restoring an app to an App Service Environment). + * + * @param {string} [request.kind] Kind of resource. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will restore a backup of the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _restoreSlot(resourceGroupName, name, backupId, request, slot, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginRestoreSlot(resourceGroupName, name, backupId, request, slot, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * @summary List the configurations of an app + * + * List the configurations of an app + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will return configuration for the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SiteConfigResourceCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listConfigurationsSlot(resourceGroupName, name, slot, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SiteConfigResourceCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Replaces the application settings of an app. + * + * Replaces the application settings of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} appSettings Application settings of the app. + * + * @param {object} [appSettings.properties] Settings. + * + * @param {string} [appSettings.kind] Kind of resource. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the application settings for the production + * slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link StringDictionary} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, slot, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (appSettings === null || appSettings === undefined) { + throw new Error('appSettings cannot be null or undefined.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); @@ -27107,10 +27958,9 @@ function _listBackupStatusSecretsSlot(resourceGroupName, name, backupId, request // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); - requestUrl = requestUrl.replace('{backupId}', encodeURIComponent(backupId)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -27121,7 +27971,7 @@ function _listBackupStatusSecretsSlot(resourceGroupName, name, backupId, request // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -27143,14 +27993,14 @@ function _listBackupStatusSecretsSlot(resourceGroupName, name, backupId, request let requestContent = null; let requestModel = null; try { - if (request !== null && request !== undefined) { - let requestModelMapper = new client.models['BackupRequest']().mapper(); - requestModel = client.serialize(requestModelMapper, request, 'request'); + if (appSettings !== null && appSettings !== undefined) { + let requestModelMapper = new client.models['StringDictionary']().mapper(); + requestModel = client.serialize(requestModelMapper, appSettings, 'appSettings'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(request, null, 2)}.`); + `payload - ${JSON.stringify(appSettings, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -27196,7 +28046,7 @@ function _listBackupStatusSecretsSlot(resourceGroupName, name, backupId, request parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['BackupItem']().mapper(); + let resultMapper = new client.models['StringDictionary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -27211,123 +28061,10 @@ function _listBackupStatusSecretsSlot(resourceGroupName, name, backupId, request }); } - -/** - * @summary Restores a specific backup to another app (or deployment slot, if - * specified). - * - * Restores a specific backup to another app (or deployment slot, if - * specified). - * - * @param {string} resourceGroupName Name of the resource group to which the - * resource belongs. - * - * @param {string} name Name of the app. - * - * @param {string} backupId ID of the backup. - * - * @param {object} request Information on restore request . - * - * @param {string} request.storageAccountUrl SAS URL to the container. - * - * @param {string} [request.blobName] Name of a blob which contains the backup. - * - * @param {boolean} request.overwrite true if the restore - * operation can overwrite target app; otherwise, false. - * true is needed if trying to restore over an existing app. - * - * @param {string} [request.siteName] Name of an app. - * - * @param {array} [request.databases] Collection of databases which should be - * restored. This list has to match the list of databases included in the - * backup. - * - * @param {boolean} [request.ignoreConflictingHostNames] Changes a logic when - * restoring an app with custom domains. true to remove custom - * domains automatically. If false, custom domains are added to - * the app's object when it is being restored, but that might fail due to - * conflicts during the operation. - * - * @param {boolean} [request.ignoreDatabases] Ignore the databases and only - * restore the site content - * - * @param {string} [request.appServicePlan] Specify app service plan that will - * own restored site. - * - * @param {string} [request.operationType] Operation type. Possible values - * include: 'Default', 'Clone', 'Relocation', 'Snapshot', 'CloudFS' - * - * @param {boolean} [request.adjustConnectionStrings] true if - * SiteConfig.ConnectionStrings should be set in new app; otherwise, - * false. - * - * @param {string} [request.hostingEnvironment] App Service Environment name, - * if needed (only when restoring an app to an App Service Environment). - * - * @param {string} [request.kind] Kind of resource. - * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will restore a backup of the production slot. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _restoreSlot(resourceGroupName, name, backupId, request, slot, options, callback) { - /* jshint validthis: true */ - let client = this.client; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - - if (!callback) { - throw new Error('callback cannot be null.'); - } - - // Send request - this.beginRestoreSlot(resourceGroupName, name, backupId, request, slot, options, (err, parsedResult, httpRequest, response) => { - if (err) return callback(err); - - let initialResult = new msRest.HttpOperationResponse(); - initialResult.request = httpRequest; - initialResult.response = response; - initialResult.body = response.body; - client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { - if (err) return callback(err); - - // Create Result - let result = null; - - httpRequest = pollingResult.request; - response = pollingResult.response; - let responseBody = pollingResult.body; - if (responseBody === '') responseBody = null; - - // Deserialize Response - - return callback(null, result, httpRequest, response); - }); - }); -} - /** - * @summary List the configurations of an app + * @summary Gets the application settings of an app. * - * List the configurations of an app + * Gets the application settings of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -27335,7 +28072,8 @@ function _restoreSlot(resourceGroupName, name, backupId, request, slot, options, * @param {string} name Name of the app. * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will return configuration for the production slot. + * specified, the API will get the application settings for the production + * slot. * * @param {object} [options] Optional Parameters. * @@ -27349,14 +28087,13 @@ function _restoreSlot(resourceGroupName, name, backupId, request, slot, options, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SiteConfigResourceCollection} for more - * information. + * See {@link StringDictionary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listConfigurationsSlot(resourceGroupName, name, slot, options, callback) { +function _listApplicationSettingsSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -27406,7 +28143,7 @@ function _listConfigurationsSlot(resourceGroupName, name, slot, options, callbac // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); @@ -27419,7 +28156,7 @@ function _listConfigurationsSlot(resourceGroupName, name, slot, options, callbac // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -27480,7 +28217,7 @@ function _listConfigurationsSlot(resourceGroupName, name, slot, options, callbac parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SiteConfigResourceCollection']().mapper(); + let resultMapper = new client.models['StringDictionary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -27496,24 +28233,163 @@ function _listConfigurationsSlot(resourceGroupName, name, slot, options, callbac } /** - * @summary Replaces the application settings of an app. + * @summary Updates the Authentication / Authorization settings associated with + * web app. * - * Replaces the application settings of an app. + * Updates the Authentication / Authorization settings associated with web app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of the app. + * @param {string} name Name of web app. * - * @param {object} appSettings Application settings of the app. + * @param {object} siteAuthSettings Auth settings associated with web app. * - * @param {object} [appSettings.properties] Settings. + * @param {boolean} [siteAuthSettings.enabled] true if the + * Authentication / Authorization feature is enabled for the current app; + * otherwise, false. * - * @param {string} [appSettings.kind] Kind of resource. + * @param {string} [siteAuthSettings.runtimeVersion] The RuntimeVersion of the + * Authentication / Authorization feature in use for the current app. + * The setting in this value can control the behavior of certain features in + * the Authentication / Authorization module. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will update the application settings for the production - * slot. + * @param {string} [siteAuthSettings.unauthenticatedClientAction] The action to + * take when an unauthenticated client attempts to access the app. Possible + * values include: 'RedirectToLoginPage', 'AllowAnonymous' + * + * @param {boolean} [siteAuthSettings.tokenStoreEnabled] true to + * durably store platform-specific security tokens that are obtained during + * login flows; otherwise, false. + * The default is false. + * + * @param {array} [siteAuthSettings.allowedExternalRedirectUrls] External URLs + * that can be redirected to as part of logging in or logging out of the app. + * Note that the query string part of the URL is ignored. + * This is an advanced setting typically only needed by Windows Store + * application backends. + * Note that URLs within the current domain are always implicitly allowed. + * + * @param {string} [siteAuthSettings.defaultProvider] The default + * authentication provider to use when multiple providers are configured. + * This setting is only needed if multiple providers are configured and the + * unauthenticated client + * action is set to "RedirectToLoginPage". Possible values include: + * 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', 'Twitter' + * + * @param {number} [siteAuthSettings.tokenRefreshExtensionHours] The number of + * hours after session token expiration that a session token can be used to + * call the token refresh API. The default is 72 hours. + * + * @param {string} [siteAuthSettings.clientId] The Client ID of this relying + * party application, known as the client_id. + * This setting is required for enabling OpenID Connection authentication with + * Azure Active Directory or + * other 3rd party OpenID Connect providers. + * More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html + * + * @param {string} [siteAuthSettings.clientSecret] The Client Secret of this + * relying party application (in Azure Active Directory, this is also referred + * to as the Key). + * This setting is optional. If no client secret is configured, the OpenID + * Connect implicit auth flow is used to authenticate end users. + * Otherwise, the OpenID Connect Authorization Code Flow is used to + * authenticate end users. + * More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html + * + * @param {string} [siteAuthSettings.issuer] The OpenID Connect Issuer URI that + * represents the entity which issues access tokens for this application. + * When using Azure Active Directory, this value is the URI of the directory + * tenant, e.g. https://sts.windows.net/{tenant-guid}/. + * This URI is a case-sensitive identifier for the token issuer. + * More information on OpenID Connect Discovery: + * http://openid.net/specs/openid-connect-discovery-1_0.html + * + * @param {boolean} [siteAuthSettings.validateIssuer] Gets a value indicating + * whether the issuer should be a valid HTTPS url and be validated as such. + * + * @param {array} [siteAuthSettings.allowedAudiences] Allowed audience values + * to consider when validating JWTs issued by + * Azure Active Directory. Note that the ClientID value is always + * considered an + * allowed audience, regardless of this setting. + * + * @param {array} [siteAuthSettings.additionalLoginParams] Login parameters to + * send to the OpenID Connect authorization endpoint when + * a user logs in. Each parameter must be in the form "key=value". + * + * @param {string} [siteAuthSettings.googleClientId] The OpenID Connect Client + * ID for the Google web application. + * This setting is required for enabling Google Sign-In. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/ + * + * @param {string} [siteAuthSettings.googleClientSecret] The client secret + * associated with the Google web application. + * This setting is required for enabling Google Sign-In. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/ + * + * @param {array} [siteAuthSettings.googleOAuthScopes] The OAuth 2.0 scopes + * that will be requested as part of Google Sign-In authentication. + * This setting is optional. If not specified, "openid", "profile", and "email" + * are used as default scopes. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/ + * + * @param {string} [siteAuthSettings.facebookAppId] The App ID of the Facebook + * app used for login. + * This setting is required for enabling Facebook Login. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login + * + * @param {string} [siteAuthSettings.facebookAppSecret] The App Secret of the + * Facebook app used for Facebook Login. + * This setting is required for enabling Facebook Login. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login + * + * @param {array} [siteAuthSettings.facebookOAuthScopes] The OAuth 2.0 scopes + * that will be requested as part of Facebook Login authentication. + * This setting is optional. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login + * + * @param {string} [siteAuthSettings.twitterConsumerKey] The OAuth 1.0a + * consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + * + * @param {string} [siteAuthSettings.twitterConsumerSecret] The OAuth 1.0a + * consumer secret of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + * + * @param {string} [siteAuthSettings.microsoftAccountClientId] The OAuth 2.0 + * client ID that was created for the app used for authentication. + * This setting is required for enabling Microsoft Account authentication. + * Microsoft Account OAuth documentation: + * https://dev.onedrive.com/auth/msa_oauth.htm + * + * @param {string} [siteAuthSettings.microsoftAccountClientSecret] The OAuth + * 2.0 client secret that was created for the app used for authentication. + * This setting is required for enabling Microsoft Account authentication. + * Microsoft Account OAuth documentation: + * https://dev.onedrive.com/auth/msa_oauth.htm + * + * @param {array} [siteAuthSettings.microsoftAccountOAuthScopes] The OAuth 2.0 + * scopes that will be requested as part of Microsoft Account authentication. + * This setting is optional. If not specified, "wl.basic" is used as the + * default scope. + * Microsoft Account Scopes and permissions documentation: + * https://msdn.microsoft.com/en-us/library/dn631845.aspx + * + * @param {string} [siteAuthSettings.kind] Kind of resource. + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. * * @param {object} [options] Optional Parameters. * @@ -27527,13 +28403,13 @@ function _listConfigurationsSlot(resourceGroupName, name, slot, options, callbac * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StringDictionary} for more information. + * See {@link SiteAuthSettings} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, slot, options, callback) { +function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -27565,8 +28441,8 @@ function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, sl if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (appSettings === null || appSettings === undefined) { - throw new Error('appSettings cannot be null or undefined.'); + if (siteAuthSettings === null || siteAuthSettings === undefined) { + throw new Error('siteAuthSettings cannot be null or undefined.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); @@ -27586,7 +28462,7 @@ function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, sl // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); @@ -27621,14 +28497,14 @@ function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, sl let requestContent = null; let requestModel = null; try { - if (appSettings !== null && appSettings !== undefined) { - let requestModelMapper = new client.models['StringDictionary']().mapper(); - requestModel = client.serialize(requestModelMapper, appSettings, 'appSettings'); + if (siteAuthSettings !== null && siteAuthSettings !== undefined) { + let requestModelMapper = new client.models['SiteAuthSettings']().mapper(); + requestModel = client.serialize(requestModelMapper, siteAuthSettings, 'siteAuthSettings'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(appSettings, null, 2)}.`); + `payload - ${JSON.stringify(siteAuthSettings, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -27674,7 +28550,7 @@ function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, sl parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StringDictionary']().mapper(); + let resultMapper = new client.models['SiteAuthSettings']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -27690,9 +28566,9 @@ function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, sl } /** - * @summary Gets the application settings of an app. + * @summary Gets the Authentication/Authorization settings of an app. * - * Gets the application settings of an app. + * Gets the Authentication/Authorization settings of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -27700,8 +28576,7 @@ function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, sl * @param {string} name Name of the app. * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the application settings for the production - * slot. + * specified, the API will get the settings for the production slot. * * @param {object} [options] Optional Parameters. * @@ -27715,13 +28590,13 @@ function _updateApplicationSettingsSlot(resourceGroupName, name, appSettings, sl * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link StringDictionary} for more information. + * See {@link SiteAuthSettings} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listApplicationSettingsSlot(resourceGroupName, name, slot, options, callback) { +function _getAuthSettingsSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -27771,7 +28646,7 @@ function _listApplicationSettingsSlot(resourceGroupName, name, slot, options, ca // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); @@ -27845,7 +28720,7 @@ function _listApplicationSettingsSlot(resourceGroupName, name, slot, options, ca parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['StringDictionary']().mapper(); + let resultMapper = new client.models['SiteAuthSettings']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -27861,163 +28736,24 @@ function _listApplicationSettingsSlot(resourceGroupName, name, slot, options, ca } /** - * @summary Updates the Authentication / Authorization settings associated with - * web app. + * @summary Updates the Azure storage account configurations of an app. * - * Updates the Authentication / Authorization settings associated with web app. + * Updates the Azure storage account configurations of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} name Name of web app. - * - * @param {object} siteAuthSettings Auth settings associated with web app. - * - * @param {boolean} [siteAuthSettings.enabled] true if the - * Authentication / Authorization feature is enabled for the current app; - * otherwise, false. - * - * @param {string} [siteAuthSettings.runtimeVersion] The RuntimeVersion of the - * Authentication / Authorization feature in use for the current app. - * The setting in this value can control the behavior of certain features in - * the Authentication / Authorization module. - * - * @param {string} [siteAuthSettings.unauthenticatedClientAction] The action to - * take when an unauthenticated client attempts to access the app. Possible - * values include: 'RedirectToLoginPage', 'AllowAnonymous' - * - * @param {boolean} [siteAuthSettings.tokenStoreEnabled] true to - * durably store platform-specific security tokens that are obtained during - * login flows; otherwise, false. - * The default is false. - * - * @param {array} [siteAuthSettings.allowedExternalRedirectUrls] External URLs - * that can be redirected to as part of logging in or logging out of the app. - * Note that the query string part of the URL is ignored. - * This is an advanced setting typically only needed by Windows Store - * application backends. - * Note that URLs within the current domain are always implicitly allowed. - * - * @param {string} [siteAuthSettings.defaultProvider] The default - * authentication provider to use when multiple providers are configured. - * This setting is only needed if multiple providers are configured and the - * unauthenticated client - * action is set to "RedirectToLoginPage". Possible values include: - * 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', 'Twitter' - * - * @param {number} [siteAuthSettings.tokenRefreshExtensionHours] The number of - * hours after session token expiration that a session token can be used to - * call the token refresh API. The default is 72 hours. - * - * @param {string} [siteAuthSettings.clientId] The Client ID of this relying - * party application, known as the client_id. - * This setting is required for enabling OpenID Connection authentication with - * Azure Active Directory or - * other 3rd party OpenID Connect providers. - * More information on OpenID Connect: - * http://openid.net/specs/openid-connect-core-1_0.html - * - * @param {string} [siteAuthSettings.clientSecret] The Client Secret of this - * relying party application (in Azure Active Directory, this is also referred - * to as the Key). - * This setting is optional. If no client secret is configured, the OpenID - * Connect implicit auth flow is used to authenticate end users. - * Otherwise, the OpenID Connect Authorization Code Flow is used to - * authenticate end users. - * More information on OpenID Connect: - * http://openid.net/specs/openid-connect-core-1_0.html - * - * @param {string} [siteAuthSettings.issuer] The OpenID Connect Issuer URI that - * represents the entity which issues access tokens for this application. - * When using Azure Active Directory, this value is the URI of the directory - * tenant, e.g. https://sts.windows.net/{tenant-guid}/. - * This URI is a case-sensitive identifier for the token issuer. - * More information on OpenID Connect Discovery: - * http://openid.net/specs/openid-connect-discovery-1_0.html - * - * @param {boolean} [siteAuthSettings.validateIssuer] Gets a value indicating - * whether the issuer should be a valid HTTPS url and be validated as such. - * - * @param {array} [siteAuthSettings.allowedAudiences] Allowed audience values - * to consider when validating JWTs issued by - * Azure Active Directory. Note that the ClientID value is always - * considered an - * allowed audience, regardless of this setting. - * - * @param {array} [siteAuthSettings.additionalLoginParams] Login parameters to - * send to the OpenID Connect authorization endpoint when - * a user logs in. Each parameter must be in the form "key=value". - * - * @param {string} [siteAuthSettings.googleClientId] The OpenID Connect Client - * ID for the Google web application. - * This setting is required for enabling Google Sign-In. - * Google Sign-In documentation: - * https://developers.google.com/identity/sign-in/web/ - * - * @param {string} [siteAuthSettings.googleClientSecret] The client secret - * associated with the Google web application. - * This setting is required for enabling Google Sign-In. - * Google Sign-In documentation: - * https://developers.google.com/identity/sign-in/web/ - * - * @param {array} [siteAuthSettings.googleOAuthScopes] The OAuth 2.0 scopes - * that will be requested as part of Google Sign-In authentication. - * This setting is optional. If not specified, "openid", "profile", and "email" - * are used as default scopes. - * Google Sign-In documentation: - * https://developers.google.com/identity/sign-in/web/ - * - * @param {string} [siteAuthSettings.facebookAppId] The App ID of the Facebook - * app used for login. - * This setting is required for enabling Facebook Login. - * Facebook Login documentation: - * https://developers.facebook.com/docs/facebook-login - * - * @param {string} [siteAuthSettings.facebookAppSecret] The App Secret of the - * Facebook app used for Facebook Login. - * This setting is required for enabling Facebook Login. - * Facebook Login documentation: - * https://developers.facebook.com/docs/facebook-login - * - * @param {array} [siteAuthSettings.facebookOAuthScopes] The OAuth 2.0 scopes - * that will be requested as part of Facebook Login authentication. - * This setting is optional. - * Facebook Login documentation: - * https://developers.facebook.com/docs/facebook-login - * - * @param {string} [siteAuthSettings.twitterConsumerKey] The OAuth 1.0a - * consumer key of the Twitter application used for sign-in. - * This setting is required for enabling Twitter Sign-In. - * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - * - * @param {string} [siteAuthSettings.twitterConsumerSecret] The OAuth 1.0a - * consumer secret of the Twitter application used for sign-in. - * This setting is required for enabling Twitter Sign-In. - * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - * - * @param {string} [siteAuthSettings.microsoftAccountClientId] The OAuth 2.0 - * client ID that was created for the app used for authentication. - * This setting is required for enabling Microsoft Account authentication. - * Microsoft Account OAuth documentation: - * https://dev.onedrive.com/auth/msa_oauth.htm + * @param {string} name Name of the app. * - * @param {string} [siteAuthSettings.microsoftAccountClientSecret] The OAuth - * 2.0 client secret that was created for the app used for authentication. - * This setting is required for enabling Microsoft Account authentication. - * Microsoft Account OAuth documentation: - * https://dev.onedrive.com/auth/msa_oauth.htm + * @param {object} azureStorageAccounts Azure storage accounts of the app. * - * @param {array} [siteAuthSettings.microsoftAccountOAuthScopes] The OAuth 2.0 - * scopes that will be requested as part of Microsoft Account authentication. - * This setting is optional. If not specified, "wl.basic" is used as the - * default scope. - * Microsoft Account Scopes and permissions documentation: - * https://msdn.microsoft.com/en-us/library/dn631845.aspx + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. * - * @param {string} [siteAuthSettings.kind] Kind of resource. + * @param {string} [azureStorageAccounts.kind] Kind of resource. * - * @param {string} slot Name of web app slot. If not specified then will - * default to production slot. + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. * * @param {object} [options] Optional Parameters. * @@ -28031,13 +28767,14 @@ function _listApplicationSettingsSlot(resourceGroupName, name, slot, options, ca * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SiteAuthSettings} for more information. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot, options, callback) { +function _updateAzureStorageAccountsSlot(resourceGroupName, name, azureStorageAccounts, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -28069,8 +28806,8 @@ function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (siteAuthSettings === null || siteAuthSettings === undefined) { - throw new Error('siteAuthSettings cannot be null or undefined.'); + if (azureStorageAccounts === null || azureStorageAccounts === undefined) { + throw new Error('azureStorageAccounts cannot be null or undefined.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); @@ -28090,7 +28827,7 @@ function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); @@ -28125,14 +28862,14 @@ function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot let requestContent = null; let requestModel = null; try { - if (siteAuthSettings !== null && siteAuthSettings !== undefined) { - let requestModelMapper = new client.models['SiteAuthSettings']().mapper(); - requestModel = client.serialize(requestModelMapper, siteAuthSettings, 'siteAuthSettings'); + if (azureStorageAccounts !== null && azureStorageAccounts !== undefined) { + let requestModelMapper = new client.models['AzureStoragePropertyDictionaryResource']().mapper(); + requestModel = client.serialize(requestModelMapper, azureStorageAccounts, 'azureStorageAccounts'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(siteAuthSettings, null, 2)}.`); + `payload - ${JSON.stringify(azureStorageAccounts, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -28178,7 +28915,7 @@ function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SiteAuthSettings']().mapper(); + let resultMapper = new client.models['AzureStoragePropertyDictionaryResource']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -28194,9 +28931,9 @@ function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot } /** - * @summary Gets the Authentication/Authorization settings of an app. + * @summary Gets the Azure storage account configurations of an app. * - * Gets the Authentication/Authorization settings of an app. + * Gets the Azure storage account configurations of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -28204,7 +28941,8 @@ function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot * @param {string} name Name of the app. * * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the settings for the production slot. + * specified, the API will update the Azure storage account configurations for + * the production slot. * * @param {object} [options] Optional Parameters. * @@ -28218,13 +28956,14 @@ function _updateAuthSettingsSlot(resourceGroupName, name, siteAuthSettings, slot * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SiteAuthSettings} for more information. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getAuthSettingsSlot(resourceGroupName, name, slot, options, callback) { +function _listAzureStorageAccountsSlot(resourceGroupName, name, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -28274,7 +29013,7 @@ function _getAuthSettingsSlot(resourceGroupName, name, slot, options, callback) // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); @@ -28348,7 +29087,7 @@ function _getAuthSettingsSlot(resourceGroupName, name, slot, options, callback) parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SiteAuthSettings']().mapper(); + let resultMapper = new client.models['AzureStoragePropertyDictionaryResource']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -31506,6 +32245,9 @@ function _getConfigurationSlot(resourceGroupName, name, slot, options, callback) * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -31914,6 +32656,9 @@ function _createOrUpdateConfigurationSlot(resourceGroupName, name, siteConfig, s * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -58588,6 +59333,9 @@ function _getWebJob(resourceGroupName, name, webJobName, options, callback) { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -61295,6 +62043,9 @@ function _beginInstallSiteExtension(resourceGroupName, name, siteExtensionId, op * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -71659,6 +72410,8 @@ class WebApps { this._listApplicationSettings = _listApplicationSettings; this._updateAuthSettings = _updateAuthSettings; this._getAuthSettings = _getAuthSettings; + this._updateAzureStorageAccounts = _updateAzureStorageAccounts; + this._listAzureStorageAccounts = _listAzureStorageAccounts; this._updateBackupConfiguration = _updateBackupConfiguration; this._deleteBackupConfiguration = _deleteBackupConfiguration; this._getBackupConfiguration = _getBackupConfiguration; @@ -71797,6 +72550,8 @@ class WebApps { this._listApplicationSettingsSlot = _listApplicationSettingsSlot; this._updateAuthSettingsSlot = _updateAuthSettingsSlot; this._getAuthSettingsSlot = _getAuthSettingsSlot; + this._updateAzureStorageAccountsSlot = _updateAzureStorageAccountsSlot; + this._listAzureStorageAccountsSlot = _listAzureStorageAccountsSlot; this._updateBackupConfigurationSlot = _updateBackupConfigurationSlot; this._deleteBackupConfigurationSlot = _deleteBackupConfigurationSlot; this._getBackupConfigurationSlot = _getBackupConfigurationSlot; @@ -72404,6 +73159,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -72796,6 +73554,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -73317,6 +74078,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -73697,6 +74461,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -75680,7 +76447,99 @@ class WebApps { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - updateAuthSettings(resourceGroupName, name, siteAuthSettings, options, optionalCallback) { + updateAuthSettings(resourceGroupName, name, siteAuthSettings, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._updateAuthSettings(resourceGroupName, name, siteAuthSettings, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateAuthSettings(resourceGroupName, name, siteAuthSettings, options, optionalCallback); + } + } + + /** + * @summary Gets the Authentication/Authorization settings of an app. + * + * Gets the Authentication/Authorization settings of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getAuthSettingsWithHttpOperationResponse(resourceGroupName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getAuthSettings(resourceGroupName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Authentication/Authorization settings of an app. + * + * Gets the Authentication/Authorization settings of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SiteAuthSettings} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link SiteAuthSettings} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getAuthSettings(resourceGroupName, name, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -75689,27 +76548,33 @@ class WebApps { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._updateAuthSettings(resourceGroupName, name, siteAuthSettings, options, (err, result, request, response) => { + self._getAuthSettings(resourceGroupName, name, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._updateAuthSettings(resourceGroupName, name, siteAuthSettings, options, optionalCallback); + return self._getAuthSettings(resourceGroupName, name, options, optionalCallback); } } /** - * @summary Gets the Authentication/Authorization settings of an app. + * @summary Updates the Azure storage account configurations of an app. * - * Gets the Authentication/Authorization settings of an app. + * Updates the Azure storage account configurations of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * + * @param {object} azureStorageAccounts Azure storage accounts of the app. + * + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. + * + * @param {string} [azureStorageAccounts.kind] Kind of resource. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -75717,15 +76582,15 @@ class WebApps { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getAuthSettingsWithHttpOperationResponse(resourceGroupName, name, options) { + updateAzureStorageAccountsWithHttpOperationResponse(resourceGroupName, name, azureStorageAccounts, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getAuthSettings(resourceGroupName, name, options, (err, result, request, response) => { + self._updateAzureStorageAccounts(resourceGroupName, name, azureStorageAccounts, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -75736,15 +76601,21 @@ class WebApps { } /** - * @summary Gets the Authentication/Authorization settings of an app. + * @summary Updates the Azure storage account configurations of an app. * - * Gets the Authentication/Authorization settings of an app. + * Updates the Azure storage account configurations of an app. * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} name Name of the app. * + * @param {object} azureStorageAccounts Azure storage accounts of the app. + * + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. + * + * @param {string} [azureStorageAccounts.kind] Kind of resource. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -75757,7 +76628,7 @@ class WebApps { * * {Promise} A promise is returned * - * @resolve {SiteAuthSettings} - The deserialized result object. + * @resolve {AzureStoragePropertyDictionaryResource} - The deserialized result object. * * @reject {Error} - The error object. * @@ -75766,13 +76637,14 @@ class WebApps { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link SiteAuthSettings} for more information. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getAuthSettings(resourceGroupName, name, options, optionalCallback) { + updateAzureStorageAccounts(resourceGroupName, name, azureStorageAccounts, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -75781,14 +76653,107 @@ class WebApps { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getAuthSettings(resourceGroupName, name, options, (err, result, request, response) => { + self._updateAzureStorageAccounts(resourceGroupName, name, azureStorageAccounts, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getAuthSettings(resourceGroupName, name, options, optionalCallback); + return self._updateAzureStorageAccounts(resourceGroupName, name, azureStorageAccounts, options, optionalCallback); + } + } + + /** + * @summary Gets the Azure storage account configurations of an app. + * + * Gets the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listAzureStorageAccountsWithHttpOperationResponse(resourceGroupName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listAzureStorageAccounts(resourceGroupName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Azure storage account configurations of an app. + * + * Gets the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AzureStoragePropertyDictionaryResource} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listAzureStorageAccounts(resourceGroupName, name, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listAzureStorageAccounts(resourceGroupName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listAzureStorageAccounts(resourceGroupName, name, options, optionalCallback); } } @@ -77323,6 +78288,9 @@ class WebApps { * @param {array} [slotConfigNames.appSettingNames] List of application * settings names. * + * @param {array} [slotConfigNames.azureStorageConfigNames] List of external + * Azure storage account identifiers. + * * @param {string} [slotConfigNames.kind] Kind of resource. * * @param {object} [options] Optional Parameters. @@ -77371,6 +78339,9 @@ class WebApps { * @param {array} [slotConfigNames.appSettingNames] List of application * settings names. * + * @param {array} [slotConfigNames.azureStorageConfigNames] List of external + * Azure storage account identifiers. + * * @param {string} [slotConfigNames.kind] Kind of resource. * * @param {object} [options] Optional Parameters. @@ -78013,6 +78984,9 @@ class WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -78269,6 +79243,9 @@ class WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -78547,6 +79524,9 @@ class WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -78803,6 +79783,9 @@ class WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -89878,6 +90861,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -90273,6 +91259,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -90803,6 +91792,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -91186,6 +92178,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -93366,6 +94361,220 @@ class WebApps { } } + /** + * @summary Updates the Azure storage account configurations of an app. + * + * Updates the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} azureStorageAccounts Azure storage accounts of the app. + * + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. + * + * @param {string} [azureStorageAccounts.kind] Kind of resource. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateAzureStorageAccountsSlotWithHttpOperationResponse(resourceGroupName, name, azureStorageAccounts, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._updateAzureStorageAccountsSlot(resourceGroupName, name, azureStorageAccounts, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Updates the Azure storage account configurations of an app. + * + * Updates the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} azureStorageAccounts Azure storage accounts of the app. + * + * @param {object} [azureStorageAccounts.properties] Azure storage accounts. + * + * @param {string} [azureStorageAccounts.kind] Kind of resource. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AzureStoragePropertyDictionaryResource} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + updateAzureStorageAccountsSlot(resourceGroupName, name, azureStorageAccounts, slot, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._updateAzureStorageAccountsSlot(resourceGroupName, name, azureStorageAccounts, slot, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateAzureStorageAccountsSlot(resourceGroupName, name, azureStorageAccounts, slot, options, optionalCallback); + } + } + + /** + * @summary Gets the Azure storage account configurations of an app. + * + * Gets the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listAzureStorageAccountsSlotWithHttpOperationResponse(resourceGroupName, name, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listAzureStorageAccountsSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the Azure storage account configurations of an app. + * + * Gets the Azure storage account configurations of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update the Azure storage account configurations for + * the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AzureStoragePropertyDictionaryResource} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AzureStoragePropertyDictionaryResource} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listAzureStorageAccountsSlot(resourceGroupName, name, slot, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listAzureStorageAccountsSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listAzureStorageAccountsSlot(resourceGroupName, name, slot, options, optionalCallback); + } + } + /** * @summary Updates the backup configuration of an app. * @@ -95489,6 +96698,9 @@ class WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -95748,6 +96960,9 @@ class WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * * @param {array} [siteConfig.connectionStrings] Connection strings. * * @param {array} [siteConfig.handlerMappings] Handler mappings. @@ -96029,264 +97244,270 @@ class WebApps { * * @param {array} [siteConfig.appSettings] Application settings. * - * @param {array} [siteConfig.connectionStrings] Connection strings. - * - * @param {array} [siteConfig.handlerMappings] Handler mappings. - * - * @param {string} [siteConfig.documentRoot] Document root. - * - * @param {string} [siteConfig.scmType] SCM type. Possible values include: - * 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', - * 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive', - * 'VSO' - * - * @param {boolean} [siteConfig.use32BitWorkerProcess] true to use - * 32-bit worker process; otherwise, false. - * - * @param {boolean} [siteConfig.webSocketsEnabled] true if - * WebSocket is enabled; otherwise, false. - * - * @param {boolean} [siteConfig.alwaysOn] true if Always On is - * enabled; otherwise, false. - * - * @param {string} [siteConfig.javaVersion] Java version. - * - * @param {string} [siteConfig.javaContainer] Java container. - * - * @param {string} [siteConfig.javaContainerVersion] Java container version. - * - * @param {string} [siteConfig.appCommandLine] App command line to launch. - * - * @param {string} [siteConfig.managedPipelineMode] Managed pipeline mode. - * Possible values include: 'Integrated', 'Classic' - * - * @param {array} [siteConfig.virtualApplications] Virtual applications. - * - * @param {string} [siteConfig.loadBalancing] Site load balancing. Possible - * values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - * 'WeightedTotalTraffic', 'RequestHash' - * - * @param {object} [siteConfig.experiments] This is work around for polymophic - * types. - * - * @param {array} [siteConfig.experiments.rampUpRules] List of ramp-up rules. - * - * @param {object} [siteConfig.limits] Site limits. - * - * @param {number} [siteConfig.limits.maxPercentageCpu] Maximum allowed CPU - * usage percentage. - * - * @param {number} [siteConfig.limits.maxMemoryInMb] Maximum allowed memory - * usage in MB. - * - * @param {number} [siteConfig.limits.maxDiskSizeInMb] Maximum allowed disk - * size usage in MB. - * - * @param {boolean} [siteConfig.autoHealEnabled] true if Auto Heal - * is enabled; otherwise, false. - * - * @param {object} [siteConfig.autoHealRules] Auto Heal rules. - * - * @param {object} [siteConfig.autoHealRules.triggers] Conditions that describe - * when to execute the auto-heal actions. - * - * @param {object} [siteConfig.autoHealRules.triggers.requests] A rule based on - * total requests. - * - * @param {number} [siteConfig.autoHealRules.triggers.requests.count] Request - * Count. - * - * @param {string} [siteConfig.autoHealRules.triggers.requests.timeInterval] - * Time interval. - * - * @param {number} [siteConfig.autoHealRules.triggers.privateBytesInKB] A rule - * based on private bytes. - * - * @param {array} [siteConfig.autoHealRules.triggers.statusCodes] A rule based - * on status codes. - * - * @param {object} [siteConfig.autoHealRules.triggers.slowRequests] A rule - * based on request execution time. - * - * @param {string} [siteConfig.autoHealRules.triggers.slowRequests.timeTaken] - * Time taken. - * - * @param {number} [siteConfig.autoHealRules.triggers.slowRequests.count] - * Request Count. - * - * @param {string} - * [siteConfig.autoHealRules.triggers.slowRequests.timeInterval] Time interval. - * - * @param {object} [siteConfig.autoHealRules.actions] Actions to be executed - * when a rule is triggered. - * - * @param {string} [siteConfig.autoHealRules.actions.actionType] Predefined - * action to be taken. Possible values include: 'Recycle', 'LogEvent', - * 'CustomAction' - * - * @param {object} [siteConfig.autoHealRules.actions.customAction] Custom - * action to be taken. - * - * @param {string} [siteConfig.autoHealRules.actions.customAction.exe] - * Executable to be run. - * - * @param {string} [siteConfig.autoHealRules.actions.customAction.parameters] - * Parameters for the executable. - * - * @param {string} [siteConfig.autoHealRules.actions.minProcessExecutionTime] - * Minimum time the process must execute - * before taking the action - * - * @param {string} [siteConfig.tracingOptions] Tracing options. - * - * @param {string} [siteConfig.vnetName] Virtual Network name. - * - * @param {object} [siteConfig.cors] Cross-Origin Resource Sharing (CORS) - * settings. - * - * @param {array} [siteConfig.cors.allowedOrigins] Gets or sets the list of - * origins that should be allowed to make cross-origin - * calls (for example: http://example.com:12345). Use "*" to allow all. - * - * @param {object} [siteConfig.push] Push endpoint settings. - * - * @param {boolean} siteConfig.push.isPushEnabled Gets or sets a flag - * indicating whether the Push endpoint is enabled. - * - * @param {string} [siteConfig.push.tagWhitelistJson] Gets or sets a JSON - * string containing a list of tags that are whitelisted for use by the push - * registration endpoint. - * - * @param {string} [siteConfig.push.tagsRequiringAuth] Gets or sets a JSON - * string containing a list of tags that require user authentication to be used - * in the push registration endpoint. - * Tags can consist of alphanumeric characters and the following: - * '_', '@', '#', '.', ':', '-'. - * Validation should be performed at the PushRequestHandler. - * - * @param {string} [siteConfig.push.dynamicTagsJson] Gets or sets a JSON string - * containing a list of dynamic tags that will be evaluated from user claims in - * the push registration endpoint. - * - * @param {string} [siteConfig.push.kind] Kind of resource. - * - * @param {object} [siteConfig.apiDefinition] Information about the formal API - * definition for the app. - * - * @param {string} [siteConfig.apiDefinition.url] The URL of the API - * definition. - * - * @param {string} [siteConfig.autoSwapSlotName] Auto-swap slot name. - * - * @param {boolean} [siteConfig.localMySqlEnabled] true to enable - * local MySQL; otherwise, false. - * - * @param {number} [siteConfig.managedServiceIdentityId] Managed Service - * Identity Id - * - * @param {number} [siteConfig.xManagedServiceIdentityId] Explicit Managed - * Service Identity Id - * - * @param {array} [siteConfig.ipSecurityRestrictions] IP security restrictions. - * - * @param {boolean} [siteConfig.http20Enabled] Http20Enabled: configures a web - * site to allow clients to connect over http2.0 - * - * @param {string} [siteConfig.minTlsVersion] MinTlsVersion: configures the - * minimum version of TLS required for SSL requests. Possible values include: - * '1.0', '1.1', '1.2' - * - * @param {string} [siteConfig.ftpsState] State of FTP / FTPS service. Possible - * values include: 'AllAllowed', 'FtpsOnly', 'Disabled' - * - * @param {number} [siteConfig.reservedInstanceCount] Number of reserved - * instances. - * This setting only applies to the Consumption Plan - * - * @param {string} [siteConfig.kind] Kind of resource. - * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will update configuration for the production slot. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - updateConfigurationSlotWithHttpOperationResponse(resourceGroupName, name, siteConfig, slot, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._updateConfigurationSlot(resourceGroupName, name, siteConfig, slot, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Updates the configuration of an app. - * - * Updates the configuration of an app. - * - * @param {string} resourceGroupName Name of the resource group to which the - * resource belongs. - * - * @param {string} name Name of the app. - * - * @param {object} siteConfig JSON representation of a SiteConfig object. See - * example. - * - * @param {number} [siteConfig.numberOfWorkers] Number of workers. - * - * @param {array} [siteConfig.defaultDocuments] Default documents. - * - * @param {string} [siteConfig.netFrameworkVersion] .NET Framework version. - * - * @param {string} [siteConfig.phpVersion] Version of PHP. - * - * @param {string} [siteConfig.pythonVersion] Version of Python. - * - * @param {string} [siteConfig.nodeVersion] Version of Node.js. - * - * @param {string} [siteConfig.linuxFxVersion] Linux App Framework and version - * - * @param {string} [siteConfig.windowsFxVersion] Xenon App Framework and - * version - * - * @param {boolean} [siteConfig.requestTracingEnabled] true if - * request tracing is enabled; otherwise, false. - * - * @param {date} [siteConfig.requestTracingExpirationTime] Request tracing - * expiration time. - * - * @param {boolean} [siteConfig.remoteDebuggingEnabled] true if - * remote debugging is enabled; otherwise, false. - * - * @param {string} [siteConfig.remoteDebuggingVersion] Remote debugging - * version. - * - * @param {boolean} [siteConfig.httpLoggingEnabled] true if HTTP - * logging is enabled; otherwise, false. - * - * @param {number} [siteConfig.logsDirectorySizeLimit] HTTP logs directory size - * limit. - * - * @param {boolean} [siteConfig.detailedErrorLoggingEnabled] true - * if detailed error logging is enabled; otherwise, false. - * - * @param {string} [siteConfig.publishingUsername] Publishing user name. - * - * @param {array} [siteConfig.appSettings] Application settings. + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. + * + * @param {array} [siteConfig.connectionStrings] Connection strings. + * + * @param {array} [siteConfig.handlerMappings] Handler mappings. + * + * @param {string} [siteConfig.documentRoot] Document root. + * + * @param {string} [siteConfig.scmType] SCM type. Possible values include: + * 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', + * 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive', + * 'VSO' + * + * @param {boolean} [siteConfig.use32BitWorkerProcess] true to use + * 32-bit worker process; otherwise, false. + * + * @param {boolean} [siteConfig.webSocketsEnabled] true if + * WebSocket is enabled; otherwise, false. + * + * @param {boolean} [siteConfig.alwaysOn] true if Always On is + * enabled; otherwise, false. + * + * @param {string} [siteConfig.javaVersion] Java version. + * + * @param {string} [siteConfig.javaContainer] Java container. + * + * @param {string} [siteConfig.javaContainerVersion] Java container version. + * + * @param {string} [siteConfig.appCommandLine] App command line to launch. + * + * @param {string} [siteConfig.managedPipelineMode] Managed pipeline mode. + * Possible values include: 'Integrated', 'Classic' + * + * @param {array} [siteConfig.virtualApplications] Virtual applications. + * + * @param {string} [siteConfig.loadBalancing] Site load balancing. Possible + * values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', + * 'WeightedTotalTraffic', 'RequestHash' + * + * @param {object} [siteConfig.experiments] This is work around for polymophic + * types. + * + * @param {array} [siteConfig.experiments.rampUpRules] List of ramp-up rules. + * + * @param {object} [siteConfig.limits] Site limits. + * + * @param {number} [siteConfig.limits.maxPercentageCpu] Maximum allowed CPU + * usage percentage. + * + * @param {number} [siteConfig.limits.maxMemoryInMb] Maximum allowed memory + * usage in MB. + * + * @param {number} [siteConfig.limits.maxDiskSizeInMb] Maximum allowed disk + * size usage in MB. + * + * @param {boolean} [siteConfig.autoHealEnabled] true if Auto Heal + * is enabled; otherwise, false. + * + * @param {object} [siteConfig.autoHealRules] Auto Heal rules. + * + * @param {object} [siteConfig.autoHealRules.triggers] Conditions that describe + * when to execute the auto-heal actions. + * + * @param {object} [siteConfig.autoHealRules.triggers.requests] A rule based on + * total requests. + * + * @param {number} [siteConfig.autoHealRules.triggers.requests.count] Request + * Count. + * + * @param {string} [siteConfig.autoHealRules.triggers.requests.timeInterval] + * Time interval. + * + * @param {number} [siteConfig.autoHealRules.triggers.privateBytesInKB] A rule + * based on private bytes. + * + * @param {array} [siteConfig.autoHealRules.triggers.statusCodes] A rule based + * on status codes. + * + * @param {object} [siteConfig.autoHealRules.triggers.slowRequests] A rule + * based on request execution time. + * + * @param {string} [siteConfig.autoHealRules.triggers.slowRequests.timeTaken] + * Time taken. + * + * @param {number} [siteConfig.autoHealRules.triggers.slowRequests.count] + * Request Count. + * + * @param {string} + * [siteConfig.autoHealRules.triggers.slowRequests.timeInterval] Time interval. + * + * @param {object} [siteConfig.autoHealRules.actions] Actions to be executed + * when a rule is triggered. + * + * @param {string} [siteConfig.autoHealRules.actions.actionType] Predefined + * action to be taken. Possible values include: 'Recycle', 'LogEvent', + * 'CustomAction' + * + * @param {object} [siteConfig.autoHealRules.actions.customAction] Custom + * action to be taken. + * + * @param {string} [siteConfig.autoHealRules.actions.customAction.exe] + * Executable to be run. + * + * @param {string} [siteConfig.autoHealRules.actions.customAction.parameters] + * Parameters for the executable. + * + * @param {string} [siteConfig.autoHealRules.actions.minProcessExecutionTime] + * Minimum time the process must execute + * before taking the action + * + * @param {string} [siteConfig.tracingOptions] Tracing options. + * + * @param {string} [siteConfig.vnetName] Virtual Network name. + * + * @param {object} [siteConfig.cors] Cross-Origin Resource Sharing (CORS) + * settings. + * + * @param {array} [siteConfig.cors.allowedOrigins] Gets or sets the list of + * origins that should be allowed to make cross-origin + * calls (for example: http://example.com:12345). Use "*" to allow all. + * + * @param {object} [siteConfig.push] Push endpoint settings. + * + * @param {boolean} siteConfig.push.isPushEnabled Gets or sets a flag + * indicating whether the Push endpoint is enabled. + * + * @param {string} [siteConfig.push.tagWhitelistJson] Gets or sets a JSON + * string containing a list of tags that are whitelisted for use by the push + * registration endpoint. + * + * @param {string} [siteConfig.push.tagsRequiringAuth] Gets or sets a JSON + * string containing a list of tags that require user authentication to be used + * in the push registration endpoint. + * Tags can consist of alphanumeric characters and the following: + * '_', '@', '#', '.', ':', '-'. + * Validation should be performed at the PushRequestHandler. + * + * @param {string} [siteConfig.push.dynamicTagsJson] Gets or sets a JSON string + * containing a list of dynamic tags that will be evaluated from user claims in + * the push registration endpoint. + * + * @param {string} [siteConfig.push.kind] Kind of resource. + * + * @param {object} [siteConfig.apiDefinition] Information about the formal API + * definition for the app. + * + * @param {string} [siteConfig.apiDefinition.url] The URL of the API + * definition. + * + * @param {string} [siteConfig.autoSwapSlotName] Auto-swap slot name. + * + * @param {boolean} [siteConfig.localMySqlEnabled] true to enable + * local MySQL; otherwise, false. + * + * @param {number} [siteConfig.managedServiceIdentityId] Managed Service + * Identity Id + * + * @param {number} [siteConfig.xManagedServiceIdentityId] Explicit Managed + * Service Identity Id + * + * @param {array} [siteConfig.ipSecurityRestrictions] IP security restrictions. + * + * @param {boolean} [siteConfig.http20Enabled] Http20Enabled: configures a web + * site to allow clients to connect over http2.0 + * + * @param {string} [siteConfig.minTlsVersion] MinTlsVersion: configures the + * minimum version of TLS required for SSL requests. Possible values include: + * '1.0', '1.1', '1.2' + * + * @param {string} [siteConfig.ftpsState] State of FTP / FTPS service. Possible + * values include: 'AllAllowed', 'FtpsOnly', 'Disabled' + * + * @param {number} [siteConfig.reservedInstanceCount] Number of reserved + * instances. + * This setting only applies to the Consumption Plan + * + * @param {string} [siteConfig.kind] Kind of resource. + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will update configuration for the production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateConfigurationSlotWithHttpOperationResponse(resourceGroupName, name, siteConfig, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._updateConfigurationSlot(resourceGroupName, name, siteConfig, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Updates the configuration of an app. + * + * Updates the configuration of an app. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of the app. + * + * @param {object} siteConfig JSON representation of a SiteConfig object. See + * example. + * + * @param {number} [siteConfig.numberOfWorkers] Number of workers. + * + * @param {array} [siteConfig.defaultDocuments] Default documents. + * + * @param {string} [siteConfig.netFrameworkVersion] .NET Framework version. + * + * @param {string} [siteConfig.phpVersion] Version of PHP. + * + * @param {string} [siteConfig.pythonVersion] Version of Python. + * + * @param {string} [siteConfig.nodeVersion] Version of Node.js. + * + * @param {string} [siteConfig.linuxFxVersion] Linux App Framework and version + * + * @param {string} [siteConfig.windowsFxVersion] Xenon App Framework and + * version + * + * @param {boolean} [siteConfig.requestTracingEnabled] true if + * request tracing is enabled; otherwise, false. + * + * @param {date} [siteConfig.requestTracingExpirationTime] Request tracing + * expiration time. + * + * @param {boolean} [siteConfig.remoteDebuggingEnabled] true if + * remote debugging is enabled; otherwise, false. + * + * @param {string} [siteConfig.remoteDebuggingVersion] Remote debugging + * version. + * + * @param {boolean} [siteConfig.httpLoggingEnabled] true if HTTP + * logging is enabled; otherwise, false. + * + * @param {number} [siteConfig.logsDirectorySizeLimit] HTTP logs directory size + * limit. + * + * @param {boolean} [siteConfig.detailedErrorLoggingEnabled] true + * if detailed error logging is enabled; otherwise, false. + * + * @param {string} [siteConfig.publishingUsername] Publishing user name. + * + * @param {array} [siteConfig.appSettings] Application settings. + * + * @param {object} [siteConfig.azureStorageAccounts] User-provided Azure + * storage accounts. * * @param {array} [siteConfig.connectionStrings] Connection strings. * @@ -113511,6 +114732,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -113903,6 +115127,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -115822,6 +117049,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * @@ -116217,6 +117447,9 @@ class WebApps { * * @param {array} [siteEnvelope.siteConfig.appSettings] Application settings. * + * @param {object} [siteEnvelope.siteConfig.azureStorageAccounts] User-provided + * Azure storage accounts. + * * @param {array} [siteEnvelope.siteConfig.connectionStrings] Connection * strings. * From 481de1ee799a972be4715e3f260f24913e4df1ff Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 9 Aug 2018 11:00:33 -0700 Subject: [PATCH 3/5] Generated from 45ce1882ee5af7ce8fa4f25cf5f871bc7aa9821b (#3296) Include DRSecondary endpoint for GetPublishingProfileXml --- .../lib/models/csmPublishingProfileOptions.js | 9 ++ .../websiteManagement2/lib/models/index.d.ts | 3 + .../lib/operations/index.d.ts | 76 +++++++--- .../lib/operations/webApps.js | 138 +++++++++++------- 4 files changed, 153 insertions(+), 73 deletions(-) diff --git a/lib/services/websiteManagement2/lib/models/csmPublishingProfileOptions.js b/lib/services/websiteManagement2/lib/models/csmPublishingProfileOptions.js index 1311235ff5..2ff11f2d9c 100644 --- a/lib/services/websiteManagement2/lib/models/csmPublishingProfileOptions.js +++ b/lib/services/websiteManagement2/lib/models/csmPublishingProfileOptions.js @@ -21,6 +21,8 @@ class CsmPublishingProfileOptions { * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @member {boolean} [includeDisasterRecoveryEndpoints] Include the + * DisasterRecover endpoint if true */ constructor() { } @@ -45,6 +47,13 @@ class CsmPublishingProfileOptions { type: { name: 'String' } + }, + includeDisasterRecoveryEndpoints: { + required: false, + serializedName: 'includeDisasterRecoveryEndpoints', + type: { + name: 'Boolean' + } } } } diff --git a/lib/services/websiteManagement2/lib/models/index.d.ts b/lib/services/websiteManagement2/lib/models/index.d.ts index c5b0b4418c..9d883034d8 100644 --- a/lib/services/websiteManagement2/lib/models/index.d.ts +++ b/lib/services/websiteManagement2/lib/models/index.d.ts @@ -4435,9 +4435,12 @@ export interface ContinuousWebJob extends ProxyOnlyResource { * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + * @member {boolean} [includeDisasterRecoveryEndpoints] Include the + * DisasterRecover endpoint if true */ export interface CsmPublishingProfileOptions { format?: string; + includeDisasterRecoveryEndpoints?: boolean; } /** diff --git a/lib/services/websiteManagement2/lib/operations/index.d.ts b/lib/services/websiteManagement2/lib/operations/index.d.ts index 5eec516d09..30b3193adf 100644 --- a/lib/services/websiteManagement2/lib/operations/index.d.ts +++ b/lib/services/websiteManagement2/lib/operations/index.d.ts @@ -21873,13 +21873,21 @@ export interface WebApps { * * @param {string} name Name of the app. * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -21889,7 +21897,7 @@ export interface WebApps { * * @reject {Error|ServiceError} - The error object. */ - listPublishingProfileXmlWithSecretsWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { format? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listPublishingProfileXmlWithSecretsWithHttpOperationResponse(resourceGroupName: string, name: string, publishingProfileOptions: models.CsmPublishingProfileOptions, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Gets the publishing profile for an app (or deployment slot, if @@ -21902,13 +21910,21 @@ export interface WebApps { * * @param {string} name Name of the app. * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -21933,9 +21949,9 @@ export interface WebApps { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listPublishingProfileXmlWithSecrets(resourceGroupName: string, name: string, options?: { format? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listPublishingProfileXmlWithSecrets(resourceGroupName: string, name: string, callback: ServiceCallback): void; - listPublishingProfileXmlWithSecrets(resourceGroupName: string, name: string, options: { format? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listPublishingProfileXmlWithSecrets(resourceGroupName: string, name: string, publishingProfileOptions: models.CsmPublishingProfileOptions, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listPublishingProfileXmlWithSecrets(resourceGroupName: string, name: string, publishingProfileOptions: models.CsmPublishingProfileOptions, callback: ServiceCallback): void; + listPublishingProfileXmlWithSecrets(resourceGroupName: string, name: string, publishingProfileOptions: models.CsmPublishingProfileOptions, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -36186,16 +36202,24 @@ export interface WebApps { * * @param {string} name Name of the app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the publishing profile for the production slot. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get the publishing profile for the production slot. + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36205,7 +36229,7 @@ export interface WebApps { * * @reject {Error|ServiceError} - The error object. */ - listPublishingProfileXmlWithSecretsSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { format? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listPublishingProfileXmlWithSecretsSlotWithHttpOperationResponse(resourceGroupName: string, name: string, publishingProfileOptions: models.CsmPublishingProfileOptions, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Gets the publishing profile for an app (or deployment slot, if @@ -36218,16 +36242,24 @@ export interface WebApps { * * @param {string} name Name of the app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the publishing profile for the production slot. - * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get the publishing profile for the production slot. + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -36252,9 +36284,9 @@ export interface WebApps { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listPublishingProfileXmlWithSecretsSlot(resourceGroupName: string, name: string, slot: string, options?: { format? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listPublishingProfileXmlWithSecretsSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; - listPublishingProfileXmlWithSecretsSlot(resourceGroupName: string, name: string, slot: string, options: { format? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listPublishingProfileXmlWithSecretsSlot(resourceGroupName: string, name: string, publishingProfileOptions: models.CsmPublishingProfileOptions, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listPublishingProfileXmlWithSecretsSlot(resourceGroupName: string, name: string, publishingProfileOptions: models.CsmPublishingProfileOptions, slot: string, callback: ServiceCallback): void; + listPublishingProfileXmlWithSecretsSlot(resourceGroupName: string, name: string, publishingProfileOptions: models.CsmPublishingProfileOptions, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** diff --git a/lib/services/websiteManagement2/lib/operations/webApps.js b/lib/services/websiteManagement2/lib/operations/webApps.js index f35d4fcc4a..7f26643d2e 100644 --- a/lib/services/websiteManagement2/lib/operations/webApps.js +++ b/lib/services/websiteManagement2/lib/operations/webApps.js @@ -23437,13 +23437,21 @@ function _deletePublicCertificate(resourceGroupName, name, publicCertificateName * * @param {string} name Name of the app. * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -23459,7 +23467,7 @@ function _deletePublicCertificate(resourceGroupName, name, publicCertificateName * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listPublishingProfileXmlWithSecrets(resourceGroupName, name, options, callback) { +function _listPublishingProfileXmlWithSecrets(resourceGroupName, name, publishingProfileOptions, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -23469,7 +23477,6 @@ function _listPublishingProfileXmlWithSecrets(resourceGroupName, name, options, if (!callback) { throw new Error('callback cannot be null.'); } - let format = (options && options.format !== undefined) ? options.format : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -23492,26 +23499,21 @@ function _listPublishingProfileXmlWithSecrets(resourceGroupName, name, options, if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (publishingProfileOptions === null || publishingProfileOptions === undefined) { + throw new Error('publishingProfileOptions cannot be null or undefined.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } - if (format !== null && format !== undefined && typeof format.valueOf() !== 'string') { - throw new Error('format must be of type string.'); - } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } - let publishingProfileOptions; - if (format !== null && format !== undefined) { - publishingProfileOptions = new client.models['CsmPublishingProfileOptions'](); - publishingProfileOptions.format = format; - } // Construct URL let baseUrl = this.client.baseUri; @@ -48345,16 +48347,24 @@ function _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCerti * * @param {string} name Name of the app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the publishing profile for the production slot. - * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get the publishing profile for the production slot. + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -48370,7 +48380,7 @@ function _deletePublicCertificateSlot(resourceGroupName, name, slot, publicCerti * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, options, callback) { +function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publishingProfileOptions, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -48380,7 +48390,6 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, if (!callback) { throw new Error('callback cannot be null.'); } - let format = (options && options.format !== undefined) ? options.format : undefined; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -48403,6 +48412,9 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, if (name === null || name === undefined || typeof name.valueOf() !== 'string') { throw new Error('name cannot be null or undefined and it must be of type string.'); } + if (publishingProfileOptions === null || publishingProfileOptions === undefined) { + throw new Error('publishingProfileOptions cannot be null or undefined.'); + } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -48412,20 +48424,12 @@ function _listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } - if (format !== null && format !== undefined && typeof format.valueOf() !== 'string') { - throw new Error('format must be of type string.'); - } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } - let publishingProfileOptions; - if (format !== null && format !== undefined) { - publishingProfileOptions = new client.models['CsmPublishingProfileOptions'](); - publishingProfileOptions.format = format; - } // Construct URL let baseUrl = this.client.baseUri; @@ -89462,13 +89466,21 @@ class WebApps { * * @param {string} name Name of the app. * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -89478,11 +89490,11 @@ class WebApps { * * @reject {Error} - The error object. */ - listPublishingProfileXmlWithSecretsWithHttpOperationResponse(resourceGroupName, name, options) { + listPublishingProfileXmlWithSecretsWithHttpOperationResponse(resourceGroupName, name, publishingProfileOptions, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listPublishingProfileXmlWithSecrets(resourceGroupName, name, options, (err, result, request, response) => { + self._listPublishingProfileXmlWithSecrets(resourceGroupName, name, publishingProfileOptions, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -89503,13 +89515,21 @@ class WebApps { * * @param {string} name Name of the app. * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -89534,7 +89554,7 @@ class WebApps { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listPublishingProfileXmlWithSecrets(resourceGroupName, name, options, optionalCallback) { + listPublishingProfileXmlWithSecrets(resourceGroupName, name, publishingProfileOptions, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -89543,14 +89563,14 @@ class WebApps { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listPublishingProfileXmlWithSecrets(resourceGroupName, name, options, (err, result, request, response) => { + self._listPublishingProfileXmlWithSecrets(resourceGroupName, name, publishingProfileOptions, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listPublishingProfileXmlWithSecrets(resourceGroupName, name, options, optionalCallback); + return self._listPublishingProfileXmlWithSecrets(resourceGroupName, name, publishingProfileOptions, options, optionalCallback); } } @@ -107447,16 +107467,24 @@ class WebApps { * * @param {string} name Name of the app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the publishing profile for the production slot. - * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get the publishing profile for the production slot. + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -107466,11 +107494,11 @@ class WebApps { * * @reject {Error} - The error object. */ - listPublishingProfileXmlWithSecretsSlotWithHttpOperationResponse(resourceGroupName, name, slot, options) { + listPublishingProfileXmlWithSecretsSlotWithHttpOperationResponse(resourceGroupName, name, publishingProfileOptions, slot, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + self._listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publishingProfileOptions, slot, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -107491,16 +107519,24 @@ class WebApps { * * @param {string} name Name of the app. * - * @param {string} slot Name of the deployment slot. If a slot is not - * specified, the API will get the publishing profile for the production slot. - * - * @param {object} [options] Optional Parameters. + * @param {object} publishingProfileOptions Specifies publishingProfileOptions + * for publishing profile. For example, use {"format": "FileZilla3"} to get a + * FileZilla publishing profile. * - * @param {string} [options.format] Name of the format. Valid values are: + * @param {string} [publishingProfileOptions.format] Name of the format. Valid + * values are: * FileZilla3 * WebDeploy -- default * Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' * + * @param {boolean} [publishingProfileOptions.includeDisasterRecoveryEndpoints] + * Include the DisasterRecover endpoint if true + * + * @param {string} slot Name of the deployment slot. If a slot is not + * specified, the API will get the publishing profile for the production slot. + * + * @param {object} [options] Optional Parameters. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -107525,7 +107561,7 @@ class WebApps { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, options, optionalCallback) { + listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publishingProfileOptions, slot, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -107534,14 +107570,14 @@ class WebApps { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + self._listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publishingProfileOptions, slot, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, options, optionalCallback); + return self._listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, publishingProfileOptions, slot, options, optionalCallback); } } From cb7f8d608fcf79cf8981d32f26b741e444edb3d0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 23 Aug 2018 11:30:00 -0700 Subject: [PATCH 4/5] =?UTF-8?q?[AutoPR=20web/resource-manager]=20Add=20Hyp?= =?UTF-8?q?erV=20property=20for=20AppServicePlan=20and=20Site=20model=20an?= =?UTF-8?q?d=20deprecating=E2=80=A6=20(#3372)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Generated from 45a695f12bca8bf8b3532a4d1c8f02571f83bf51 Add HyperV property for AppServicePlan and Site model and deprecating IsXenon property * Generated from 5a76ead1e9a3559ab3bce148ec8f282f068d18d1 Merge remote-tracking branch 'upstream/master' --- .../lib/models/appServicePlan.js | 13 ++- .../lib/models/appServicePlanPatchResource.js | 13 ++- .../lib/models/backupRequest.js | 8 ++ .../websiteManagement2/lib/models/index.d.ts | 22 +++- .../websiteManagement2/lib/models/site.js | 12 +- .../lib/models/sitePatchResource.js | 12 +- .../lib/operations/appServicePlans.js | 45 ++++++-- .../lib/operations/index.d.ts | 102 ++++++++++++++--- .../lib/operations/webApps.js | 108 +++++++++++++++--- 9 files changed, 282 insertions(+), 53 deletions(-) diff --git a/lib/services/websiteManagement2/lib/models/appServicePlan.js b/lib/services/websiteManagement2/lib/models/appServicePlan.js index 79f4b30d7d..6c77c375b2 100644 --- a/lib/services/websiteManagement2/lib/models/appServicePlan.js +++ b/lib/services/websiteManagement2/lib/models/appServicePlan.js @@ -53,7 +53,10 @@ class AppServicePlan extends models['Resource'] { * @member {string} [resourceGroup] Resource group of the App Service plan. * @member {boolean} [reserved] If Linux app service plan true, * false otherwise. Default value: false . - * @member {boolean} [isXenon] If Hyper-V container app service plan + * @member {boolean} [isXenon] Obsolete: If Hyper-V container app service + * plan true, false otherwise. Default value: false + * . + * @member {boolean} [hyperV] If Hyper-V container app service plan * true, false otherwise. Default value: false . * @member {number} [targetWorkerCount] Scaling worker count. * @member {number} [targetWorkerSizeId] Scaling worker size ID. @@ -267,6 +270,14 @@ class AppServicePlan extends models['Resource'] { name: 'Boolean' } }, + hyperV: { + required: false, + serializedName: 'properties.hyperV', + defaultValue: false, + type: { + name: 'Boolean' + } + }, targetWorkerCount: { required: false, serializedName: 'properties.targetWorkerCount', diff --git a/lib/services/websiteManagement2/lib/models/appServicePlanPatchResource.js b/lib/services/websiteManagement2/lib/models/appServicePlanPatchResource.js index bbeaed4a8f..fadfdd4068 100644 --- a/lib/services/websiteManagement2/lib/models/appServicePlanPatchResource.js +++ b/lib/services/websiteManagement2/lib/models/appServicePlanPatchResource.js @@ -53,7 +53,10 @@ class AppServicePlanPatchResource extends models['ProxyOnlyResource'] { * @member {string} [resourceGroup] Resource group of the App Service plan. * @member {boolean} [reserved] If Linux app service plan true, * false otherwise. Default value: false . - * @member {boolean} [isXenon] If Hyper-V container app service plan + * @member {boolean} [isXenon] Obsolete: If Hyper-V container app service + * plan true, false otherwise. Default value: false + * . + * @member {boolean} [hyperV] If Hyper-V container app service plan * true, false otherwise. Default value: false . * @member {number} [targetWorkerCount] Scaling worker count. * @member {number} [targetWorkerSizeId] Scaling worker size ID. @@ -226,6 +229,14 @@ class AppServicePlanPatchResource extends models['ProxyOnlyResource'] { name: 'Boolean' } }, + hyperV: { + required: false, + serializedName: 'properties.hyperV', + defaultValue: false, + type: { + name: 'Boolean' + } + }, targetWorkerCount: { required: false, serializedName: 'properties.targetWorkerCount', diff --git a/lib/services/websiteManagement2/lib/models/backupRequest.js b/lib/services/websiteManagement2/lib/models/backupRequest.js index c7b5da3f97..d2d1195789 100644 --- a/lib/services/websiteManagement2/lib/models/backupRequest.js +++ b/lib/services/websiteManagement2/lib/models/backupRequest.js @@ -20,6 +20,7 @@ const models = require('./index'); class BackupRequest extends models['ProxyOnlyResource'] { /** * Create a BackupRequest. + * @member {string} [backupName] Name of the backup. * @member {boolean} [enabled] True if the backup schedule is enabled (must * be included in that case), false if the backup schedule should be * disabled. @@ -93,6 +94,13 @@ class BackupRequest extends models['ProxyOnlyResource'] { name: 'String' } }, + backupName: { + required: false, + serializedName: 'properties.backupName', + type: { + name: 'String' + } + }, enabled: { required: false, serializedName: 'properties.enabled', diff --git a/lib/services/websiteManagement2/lib/models/index.d.ts b/lib/services/websiteManagement2/lib/models/index.d.ts index 9d883034d8..e89a87a9e4 100644 --- a/lib/services/websiteManagement2/lib/models/index.d.ts +++ b/lib/services/websiteManagement2/lib/models/index.d.ts @@ -1398,7 +1398,9 @@ export interface HostNameSslState { * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". * @member {boolean} [reserved] true if reserved; otherwise, * false. Default value: false . - * @member {boolean} [isXenon] Hyper-V sandbox. Default value: false . + * @member {boolean} [isXenon] Obsolete: Hyper-V sandbox. Default value: false + * . + * @member {boolean} [hyperV] Hyper-V sandbox. Default value: false . * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in UTC. * Read-only. * @member {object} [siteConfig] Configuration of the app. @@ -1657,6 +1659,7 @@ export interface Site extends Resource { serverFarmId?: string; reserved?: boolean; isXenon?: boolean; + hyperV?: boolean; readonly lastModifiedTimeUtc?: Date; siteConfig?: SiteConfig; readonly trafficManagerHostNames?: string[]; @@ -1794,7 +1797,9 @@ export interface SkuDescription { * @member {string} [resourceGroup] Resource group of the App Service plan. * @member {boolean} [reserved] If Linux app service plan true, * false otherwise. Default value: false . - * @member {boolean} [isXenon] If Hyper-V container app service plan + * @member {boolean} [isXenon] Obsolete: If Hyper-V container app service plan + * true, false otherwise. Default value: false . + * @member {boolean} [hyperV] If Hyper-V container app service plan * true, false otherwise. Default value: false . * @member {number} [targetWorkerCount] Scaling worker count. * @member {number} [targetWorkerSizeId] Scaling worker size ID. @@ -1838,6 +1843,7 @@ export interface AppServicePlan extends Resource { readonly resourceGroup?: string; reserved?: boolean; isXenon?: boolean; + hyperV?: boolean; targetWorkerCount?: number; targetWorkerSizeId?: number; readonly provisioningState?: string; @@ -4335,6 +4341,7 @@ export interface BackupSchedule { * @constructor * Description of a backup which will be performed. * + * @member {string} [backupName] Name of the backup. * @member {boolean} [enabled] True if the backup schedule is enabled (must be * included in that case), false if the backup schedule should be disabled. * @member {string} storageAccountUrl SAS URL to the container. @@ -4359,6 +4366,7 @@ export interface BackupSchedule { * @member {array} [databases] Databases included in the backup. */ export interface BackupRequest extends ProxyOnlyResource { + backupName?: string; enabled?: boolean; storageAccountUrl: string; backupSchedule?: BackupSchedule; @@ -5806,7 +5814,9 @@ export interface SiteLogsConfig extends ProxyOnlyResource { * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". * @member {boolean} [reserved] true if reserved; otherwise, * false. Default value: false . - * @member {boolean} [isXenon] Hyper-V sandbox. Default value: false . + * @member {boolean} [isXenon] Obsolete: Hyper-V sandbox. Default value: false + * . + * @member {boolean} [hyperV] Hyper-V sandbox. Default value: false . * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in UTC. * Read-only. * @member {object} [siteConfig] Configuration of the app. @@ -6057,6 +6067,7 @@ export interface SitePatchResource extends ProxyOnlyResource { serverFarmId?: string; reserved?: boolean; isXenon?: boolean; + hyperV?: boolean; readonly lastModifiedTimeUtc?: Date; siteConfig?: SiteConfig; readonly trafficManagerHostNames?: string[]; @@ -6886,7 +6897,9 @@ export interface WorkerPoolResource extends ProxyOnlyResource { * @member {string} [resourceGroup] Resource group of the App Service plan. * @member {boolean} [reserved] If Linux app service plan true, * false otherwise. Default value: false . - * @member {boolean} [isXenon] If Hyper-V container app service plan + * @member {boolean} [isXenon] Obsolete: If Hyper-V container app service plan + * true, false otherwise. Default value: false . + * @member {boolean} [hyperV] If Hyper-V container app service plan * true, false otherwise. Default value: false . * @member {number} [targetWorkerCount] Scaling worker count. * @member {number} [targetWorkerSizeId] Scaling worker size ID. @@ -6910,6 +6923,7 @@ export interface AppServicePlanPatchResource extends ProxyOnlyResource { readonly resourceGroup?: string; reserved?: boolean; isXenon?: boolean; + hyperV?: boolean; targetWorkerCount?: number; targetWorkerSizeId?: number; readonly provisioningState?: string; diff --git a/lib/services/websiteManagement2/lib/models/site.js b/lib/services/websiteManagement2/lib/models/site.js index bad3fa8eaa..10ef4cbd6d 100644 --- a/lib/services/websiteManagement2/lib/models/site.js +++ b/lib/services/websiteManagement2/lib/models/site.js @@ -42,7 +42,9 @@ class Site extends models['Resource'] { * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". * @member {boolean} [reserved] true if reserved; otherwise, * false. Default value: false . - * @member {boolean} [isXenon] Hyper-V sandbox. Default value: false . + * @member {boolean} [isXenon] Obsolete: Hyper-V sandbox. Default value: + * false . + * @member {boolean} [hyperV] Hyper-V sandbox. Default value: false . * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in * UTC. Read-only. * @member {object} [siteConfig] Configuration of the app. @@ -475,6 +477,14 @@ class Site extends models['Resource'] { name: 'Boolean' } }, + hyperV: { + required: false, + serializedName: 'properties.hyperV', + defaultValue: false, + type: { + name: 'Boolean' + } + }, lastModifiedTimeUtc: { required: false, readOnly: true, diff --git a/lib/services/websiteManagement2/lib/models/sitePatchResource.js b/lib/services/websiteManagement2/lib/models/sitePatchResource.js index 31ff62ab3c..39de10c15e 100644 --- a/lib/services/websiteManagement2/lib/models/sitePatchResource.js +++ b/lib/services/websiteManagement2/lib/models/sitePatchResource.js @@ -42,7 +42,9 @@ class SitePatchResource extends models['ProxyOnlyResource'] { * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". * @member {boolean} [reserved] true if reserved; otherwise, * false. Default value: false . - * @member {boolean} [isXenon] Hyper-V sandbox. Default value: false . + * @member {boolean} [isXenon] Obsolete: Hyper-V sandbox. Default value: + * false . + * @member {boolean} [hyperV] Hyper-V sandbox. Default value: false . * @member {date} [lastModifiedTimeUtc] Last time the app was modified, in * UTC. Read-only. * @member {object} [siteConfig] Configuration of the app. @@ -446,6 +448,14 @@ class SitePatchResource extends models['ProxyOnlyResource'] { name: 'Boolean' } }, + hyperV: { + required: false, + serializedName: 'properties.hyperV', + defaultValue: false, + type: { + name: 'Boolean' + } + }, lastModifiedTimeUtc: { required: false, readOnly: true, diff --git a/lib/services/websiteManagement2/lib/operations/appServicePlans.js b/lib/services/websiteManagement2/lib/operations/appServicePlans.js index 6c1c7d8852..0f4bac9ca1 100644 --- a/lib/services/websiteManagement2/lib/operations/appServicePlans.js +++ b/lib/services/websiteManagement2/lib/operations/appServicePlans.js @@ -525,7 +525,10 @@ function _get(resourceGroupName, name, options, callback) { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -827,7 +830,10 @@ function _deleteMethod(resourceGroupName, name, options, callback) { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -5119,7 +5125,10 @@ function _rebootWorker(resourceGroupName, name, workerName, options, callback) { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -6764,7 +6773,10 @@ class AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -6877,7 +6889,10 @@ class AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -7103,7 +7118,10 @@ class AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -7178,7 +7196,10 @@ class AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -9651,7 +9672,10 @@ class AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -9764,7 +9788,10 @@ class AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. diff --git a/lib/services/websiteManagement2/lib/operations/index.d.ts b/lib/services/websiteManagement2/lib/operations/index.d.ts index 30b3193adf..8dc83cd895 100644 --- a/lib/services/websiteManagement2/lib/operations/index.d.ts +++ b/lib/services/websiteManagement2/lib/operations/index.d.ts @@ -8974,7 +8974,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -9357,7 +9359,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -9839,7 +9843,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -10210,7 +10216,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -10739,6 +10747,8 @@ export interface WebApps { * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -10797,6 +10807,8 @@ export interface WebApps { * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -11083,6 +11095,8 @@ export interface WebApps { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -11148,6 +11162,8 @@ export interface WebApps { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -12150,6 +12166,8 @@ export interface WebApps { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -12207,6 +12225,8 @@ export interface WebApps { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -22912,7 +22932,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -23298,7 +23320,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -23789,7 +23813,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -24163,7 +24189,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -24707,6 +24735,8 @@ export interface WebApps { * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -24768,6 +24798,8 @@ export interface WebApps { * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -25075,6 +25107,8 @@ export interface WebApps { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -25143,6 +25177,8 @@ export interface WebApps { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -26204,6 +26240,8 @@ export interface WebApps { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -26265,6 +26303,8 @@ export interface WebApps { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -41669,7 +41709,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -42052,7 +42094,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -43662,7 +43706,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -44048,7 +44094,9 @@ export interface WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -55751,7 +55799,10 @@ export interface AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -55852,7 +55903,10 @@ export interface AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -56036,7 +56090,10 @@ export interface AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -56099,7 +56156,10 @@ export interface AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -57936,7 +57996,10 @@ export interface AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. @@ -58037,7 +58100,10 @@ export interface AppServicePlans { * @param {boolean} [appServicePlan.reserved] If Linux app service plan * true, false otherwise. * - * @param {boolean} [appServicePlan.isXenon] If Hyper-V container app service + * @param {boolean} [appServicePlan.isXenon] Obsolete: If Hyper-V container app + * service plan true, false otherwise. + * + * @param {boolean} [appServicePlan.hyperV] If Hyper-V container app service * plan true, false otherwise. * * @param {number} [appServicePlan.targetWorkerCount] Scaling worker count. diff --git a/lib/services/websiteManagement2/lib/operations/webApps.js b/lib/services/websiteManagement2/lib/operations/webApps.js index 7f26643d2e..c133ccf4c8 100644 --- a/lib/services/websiteManagement2/lib/operations/webApps.js +++ b/lib/services/websiteManagement2/lib/operations/webApps.js @@ -511,7 +511,9 @@ function _get(resourceGroupName, name, options, callback) { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -1117,7 +1119,9 @@ function _deleteMethod(resourceGroupName, name, options, callback) { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -1990,6 +1994,8 @@ function _applySlotConfigToProduction(resourceGroupName, name, slotSwapEntity, o * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -2694,6 +2700,8 @@ function _deleteBackup(resourceGroupName, name, backupId, options, callback) { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -4375,6 +4383,8 @@ function _listAzureStorageAccounts(resourceGroupName, name, options, callback) { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -25130,7 +25140,9 @@ function _getSlot(resourceGroupName, name, slot, options, callback) { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -25746,7 +25758,9 @@ function _deleteSlot(resourceGroupName, name, slot, options, callback) { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -26640,6 +26654,8 @@ function _applySlotConfigurationSlot(resourceGroupName, name, slotSwapEntity, sl * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -27372,6 +27388,8 @@ function _deleteBackupSlot(resourceGroupName, name, backupId, slot, options, cal * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -29116,6 +29134,8 @@ function _listAzureStorageAccountsSlot(resourceGroupName, name, slot, options, c * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -59285,7 +59305,9 @@ function _getWebJob(resourceGroupName, name, webJobName, options, callback) { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -61995,7 +62017,9 @@ function _beginInstallSiteExtension(resourceGroupName, name, siteExtensionId, op * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -73111,7 +73135,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -73506,7 +73532,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -74030,7 +74058,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -74413,7 +74443,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -75011,6 +75043,8 @@ class WebApps { * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -75081,6 +75115,8 @@ class WebApps { * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -75463,6 +75499,8 @@ class WebApps { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -75540,6 +75578,8 @@ class WebApps { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -76773,6 +76813,8 @@ class WebApps { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -76842,6 +76884,8 @@ class WebApps { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -90829,7 +90873,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -91227,7 +91273,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -91760,7 +91808,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -92146,7 +92196,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -92759,6 +92811,8 @@ class WebApps { * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -92832,6 +92886,8 @@ class WebApps { * @param {object} request Backup configuration. You can use the JSON response * from the POST action as input here. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -93235,6 +93291,8 @@ class WebApps { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -93315,6 +93373,8 @@ class WebApps { * * @param {object} request Information on backup request. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -94607,6 +94667,8 @@ class WebApps { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -94680,6 +94742,8 @@ class WebApps { * * @param {object} request Edited backup configuration. * + * @param {string} [request.backupName] Name of the backup. + * * @param {boolean} [request.enabled] True if the backup schedule is enabled * (must be included in that case), false if the backup schedule should be * disabled. @@ -114716,7 +114780,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -115111,7 +115177,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -117033,7 +117101,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * @@ -117431,7 +117501,9 @@ class WebApps { * @param {boolean} [siteEnvelope.reserved] true if reserved; * otherwise, false. * - * @param {boolean} [siteEnvelope.isXenon] Hyper-V sandbox. + * @param {boolean} [siteEnvelope.isXenon] Obsolete: Hyper-V sandbox. + * + * @param {boolean} [siteEnvelope.hyperV] Hyper-V sandbox. * * @param {object} [siteEnvelope.siteConfig] Configuration of the app. * From 9d325dad695aa962953033c620b11f0f7e26290b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 28 Aug 2018 09:08:28 -0700 Subject: [PATCH 5/5] [AutoPR web/resource-manager] WebApps - Add ResourceHealthMetadata.json to readme.md for SDK generation (#3390) * Generated from 1c9e1028cea9b1119b0fb396906d412c6d228c8e WebApps - Add ResourceHealthMetadata.json to readme.md for SDK generation * Generated from 4038e1418fea2b1092005a07b4ff72442d0038a1 Change deleted site model to be proxy only resource --- .../lib/models/deletedSite.js | 58 +- .../websiteManagement2/lib/models/index.d.ts | 76 +- .../websiteManagement2/lib/models/index.js | 4 +- .../lib/models/resourceHealthMetadata.js | 97 + .../resourceHealthMetadataCollection.js | 68 + .../lib/operations/index.d.ts | 679 +++++ .../lib/operations/index.js | 1 + .../resourceHealthMetadataOperations.js | 2482 +++++++++++++++++ .../lib/webSiteManagementClient.d.ts | 1 + .../lib/webSiteManagementClient.js | 1 + 10 files changed, 3436 insertions(+), 31 deletions(-) create mode 100644 lib/services/websiteManagement2/lib/models/resourceHealthMetadata.js create mode 100644 lib/services/websiteManagement2/lib/models/resourceHealthMetadataCollection.js create mode 100644 lib/services/websiteManagement2/lib/operations/resourceHealthMetadataOperations.js diff --git a/lib/services/websiteManagement2/lib/models/deletedSite.js b/lib/services/websiteManagement2/lib/models/deletedSite.js index e076b9bc7a..3015110612 100644 --- a/lib/services/websiteManagement2/lib/models/deletedSite.js +++ b/lib/services/websiteManagement2/lib/models/deletedSite.js @@ -10,11 +10,14 @@ 'use strict'; +const models = require('./index'); + /** * A deleted app. * + * @extends models['ProxyOnlyResource'] */ -class DeletedSite { +class DeletedSite extends models['ProxyOnlyResource'] { /** * Create a DeletedSite. * @member {number} [deletedSiteId] Numeric id for the deleted site @@ -24,8 +27,10 @@ class DeletedSite { * site * @member {string} [deletedSiteName] Name of the deleted site * @member {string} [slot] Slot of the deleted site + * @member {string} [deletedSiteKind] Kind of site that was deleted */ constructor() { + super(); } /** @@ -42,10 +47,41 @@ class DeletedSite { name: 'Composite', className: 'DeletedSite', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serializedName: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, deletedSiteId: { required: false, readOnly: true, - serializedName: 'deletedSiteId', + serializedName: 'properties.deletedSiteId', type: { name: 'Number' } @@ -53,7 +89,7 @@ class DeletedSite { deletedTimestamp: { required: false, readOnly: true, - serializedName: 'deletedTimestamp', + serializedName: 'properties.deletedTimestamp', type: { name: 'String' } @@ -61,7 +97,7 @@ class DeletedSite { subscription: { required: false, readOnly: true, - serializedName: 'subscription', + serializedName: 'properties.subscription', type: { name: 'String' } @@ -69,7 +105,7 @@ class DeletedSite { resourceGroup: { required: false, readOnly: true, - serializedName: 'resourceGroup', + serializedName: 'properties.resourceGroup', type: { name: 'String' } @@ -77,7 +113,7 @@ class DeletedSite { deletedSiteName: { required: false, readOnly: true, - serializedName: 'deletedSiteName', + serializedName: 'properties.deletedSiteName', type: { name: 'String' } @@ -85,7 +121,15 @@ class DeletedSite { slot: { required: false, readOnly: true, - serializedName: 'slot', + serializedName: 'properties.slot', + type: { + name: 'String' + } + }, + deletedSiteKind: { + required: false, + readOnly: true, + serializedName: 'properties.kind', type: { name: 'String' } diff --git a/lib/services/websiteManagement2/lib/models/index.d.ts b/lib/services/websiteManagement2/lib/models/index.d.ts index e89a87a9e4..972848d73d 100644 --- a/lib/services/websiteManagement2/lib/models/index.d.ts +++ b/lib/services/websiteManagement2/lib/models/index.d.ts @@ -645,6 +645,31 @@ export interface HybridConnection extends ProxyOnlyResource { serviceBusSuffix?: string; } +/** + * @class + * Initializes a new instance of the DeletedSite class. + * @constructor + * A deleted app. + * + * @member {number} [deletedSiteId] Numeric id for the deleted site + * @member {string} [deletedTimestamp] Time in UTC when the app was deleted. + * @member {string} [subscription] Subscription containing the deleted site + * @member {string} [resourceGroup] ResourceGroup that contained the deleted + * site + * @member {string} [deletedSiteName] Name of the deleted site + * @member {string} [slot] Slot of the deleted site + * @member {string} [deletedSiteKind] Kind of site that was deleted + */ +export interface DeletedSite extends ProxyOnlyResource { + readonly deletedSiteId?: number; + readonly deletedTimestamp?: string; + readonly subscription?: string; + readonly resourceGroup?: string; + readonly deletedSiteName?: string; + readonly slot?: string; + readonly deletedSiteKind?: string; +} + /** * @class * Initializes a new instance of the ManagedServiceIdentity class. @@ -3037,29 +3062,6 @@ export interface CsmUsageQuota { name?: LocalizableString; } -/** - * @class - * Initializes a new instance of the DeletedSite class. - * @constructor - * A deleted app. - * - * @member {number} [deletedSiteId] Numeric id for the deleted site - * @member {string} [deletedTimestamp] Time in UTC when the app was deleted. - * @member {string} [subscription] Subscription containing the deleted site - * @member {string} [resourceGroup] ResourceGroup that contained the deleted - * site - * @member {string} [deletedSiteName] Name of the deleted site - * @member {string} [slot] Slot of the deleted site - */ -export interface DeletedSite { - readonly deletedSiteId?: number; - readonly deletedTimestamp?: string; - readonly subscription?: string; - readonly resourceGroup?: string; - readonly deletedSiteName?: string; - readonly slot?: string; -} - /** * @class * Initializes a new instance of the ErrorEntity class. @@ -6944,6 +6946,22 @@ export interface HybridConnectionLimits extends ProxyOnlyResource { readonly maximum?: number; } +/** + * @class + * Initializes a new instance of the ResourceHealthMetadata class. + * @constructor + * Used for getting ResourceHealthCheck settings. + * + * @member {string} [category] The category that the resource matches in the + * RHC Policy File + * @member {boolean} [signalAvailability] Is there a health signal for the + * resource + */ +export interface ResourceHealthMetadata extends ProxyOnlyResource { + category?: string; + signalAvailability?: boolean; +} + /** * @class @@ -7570,3 +7588,15 @@ export interface ResourceCollection extends Array { export interface HybridConnectionCollection extends Array { readonly nextLink?: string; } + +/** + * @class + * Initializes a new instance of the ResourceHealthMetadataCollection class. + * @constructor + * Collection of resource health metadata. + * + * @member {string} [nextLink] Link to next page of resources. + */ +export interface ResourceHealthMetadataCollection extends Array { + readonly nextLink?: string; +} diff --git a/lib/services/websiteManagement2/lib/models/index.js b/lib/services/websiteManagement2/lib/models/index.js index 1310247339..e298b66554 100644 --- a/lib/services/websiteManagement2/lib/models/index.js +++ b/lib/services/websiteManagement2/lib/models/index.js @@ -43,6 +43,7 @@ exports.PushSettings = require('./pushSettings'); exports.Identifier = require('./identifier'); exports.HybridConnectionKey = require('./hybridConnectionKey'); exports.HybridConnection = require('./hybridConnection'); +exports.DeletedSite = require('./deletedSite'); exports.ManagedServiceIdentity = require('./managedServiceIdentity'); exports.SlotSwapStatus = require('./slotSwapStatus'); exports.CloningInfo = require('./cloningInfo'); @@ -109,7 +110,6 @@ exports.NetworkAccessControlEntry = require('./networkAccessControlEntry'); exports.AppServiceEnvironment = require('./appServiceEnvironment'); exports.LocalizableString = require('./localizableString'); exports.CsmUsageQuota = require('./csmUsageQuota'); -exports.DeletedSite = require('./deletedSite'); exports.ErrorEntity = require('./errorEntity'); exports.Operation = require('./operation'); exports.ResourceMetricName = require('./resourceMetricName'); @@ -236,6 +236,7 @@ exports.Usage = require('./usage'); exports.WorkerPoolResource = require('./workerPoolResource'); exports.AppServicePlanPatchResource = require('./appServicePlanPatchResource'); exports.HybridConnectionLimits = require('./hybridConnectionLimits'); +exports.ResourceHealthMetadata = require('./resourceHealthMetadata'); exports.AppServiceCertificateOrderCollection = require('./appServiceCertificateOrderCollection'); exports.AppServiceCertificateCollection = require('./appServiceCertificateCollection'); exports.CsmOperationCollection = require('./csmOperationCollection'); @@ -288,3 +289,4 @@ exports.UsageCollection = require('./usageCollection'); exports.AppServicePlanCollection = require('./appServicePlanCollection'); exports.ResourceCollection = require('./resourceCollection'); exports.HybridConnectionCollection = require('./hybridConnectionCollection'); +exports.ResourceHealthMetadataCollection = require('./resourceHealthMetadataCollection'); diff --git a/lib/services/websiteManagement2/lib/models/resourceHealthMetadata.js b/lib/services/websiteManagement2/lib/models/resourceHealthMetadata.js new file mode 100644 index 0000000000..7c8d1c457d --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/resourceHealthMetadata.js @@ -0,0 +1,97 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Used for getting ResourceHealthCheck settings. + * + * @extends models['ProxyOnlyResource'] + */ +class ResourceHealthMetadata extends models['ProxyOnlyResource'] { + /** + * Create a ResourceHealthMetadata. + * @member {string} [category] The category that the resource matches in the + * RHC Policy File + * @member {boolean} [signalAvailability] Is there a health signal for the + * resource + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ResourceHealthMetadata + * + * @returns {object} metadata of ResourceHealthMetadata + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceHealthMetadata', + type: { + name: 'Composite', + className: 'ResourceHealthMetadata', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serializedName: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + category: { + required: false, + serializedName: 'properties.category', + type: { + name: 'String' + } + }, + signalAvailability: { + required: false, + serializedName: 'properties.signalAvailability', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = ResourceHealthMetadata; diff --git a/lib/services/websiteManagement2/lib/models/resourceHealthMetadataCollection.js b/lib/services/websiteManagement2/lib/models/resourceHealthMetadataCollection.js new file mode 100644 index 0000000000..b4be12e889 --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/resourceHealthMetadataCollection.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Collection of resource health metadata. + */ +class ResourceHealthMetadataCollection extends Array { + /** + * Create a ResourceHealthMetadataCollection. + * @member {string} [nextLink] Link to next page of resources. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ResourceHealthMetadataCollection + * + * @returns {object} metadata of ResourceHealthMetadataCollection + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceHealthMetadataCollection', + type: { + name: 'Composite', + className: 'ResourceHealthMetadataCollection', + modelProperties: { + value: { + required: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ResourceHealthMetadataElementType', + type: { + name: 'Composite', + className: 'ResourceHealthMetadata' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResourceHealthMetadataCollection; diff --git a/lib/services/websiteManagement2/lib/operations/index.d.ts b/lib/services/websiteManagement2/lib/operations/index.d.ts index 8dc83cd895..fa393ddcd3 100644 --- a/lib/services/websiteManagement2/lib/operations/index.d.ts +++ b/lib/services/websiteManagement2/lib/operations/index.d.ts @@ -58679,3 +58679,682 @@ export interface AppServicePlans { listUsagesNext(nextPageLink: string, callback: ServiceCallback): void; listUsagesNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } + +/** + * @class + * ResourceHealthMetadataOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the WebSiteManagementClient. + */ +export interface ResourceHealthMetadataOperations { + + + /** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadataCollection} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadataCollection} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySiteWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadataCollection} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySite(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySite(resourceGroupName: string, name: string, callback: ServiceCallback): void; + listBySite(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getBySiteWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadata} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadata} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadata} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getBySite(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getBySite(resourceGroupName: string, name: string, callback: ServiceCallback): void; + getBySite(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySiteSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadataCollection} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySiteSlot(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySiteSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; + listBySiteSlot(resourceGroupName: string, name: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getBySiteSlotWithHttpOperationResponse(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadata} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadata} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadata} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getBySiteSlot(resourceGroupName: string, name: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getBySiteSlot(resourceGroupName: string, name: string, slot: string, callback: ServiceCallback): void; + getBySiteSlot(resourceGroupName: string, name: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadataCollection} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadataCollection} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySiteNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadataCollection} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySiteNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySiteNext(nextPageLink: string, callback: ServiceCallback): void; + listBySiteNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySiteSlotNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ResourceHealthMetadataCollection} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySiteSlotNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySiteSlotNext(nextPageLink: string, callback: ServiceCallback): void; + listBySiteSlotNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/websiteManagement2/lib/operations/index.js b/lib/services/websiteManagement2/lib/operations/index.js index b0fdef3f0a..395fd6cbd2 100644 --- a/lib/services/websiteManagement2/lib/operations/index.js +++ b/lib/services/websiteManagement2/lib/operations/index.js @@ -27,3 +27,4 @@ exports.Recommendations = require('./recommendations'); exports.WebApps = require('./webApps'); exports.AppServiceEnvironments = require('./appServiceEnvironments'); exports.AppServicePlans = require('./appServicePlans'); +exports.ResourceHealthMetadataOperations = require('./resourceHealthMetadataOperations'); diff --git a/lib/services/websiteManagement2/lib/operations/resourceHealthMetadataOperations.js b/lib/services/websiteManagement2/lib/operations/resourceHealthMetadataOperations.js new file mode 100644 index 0000000000..c75a8a1995 --- /dev/null +++ b/lib/services/websiteManagement2/lib/operations/resourceHealthMetadataOperations.js @@ -0,0 +1,2482 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadataCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadataCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySite(resourceGroupName, name, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadataCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadata} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getBySite(resourceGroupName, name, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadata']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySiteSlot(resourceGroupName, name, slot, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadataCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadata} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getBySiteSlot(resourceGroupName, name, slot, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadata']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadataCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadataCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySiteNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadataCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySiteSlotNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['DefaultErrorResponse']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ResourceHealthMetadataCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ResourceHealthMetadataOperations. */ +class ResourceHealthMetadataOperations { + /** + * Create a ResourceHealthMetadataOperations. + * @param {WebSiteManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._listByResourceGroup = _listByResourceGroup; + this._listBySite = _listBySite; + this._getBySite = _getBySite; + this._listBySiteSlot = _listBySiteSlot; + this._getBySiteSlot = _getBySiteSlot; + this._listNext = _listNext; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listBySiteNext = _listBySiteNext; + this._listBySiteSlotNext = _listBySiteSlotNext; + } + + /** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySiteWithHttpOperationResponse(resourceGroupName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySite(resourceGroupName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySite(resourceGroupName, name, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySite(resourceGroupName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySite(resourceGroupName, name, options, optionalCallback); + } + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getBySiteWithHttpOperationResponse(resourceGroupName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getBySite(resourceGroupName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadata} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadata} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getBySite(resourceGroupName, name, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getBySite(resourceGroupName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getBySite(resourceGroupName, name, options, optionalCallback); + } + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySiteSlotWithHttpOperationResponse(resourceGroupName, name, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySiteSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app. + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySiteSlot(resourceGroupName, name, slot, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySiteSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySiteSlot(resourceGroupName, name, slot, options, optionalCallback); + } + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getBySiteSlotWithHttpOperationResponse(resourceGroupName, name, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getBySiteSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site + * + * Gets the category of ResourceHealthMetadata to use for the given site + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Name of web app + * + * @param {string} slot Name of web app slot. If not specified then will + * default to production slot. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadata} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadata} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getBySiteSlot(resourceGroupName, name, slot, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getBySiteSlot(resourceGroupName, name, slot, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getBySiteSlot(resourceGroupName, name, slot, options, optionalCallback); + } + } + + /** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all ResourceHealthMetadata for all sites in the subscription. + * + * List all ResourceHealthMetadata for all sites in the subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + + /** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all ResourceHealthMetadata for all sites in the resource group + * in the subscription. + * + * List all ResourceHealthMetadata for all sites in the resource group in the + * subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySiteNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySiteNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySiteNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySiteNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySiteNext(nextPageLink, options, optionalCallback); + } + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySiteSlotNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySiteSlotNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the category of ResourceHealthMetadata to use for the given + * site as a collection + * + * Gets the category of ResourceHealthMetadata to use for the given site as a + * collection + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ResourceHealthMetadataCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ResourceHealthMetadataCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySiteSlotNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySiteSlotNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySiteSlotNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = ResourceHealthMetadataOperations; diff --git a/lib/services/websiteManagement2/lib/webSiteManagementClient.d.ts b/lib/services/websiteManagement2/lib/webSiteManagementClient.d.ts index 6227b53ace..be353a305c 100644 --- a/lib/services/websiteManagement2/lib/webSiteManagementClient.d.ts +++ b/lib/services/websiteManagement2/lib/webSiteManagementClient.d.ts @@ -69,6 +69,7 @@ export default class WebSiteManagementClient extends AzureServiceClient { webApps: operations.WebApps; appServiceEnvironments: operations.AppServiceEnvironments; appServicePlans: operations.AppServicePlans; + resourceHealthMetadataOperations: operations.ResourceHealthMetadataOperations; /** diff --git a/lib/services/websiteManagement2/lib/webSiteManagementClient.js b/lib/services/websiteManagement2/lib/webSiteManagementClient.js index b02aa8611e..17634c5dd7 100644 --- a/lib/services/websiteManagement2/lib/webSiteManagementClient.js +++ b/lib/services/websiteManagement2/lib/webSiteManagementClient.js @@ -3240,6 +3240,7 @@ class WebSiteManagementClient extends ServiceClient { this.webApps = new operations.WebApps(this); this.appServiceEnvironments = new operations.AppServiceEnvironments(this); this.appServicePlans = new operations.AppServicePlans(this); + this.resourceHealthMetadataOperations = new operations.ResourceHealthMetadataOperations(this); this.models = models; this._getPublishingUser = _getPublishingUser; this._updatePublishingUser = _updatePublishingUser;