azure_mgmt_web 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-04-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  3. data/lib/2015-08-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  4. data/lib/2016-03-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  5. data/lib/2016-08-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  6. data/lib/2016-09-01/generated/azure_mgmt_web/web_site_management_client.rb +1 -1
  7. data/lib/2018-02-01/generated/azure_mgmt_web.rb +99 -91
  8. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_environments.rb +40 -40
  9. data/lib/2018-02-01/generated/azure_mgmt_web/app_service_plans.rb +8 -8
  10. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan.rb +26 -1
  11. data/lib/2018-02-01/generated/azure_mgmt_web/models/app_service_plan_patch_resource.rb +26 -1
  12. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_storage_info_value.rb +109 -0
  13. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_storage_property_dictionary_resource.rb +90 -0
  14. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_storage_state.rb +17 -0
  15. data/lib/2018-02-01/generated/azure_mgmt_web/models/azure_storage_type.rb +16 -0
  16. data/lib/2018-02-01/generated/azure_mgmt_web/models/backup_request.rb +11 -0
  17. data/lib/2018-02-01/generated/azure_mgmt_web/models/csm_publishing_profile_options.rb +11 -0
  18. data/lib/2018-02-01/generated/azure_mgmt_web/models/deleted_site.rb +54 -7
  19. data/lib/2018-02-01/generated/azure_mgmt_web/models/network_trace.rb +70 -0
  20. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_health_metadata.rb +93 -0
  21. data/lib/2018-02-01/generated/azure_mgmt_web/models/resource_health_metadata_collection.rb +99 -0
  22. data/lib/2018-02-01/generated/azure_mgmt_web/models/site.rb +13 -1
  23. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config.rb +21 -0
  24. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_config_resource.rb +21 -0
  25. data/lib/2018-02-01/generated/azure_mgmt_web/models/site_patch_resource.rb +13 -1
  26. data/lib/2018-02-01/generated/azure_mgmt_web/models/sku_name.rb +2 -0
  27. data/lib/2018-02-01/generated/azure_mgmt_web/models/slot_config_names_resource.rb +20 -0
  28. data/lib/2018-02-01/generated/azure_mgmt_web/provider.rb +16 -8
  29. data/lib/2018-02-01/generated/azure_mgmt_web/recommendations.rb +20 -20
  30. data/lib/2018-02-01/generated/azure_mgmt_web/resource_health_metadata_operations.rb +1161 -0
  31. data/lib/2018-02-01/generated/azure_mgmt_web/web_apps.rb +1716 -312
  32. data/lib/2018-02-01/generated/azure_mgmt_web/web_site_management_client.rb +36 -19
  33. data/lib/azure_mgmt_web.rb +1 -0
  34. data/lib/profiles/latest/modules/web_profile_module.rb +315 -285
  35. data/lib/profiles/v2018_03_01/modules/web_profile_module.rb +1235 -0
  36. data/lib/profiles/v2018_03_01/web_module_definition.rb +8 -0
  37. data/lib/profiles/v2018_03_01/web_v2018_03_01_profile_client.rb +40 -0
  38. data/lib/version.rb +1 -1
  39. metadata +14 -3
@@ -1996,63 +1996,66 @@ module Azure::Web::Mgmt::V2018_02_01
1996
1996
  end
1997
1997
 
1998
1998
  #
1999
- # Updates the backup configuration of an app.
1999
+ # Updates the Azure storage account configurations of an app.
2000
2000
  #
2001
- # Updates the backup configuration of an app.
2001
+ # Updates the Azure storage account configurations of an app.
2002
2002
  #
2003
2003
  # @param resource_group_name [String] Name of the resource group to which the
2004
2004
  # resource belongs.
2005
2005
  # @param name [String] Name of the app.
2006
- # @param request [BackupRequest] Edited backup configuration.
2006
+ # @param azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure
2007
+ # storage accounts of the app.
2007
2008
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2008
2009
  # will be added to the HTTP request.
2009
2010
  #
2010
- # @return [BackupRequest] operation results.
2011
+ # @return [AzureStoragePropertyDictionaryResource] operation results.
2011
2012
  #
2012
- def update_backup_configuration(resource_group_name, name, request, custom_headers:nil)
2013
- response = update_backup_configuration_async(resource_group_name, name, request, custom_headers:custom_headers).value!
2013
+ def update_azure_storage_accounts(resource_group_name, name, azure_storage_accounts, custom_headers:nil)
2014
+ response = update_azure_storage_accounts_async(resource_group_name, name, azure_storage_accounts, custom_headers:custom_headers).value!
2014
2015
  response.body unless response.nil?
2015
2016
  end
2016
2017
 
2017
2018
  #
2018
- # Updates the backup configuration of an app.
2019
+ # Updates the Azure storage account configurations of an app.
2019
2020
  #
2020
- # Updates the backup configuration of an app.
2021
+ # Updates the Azure storage account configurations of an app.
2021
2022
  #
2022
2023
  # @param resource_group_name [String] Name of the resource group to which the
2023
2024
  # resource belongs.
2024
2025
  # @param name [String] Name of the app.
2025
- # @param request [BackupRequest] Edited backup configuration.
2026
+ # @param azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure
2027
+ # storage accounts of the app.
2026
2028
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2027
2029
  # will be added to the HTTP request.
2028
2030
  #
2029
2031
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2030
2032
  #
2031
- def update_backup_configuration_with_http_info(resource_group_name, name, request, custom_headers:nil)
2032
- update_backup_configuration_async(resource_group_name, name, request, custom_headers:custom_headers).value!
2033
+ def update_azure_storage_accounts_with_http_info(resource_group_name, name, azure_storage_accounts, custom_headers:nil)
2034
+ update_azure_storage_accounts_async(resource_group_name, name, azure_storage_accounts, custom_headers:custom_headers).value!
2033
2035
  end
2034
2036
 
2035
2037
  #
2036
- # Updates the backup configuration of an app.
2038
+ # Updates the Azure storage account configurations of an app.
2037
2039
  #
2038
- # Updates the backup configuration of an app.
2040
+ # Updates the Azure storage account configurations of an app.
2039
2041
  #
2040
2042
  # @param resource_group_name [String] Name of the resource group to which the
2041
2043
  # resource belongs.
2042
2044
  # @param name [String] Name of the app.
2043
- # @param request [BackupRequest] Edited backup configuration.
2045
+ # @param azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure
2046
+ # storage accounts of the app.
2044
2047
  # @param [Hash{String => String}] A hash of custom headers that will be added
2045
2048
  # to the HTTP request.
2046
2049
  #
2047
2050
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2048
2051
  #
2049
- def update_backup_configuration_async(resource_group_name, name, request, custom_headers:nil)
2052
+ def update_azure_storage_accounts_async(resource_group_name, name, azure_storage_accounts, custom_headers:nil)
2050
2053
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2051
2054
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2052
2055
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2053
2056
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2054
2057
  fail ArgumentError, 'name is nil' if name.nil?
2055
- fail ArgumentError, 'request is nil' if request.nil?
2058
+ fail ArgumentError, 'azure_storage_accounts is nil' if azure_storage_accounts.nil?
2056
2059
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2057
2060
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2058
2061
 
@@ -2065,11 +2068,11 @@ module Azure::Web::Mgmt::V2018_02_01
2065
2068
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2066
2069
 
2067
2070
  # Serialize Request
2068
- request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
2069
- request_content = @client.serialize(request_mapper, request)
2071
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource.mapper()
2072
+ request_content = @client.serialize(request_mapper, azure_storage_accounts)
2070
2073
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2071
2074
 
2072
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'
2075
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'
2073
2076
 
2074
2077
  request_url = @base_url || @client.base_url
2075
2078
 
@@ -2097,7 +2100,7 @@ module Azure::Web::Mgmt::V2018_02_01
2097
2100
  if status_code == 200
2098
2101
  begin
2099
2102
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2100
- result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
2103
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource.mapper()
2101
2104
  result.body = @client.deserialize(result_mapper, parsed_response)
2102
2105
  rescue Exception => e
2103
2106
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2111,9 +2114,9 @@ module Azure::Web::Mgmt::V2018_02_01
2111
2114
  end
2112
2115
 
2113
2116
  #
2114
- # Deletes the backup configuration of an app.
2117
+ # Gets the Azure storage account configurations of an app.
2115
2118
  #
2116
- # Deletes the backup configuration of an app.
2119
+ # Gets the Azure storage account configurations of an app.
2117
2120
  #
2118
2121
  # @param resource_group_name [String] Name of the resource group to which the
2119
2122
  # resource belongs.
@@ -2121,16 +2124,17 @@ module Azure::Web::Mgmt::V2018_02_01
2121
2124
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2122
2125
  # will be added to the HTTP request.
2123
2126
  #
2127
+ # @return [AzureStoragePropertyDictionaryResource] operation results.
2124
2128
  #
2125
- def delete_backup_configuration(resource_group_name, name, custom_headers:nil)
2126
- response = delete_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value!
2127
- nil
2129
+ def list_azure_storage_accounts(resource_group_name, name, custom_headers:nil)
2130
+ response = list_azure_storage_accounts_async(resource_group_name, name, custom_headers:custom_headers).value!
2131
+ response.body unless response.nil?
2128
2132
  end
2129
2133
 
2130
2134
  #
2131
- # Deletes the backup configuration of an app.
2135
+ # Gets the Azure storage account configurations of an app.
2132
2136
  #
2133
- # Deletes the backup configuration of an app.
2137
+ # Gets the Azure storage account configurations of an app.
2134
2138
  #
2135
2139
  # @param resource_group_name [String] Name of the resource group to which the
2136
2140
  # resource belongs.
@@ -2140,14 +2144,14 @@ module Azure::Web::Mgmt::V2018_02_01
2140
2144
  #
2141
2145
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2142
2146
  #
2143
- def delete_backup_configuration_with_http_info(resource_group_name, name, custom_headers:nil)
2144
- delete_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value!
2147
+ def list_azure_storage_accounts_with_http_info(resource_group_name, name, custom_headers:nil)
2148
+ list_azure_storage_accounts_async(resource_group_name, name, custom_headers:custom_headers).value!
2145
2149
  end
2146
2150
 
2147
2151
  #
2148
- # Deletes the backup configuration of an app.
2152
+ # Gets the Azure storage account configurations of an app.
2149
2153
  #
2150
- # Deletes the backup configuration of an app.
2154
+ # Gets the Azure storage account configurations of an app.
2151
2155
  #
2152
2156
  # @param resource_group_name [String] Name of the resource group to which the
2153
2157
  # resource belongs.
@@ -2157,7 +2161,7 @@ module Azure::Web::Mgmt::V2018_02_01
2157
2161
  #
2158
2162
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2159
2163
  #
2160
- def delete_backup_configuration_async(resource_group_name, name, custom_headers:nil)
2164
+ def list_azure_storage_accounts_async(resource_group_name, name, custom_headers:nil)
2161
2165
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2162
2166
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2163
2167
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -2173,7 +2177,7 @@ module Azure::Web::Mgmt::V2018_02_01
2173
2177
  # Set Headers
2174
2178
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2175
2179
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2176
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'
2180
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'
2177
2181
 
2178
2182
  request_url = @base_url || @client.base_url
2179
2183
 
@@ -2184,7 +2188,7 @@ module Azure::Web::Mgmt::V2018_02_01
2184
2188
  headers: request_headers.merge(custom_headers || {}),
2185
2189
  base_url: request_url
2186
2190
  }
2187
- promise = @client.make_request_async(:delete, path_template, options)
2191
+ promise = @client.make_request_async(:post, path_template, options)
2188
2192
 
2189
2193
  promise = promise.then do |result|
2190
2194
  http_response = result.response
@@ -2192,10 +2196,20 @@ module Azure::Web::Mgmt::V2018_02_01
2192
2196
  response_content = http_response.body
2193
2197
  unless status_code == 200
2194
2198
  error_model = JSON.load(response_content)
2195
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2199
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2196
2200
  end
2197
2201
 
2198
2202
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2203
+ # Deserialize Response
2204
+ if status_code == 200
2205
+ begin
2206
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2207
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource.mapper()
2208
+ result.body = @client.deserialize(result_mapper, parsed_response)
2209
+ rescue Exception => e
2210
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2211
+ end
2212
+ end
2199
2213
 
2200
2214
  result
2201
2215
  end
@@ -2204,59 +2218,63 @@ module Azure::Web::Mgmt::V2018_02_01
2204
2218
  end
2205
2219
 
2206
2220
  #
2207
- # Gets the backup configuration of an app.
2221
+ # Updates the backup configuration of an app.
2208
2222
  #
2209
- # Gets the backup configuration of an app.
2223
+ # Updates the backup configuration of an app.
2210
2224
  #
2211
2225
  # @param resource_group_name [String] Name of the resource group to which the
2212
2226
  # resource belongs.
2213
2227
  # @param name [String] Name of the app.
2228
+ # @param request [BackupRequest] Edited backup configuration.
2214
2229
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2215
2230
  # will be added to the HTTP request.
2216
2231
  #
2217
2232
  # @return [BackupRequest] operation results.
2218
2233
  #
2219
- def get_backup_configuration(resource_group_name, name, custom_headers:nil)
2220
- response = get_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value!
2234
+ def update_backup_configuration(resource_group_name, name, request, custom_headers:nil)
2235
+ response = update_backup_configuration_async(resource_group_name, name, request, custom_headers:custom_headers).value!
2221
2236
  response.body unless response.nil?
2222
2237
  end
2223
2238
 
2224
2239
  #
2225
- # Gets the backup configuration of an app.
2240
+ # Updates the backup configuration of an app.
2226
2241
  #
2227
- # Gets the backup configuration of an app.
2242
+ # Updates the backup configuration of an app.
2228
2243
  #
2229
2244
  # @param resource_group_name [String] Name of the resource group to which the
2230
2245
  # resource belongs.
2231
2246
  # @param name [String] Name of the app.
2247
+ # @param request [BackupRequest] Edited backup configuration.
2232
2248
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2233
2249
  # will be added to the HTTP request.
2234
2250
  #
2235
2251
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2236
2252
  #
2237
- def get_backup_configuration_with_http_info(resource_group_name, name, custom_headers:nil)
2238
- get_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value!
2253
+ def update_backup_configuration_with_http_info(resource_group_name, name, request, custom_headers:nil)
2254
+ update_backup_configuration_async(resource_group_name, name, request, custom_headers:custom_headers).value!
2239
2255
  end
2240
2256
 
2241
2257
  #
2242
- # Gets the backup configuration of an app.
2258
+ # Updates the backup configuration of an app.
2243
2259
  #
2244
- # Gets the backup configuration of an app.
2260
+ # Updates the backup configuration of an app.
2245
2261
  #
2246
2262
  # @param resource_group_name [String] Name of the resource group to which the
2247
2263
  # resource belongs.
2248
2264
  # @param name [String] Name of the app.
2265
+ # @param request [BackupRequest] Edited backup configuration.
2249
2266
  # @param [Hash{String => String}] A hash of custom headers that will be added
2250
2267
  # to the HTTP request.
2251
2268
  #
2252
2269
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2253
2270
  #
2254
- def get_backup_configuration_async(resource_group_name, name, custom_headers:nil)
2271
+ def update_backup_configuration_async(resource_group_name, name, request, custom_headers:nil)
2255
2272
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2256
2273
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2257
2274
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2258
2275
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2259
2276
  fail ArgumentError, 'name is nil' if name.nil?
2277
+ fail ArgumentError, 'request is nil' if request.nil?
2260
2278
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2261
2279
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2262
2280
 
@@ -2267,7 +2285,13 @@ module Azure::Web::Mgmt::V2018_02_01
2267
2285
  # Set Headers
2268
2286
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2269
2287
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2270
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'
2288
+
2289
+ # Serialize Request
2290
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
2291
+ request_content = @client.serialize(request_mapper, request)
2292
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2293
+
2294
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'
2271
2295
 
2272
2296
  request_url = @base_url || @client.base_url
2273
2297
 
@@ -2275,10 +2299,11 @@ module Azure::Web::Mgmt::V2018_02_01
2275
2299
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2276
2300
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2277
2301
  query_params: {'api-version' => @client.api_version},
2302
+ body: request_content,
2278
2303
  headers: request_headers.merge(custom_headers || {}),
2279
2304
  base_url: request_url
2280
2305
  }
2281
- promise = @client.make_request_async(:post, path_template, options)
2306
+ promise = @client.make_request_async(:put, path_template, options)
2282
2307
 
2283
2308
  promise = promise.then do |result|
2284
2309
  http_response = result.response
@@ -2308,66 +2333,58 @@ module Azure::Web::Mgmt::V2018_02_01
2308
2333
  end
2309
2334
 
2310
2335
  #
2311
- # Replaces the connection strings of an app.
2336
+ # Deletes the backup configuration of an app.
2312
2337
  #
2313
- # Replaces the connection strings of an app.
2338
+ # Deletes the backup configuration of an app.
2314
2339
  #
2315
2340
  # @param resource_group_name [String] Name of the resource group to which the
2316
2341
  # resource belongs.
2317
2342
  # @param name [String] Name of the app.
2318
- # @param connection_strings [ConnectionStringDictionary] Connection strings of
2319
- # the app or deployment slot. See example.
2320
2343
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2321
2344
  # will be added to the HTTP request.
2322
2345
  #
2323
- # @return [ConnectionStringDictionary] operation results.
2324
2346
  #
2325
- def update_connection_strings(resource_group_name, name, connection_strings, custom_headers:nil)
2326
- response = update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:custom_headers).value!
2327
- response.body unless response.nil?
2347
+ def delete_backup_configuration(resource_group_name, name, custom_headers:nil)
2348
+ response = delete_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value!
2349
+ nil
2328
2350
  end
2329
2351
 
2330
2352
  #
2331
- # Replaces the connection strings of an app.
2353
+ # Deletes the backup configuration of an app.
2332
2354
  #
2333
- # Replaces the connection strings of an app.
2355
+ # Deletes the backup configuration of an app.
2334
2356
  #
2335
2357
  # @param resource_group_name [String] Name of the resource group to which the
2336
2358
  # resource belongs.
2337
2359
  # @param name [String] Name of the app.
2338
- # @param connection_strings [ConnectionStringDictionary] Connection strings of
2339
- # the app or deployment slot. See example.
2340
2360
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2341
2361
  # will be added to the HTTP request.
2342
2362
  #
2343
2363
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2344
2364
  #
2345
- def update_connection_strings_with_http_info(resource_group_name, name, connection_strings, custom_headers:nil)
2346
- update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:custom_headers).value!
2365
+ def delete_backup_configuration_with_http_info(resource_group_name, name, custom_headers:nil)
2366
+ delete_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value!
2347
2367
  end
2348
2368
 
2349
2369
  #
2350
- # Replaces the connection strings of an app.
2370
+ # Deletes the backup configuration of an app.
2351
2371
  #
2352
- # Replaces the connection strings of an app.
2372
+ # Deletes the backup configuration of an app.
2353
2373
  #
2354
2374
  # @param resource_group_name [String] Name of the resource group to which the
2355
2375
  # resource belongs.
2356
2376
  # @param name [String] Name of the app.
2357
- # @param connection_strings [ConnectionStringDictionary] Connection strings of
2358
- # the app or deployment slot. See example.
2359
2377
  # @param [Hash{String => String}] A hash of custom headers that will be added
2360
2378
  # to the HTTP request.
2361
2379
  #
2362
2380
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2363
2381
  #
2364
- def update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:nil)
2382
+ def delete_backup_configuration_async(resource_group_name, name, custom_headers:nil)
2365
2383
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2366
2384
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2367
2385
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2368
2386
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2369
2387
  fail ArgumentError, 'name is nil' if name.nil?
2370
- fail ArgumentError, 'connection_strings is nil' if connection_strings.nil?
2371
2388
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2372
2389
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2373
2390
 
@@ -2378,13 +2395,101 @@ module Azure::Web::Mgmt::V2018_02_01
2378
2395
  # Set Headers
2379
2396
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2380
2397
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2398
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'
2381
2399
 
2382
- # Serialize Request
2383
- request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ConnectionStringDictionary.mapper()
2384
- request_content = @client.serialize(request_mapper, connection_strings)
2385
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2400
+ request_url = @base_url || @client.base_url
2386
2401
 
2387
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'
2402
+ options = {
2403
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2404
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2405
+ query_params: {'api-version' => @client.api_version},
2406
+ headers: request_headers.merge(custom_headers || {}),
2407
+ base_url: request_url
2408
+ }
2409
+ promise = @client.make_request_async(:delete, path_template, options)
2410
+
2411
+ promise = promise.then do |result|
2412
+ http_response = result.response
2413
+ status_code = http_response.status
2414
+ response_content = http_response.body
2415
+ unless status_code == 200
2416
+ error_model = JSON.load(response_content)
2417
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2418
+ end
2419
+
2420
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2421
+
2422
+ result
2423
+ end
2424
+
2425
+ promise.execute
2426
+ end
2427
+
2428
+ #
2429
+ # Gets the backup configuration of an app.
2430
+ #
2431
+ # Gets the backup configuration of an app.
2432
+ #
2433
+ # @param resource_group_name [String] Name of the resource group to which the
2434
+ # resource belongs.
2435
+ # @param name [String] Name of the app.
2436
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2437
+ # will be added to the HTTP request.
2438
+ #
2439
+ # @return [BackupRequest] operation results.
2440
+ #
2441
+ def get_backup_configuration(resource_group_name, name, custom_headers:nil)
2442
+ response = get_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value!
2443
+ response.body unless response.nil?
2444
+ end
2445
+
2446
+ #
2447
+ # Gets the backup configuration of an app.
2448
+ #
2449
+ # Gets the backup configuration of an app.
2450
+ #
2451
+ # @param resource_group_name [String] Name of the resource group to which the
2452
+ # resource belongs.
2453
+ # @param name [String] Name of the app.
2454
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2455
+ # will be added to the HTTP request.
2456
+ #
2457
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2458
+ #
2459
+ def get_backup_configuration_with_http_info(resource_group_name, name, custom_headers:nil)
2460
+ get_backup_configuration_async(resource_group_name, name, custom_headers:custom_headers).value!
2461
+ end
2462
+
2463
+ #
2464
+ # Gets the backup configuration of an app.
2465
+ #
2466
+ # Gets the backup configuration of an app.
2467
+ #
2468
+ # @param resource_group_name [String] Name of the resource group to which the
2469
+ # resource belongs.
2470
+ # @param name [String] Name of the app.
2471
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2472
+ # to the HTTP request.
2473
+ #
2474
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2475
+ #
2476
+ def get_backup_configuration_async(resource_group_name, name, custom_headers:nil)
2477
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2478
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2479
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2480
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2481
+ fail ArgumentError, 'name is nil' if name.nil?
2482
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2483
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2484
+
2485
+
2486
+ request_headers = {}
2487
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2488
+
2489
+ # Set Headers
2490
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2491
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2492
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'
2388
2493
 
2389
2494
  request_url = @base_url || @client.base_url
2390
2495
 
@@ -2392,11 +2497,10 @@ module Azure::Web::Mgmt::V2018_02_01
2392
2497
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2393
2498
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2394
2499
  query_params: {'api-version' => @client.api_version},
2395
- body: request_content,
2396
2500
  headers: request_headers.merge(custom_headers || {}),
2397
2501
  base_url: request_url
2398
2502
  }
2399
- promise = @client.make_request_async(:put, path_template, options)
2503
+ promise = @client.make_request_async(:post, path_template, options)
2400
2504
 
2401
2505
  promise = promise.then do |result|
2402
2506
  http_response = result.response
@@ -2412,7 +2516,7 @@ module Azure::Web::Mgmt::V2018_02_01
2412
2516
  if status_code == 200
2413
2517
  begin
2414
2518
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2415
- result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ConnectionStringDictionary.mapper()
2519
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
2416
2520
  result.body = @client.deserialize(result_mapper, parsed_response)
2417
2521
  rescue Exception => e
2418
2522
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2426,59 +2530,66 @@ module Azure::Web::Mgmt::V2018_02_01
2426
2530
  end
2427
2531
 
2428
2532
  #
2429
- # Gets the connection strings of an app.
2533
+ # Replaces the connection strings of an app.
2430
2534
  #
2431
- # Gets the connection strings of an app.
2535
+ # Replaces the connection strings of an app.
2432
2536
  #
2433
2537
  # @param resource_group_name [String] Name of the resource group to which the
2434
2538
  # resource belongs.
2435
2539
  # @param name [String] Name of the app.
2540
+ # @param connection_strings [ConnectionStringDictionary] Connection strings of
2541
+ # the app or deployment slot. See example.
2436
2542
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2437
2543
  # will be added to the HTTP request.
2438
2544
  #
2439
2545
  # @return [ConnectionStringDictionary] operation results.
2440
2546
  #
2441
- def list_connection_strings(resource_group_name, name, custom_headers:nil)
2442
- response = list_connection_strings_async(resource_group_name, name, custom_headers:custom_headers).value!
2547
+ def update_connection_strings(resource_group_name, name, connection_strings, custom_headers:nil)
2548
+ response = update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:custom_headers).value!
2443
2549
  response.body unless response.nil?
2444
2550
  end
2445
2551
 
2446
2552
  #
2447
- # Gets the connection strings of an app.
2553
+ # Replaces the connection strings of an app.
2448
2554
  #
2449
- # Gets the connection strings of an app.
2555
+ # Replaces the connection strings of an app.
2450
2556
  #
2451
2557
  # @param resource_group_name [String] Name of the resource group to which the
2452
2558
  # resource belongs.
2453
2559
  # @param name [String] Name of the app.
2560
+ # @param connection_strings [ConnectionStringDictionary] Connection strings of
2561
+ # the app or deployment slot. See example.
2454
2562
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2455
2563
  # will be added to the HTTP request.
2456
2564
  #
2457
2565
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2458
2566
  #
2459
- def list_connection_strings_with_http_info(resource_group_name, name, custom_headers:nil)
2460
- list_connection_strings_async(resource_group_name, name, custom_headers:custom_headers).value!
2567
+ def update_connection_strings_with_http_info(resource_group_name, name, connection_strings, custom_headers:nil)
2568
+ update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:custom_headers).value!
2461
2569
  end
2462
2570
 
2463
2571
  #
2464
- # Gets the connection strings of an app.
2572
+ # Replaces the connection strings of an app.
2465
2573
  #
2466
- # Gets the connection strings of an app.
2574
+ # Replaces the connection strings of an app.
2467
2575
  #
2468
2576
  # @param resource_group_name [String] Name of the resource group to which the
2469
2577
  # resource belongs.
2470
2578
  # @param name [String] Name of the app.
2579
+ # @param connection_strings [ConnectionStringDictionary] Connection strings of
2580
+ # the app or deployment slot. See example.
2471
2581
  # @param [Hash{String => String}] A hash of custom headers that will be added
2472
2582
  # to the HTTP request.
2473
2583
  #
2474
2584
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2475
2585
  #
2476
- def list_connection_strings_async(resource_group_name, name, custom_headers:nil)
2586
+ def update_connection_strings_async(resource_group_name, name, connection_strings, custom_headers:nil)
2477
2587
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2478
2588
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2479
2589
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2480
2590
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2481
2591
  fail ArgumentError, 'name is nil' if name.nil?
2592
+ fail ArgumentError, 'connection_strings is nil' if connection_strings.nil?
2482
2593
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2483
2594
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2484
2595
 
@@ -2489,7 +2600,13 @@ module Azure::Web::Mgmt::V2018_02_01
2489
2600
  # Set Headers
2490
2601
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2491
2602
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2492
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'
2603
+
2604
+ # Serialize Request
2605
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ConnectionStringDictionary.mapper()
2606
+ request_content = @client.serialize(request_mapper, connection_strings)
2607
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2608
+
2609
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'
2493
2610
 
2494
2611
  request_url = @base_url || @client.base_url
2495
2612
 
@@ -2497,10 +2614,115 @@ module Azure::Web::Mgmt::V2018_02_01
2497
2614
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2498
2615
  path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2499
2616
  query_params: {'api-version' => @client.api_version},
2617
+ body: request_content,
2500
2618
  headers: request_headers.merge(custom_headers || {}),
2501
2619
  base_url: request_url
2502
2620
  }
2503
- promise = @client.make_request_async(:post, path_template, options)
2621
+ promise = @client.make_request_async(:put, path_template, options)
2622
+
2623
+ promise = promise.then do |result|
2624
+ http_response = result.response
2625
+ status_code = http_response.status
2626
+ response_content = http_response.body
2627
+ unless status_code == 200
2628
+ error_model = JSON.load(response_content)
2629
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2630
+ end
2631
+
2632
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2633
+ # Deserialize Response
2634
+ if status_code == 200
2635
+ begin
2636
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2637
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ConnectionStringDictionary.mapper()
2638
+ result.body = @client.deserialize(result_mapper, parsed_response)
2639
+ rescue Exception => e
2640
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2641
+ end
2642
+ end
2643
+
2644
+ result
2645
+ end
2646
+
2647
+ promise.execute
2648
+ end
2649
+
2650
+ #
2651
+ # Gets the connection strings of an app.
2652
+ #
2653
+ # Gets the connection strings of an app.
2654
+ #
2655
+ # @param resource_group_name [String] Name of the resource group to which the
2656
+ # resource belongs.
2657
+ # @param name [String] Name of the app.
2658
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2659
+ # will be added to the HTTP request.
2660
+ #
2661
+ # @return [ConnectionStringDictionary] operation results.
2662
+ #
2663
+ def list_connection_strings(resource_group_name, name, custom_headers:nil)
2664
+ response = list_connection_strings_async(resource_group_name, name, custom_headers:custom_headers).value!
2665
+ response.body unless response.nil?
2666
+ end
2667
+
2668
+ #
2669
+ # Gets the connection strings of an app.
2670
+ #
2671
+ # Gets the connection strings of an app.
2672
+ #
2673
+ # @param resource_group_name [String] Name of the resource group to which the
2674
+ # resource belongs.
2675
+ # @param name [String] Name of the app.
2676
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2677
+ # will be added to the HTTP request.
2678
+ #
2679
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2680
+ #
2681
+ def list_connection_strings_with_http_info(resource_group_name, name, custom_headers:nil)
2682
+ list_connection_strings_async(resource_group_name, name, custom_headers:custom_headers).value!
2683
+ end
2684
+
2685
+ #
2686
+ # Gets the connection strings of an app.
2687
+ #
2688
+ # Gets the connection strings of an app.
2689
+ #
2690
+ # @param resource_group_name [String] Name of the resource group to which the
2691
+ # resource belongs.
2692
+ # @param name [String] Name of the app.
2693
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2694
+ # to the HTTP request.
2695
+ #
2696
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2697
+ #
2698
+ def list_connection_strings_async(resource_group_name, name, custom_headers:nil)
2699
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2700
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2701
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2702
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
2703
+ fail ArgumentError, 'name is nil' if name.nil?
2704
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2705
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2706
+
2707
+
2708
+ request_headers = {}
2709
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2710
+
2711
+ # Set Headers
2712
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2713
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2714
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'
2715
+
2716
+ request_url = @base_url || @client.base_url
2717
+
2718
+ options = {
2719
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2720
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
2721
+ query_params: {'api-version' => @client.api_version},
2722
+ headers: request_headers.merge(custom_headers || {}),
2723
+ base_url: request_url
2724
+ }
2725
+ promise = @client.make_request_async(:post, path_template, options)
2504
2726
 
2505
2727
  promise = promise.then do |result|
2506
2728
  http_response = result.response
@@ -10773,8 +10995,8 @@ module Azure::Web::Mgmt::V2018_02_01
10773
10995
  # response. It is "false" by default.
10774
10996
  # @param filter [String] Return only metrics specified in the filter (using
10775
10997
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
10776
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
10777
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
10998
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
10999
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
10778
11000
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
10779
11001
  # will be added to the HTTP request.
10780
11002
  #
@@ -10797,8 +11019,8 @@ module Azure::Web::Mgmt::V2018_02_01
10797
11019
  # response. It is "false" by default.
10798
11020
  # @param filter [String] Return only metrics specified in the filter (using
10799
11021
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
10800
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
10801
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
11022
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
11023
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
10802
11024
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
10803
11025
  # will be added to the HTTP request.
10804
11026
  #
@@ -10820,8 +11042,8 @@ module Azure::Web::Mgmt::V2018_02_01
10820
11042
  # response. It is "false" by default.
10821
11043
  # @param filter [String] Return only metrics specified in the filter (using
10822
11044
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
10823
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
10824
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
11045
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
11046
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
10825
11047
  # @param [Hash{String => String}] A hash of custom headers that will be added
10826
11048
  # to the HTTP request.
10827
11049
  #
@@ -11208,9 +11430,149 @@ module Azure::Web::Mgmt::V2018_02_01
11208
11430
  end
11209
11431
 
11210
11432
  #
11211
- # Start capturing network packets for the site.
11433
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11434
+ # specified).
11212
11435
  #
11213
- # Start capturing network packets for the site.
11436
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11437
+ # specified).
11438
+ #
11439
+ # @param resource_group_name [String] Name of the resource group to which the
11440
+ # resource belongs.
11441
+ # @param name [String] Name of the app.
11442
+ # @param operation_id [String] GUID of the operation.
11443
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
11444
+ # will be added to the HTTP request.
11445
+ #
11446
+ # @return [Object] operation results.
11447
+ #
11448
+ def get_network_trace_operation(resource_group_name, name, operation_id, custom_headers:nil)
11449
+ response = get_network_trace_operation_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
11450
+ response.body unless response.nil?
11451
+ end
11452
+
11453
+ #
11454
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11455
+ # specified).
11456
+ #
11457
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11458
+ # specified).
11459
+ #
11460
+ # @param resource_group_name [String] Name of the resource group to which the
11461
+ # resource belongs.
11462
+ # @param name [String] Name of the app.
11463
+ # @param operation_id [String] GUID of the operation.
11464
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
11465
+ # will be added to the HTTP request.
11466
+ #
11467
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
11468
+ #
11469
+ def get_network_trace_operation_with_http_info(resource_group_name, name, operation_id, custom_headers:nil)
11470
+ get_network_trace_operation_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
11471
+ end
11472
+
11473
+ #
11474
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11475
+ # specified).
11476
+ #
11477
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11478
+ # specified).
11479
+ #
11480
+ # @param resource_group_name [String] Name of the resource group to which the
11481
+ # resource belongs.
11482
+ # @param name [String] Name of the app.
11483
+ # @param operation_id [String] GUID of the operation.
11484
+ # @param [Hash{String => String}] A hash of custom headers that will be added
11485
+ # to the HTTP request.
11486
+ #
11487
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
11488
+ #
11489
+ def get_network_trace_operation_async(resource_group_name, name, operation_id, custom_headers:nil)
11490
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
11491
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
11492
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
11493
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
11494
+ fail ArgumentError, 'name is nil' if name.nil?
11495
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
11496
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
11497
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
11498
+
11499
+
11500
+ request_headers = {}
11501
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
11502
+
11503
+ # Set Headers
11504
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
11505
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
11506
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'
11507
+
11508
+ request_url = @base_url || @client.base_url
11509
+
11510
+ options = {
11511
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
11512
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
11513
+ query_params: {'api-version' => @client.api_version},
11514
+ headers: request_headers.merge(custom_headers || {}),
11515
+ base_url: request_url
11516
+ }
11517
+ promise = @client.make_request_async(:get, path_template, options)
11518
+
11519
+ promise = promise.then do |result|
11520
+ http_response = result.response
11521
+ status_code = http_response.status
11522
+ response_content = http_response.body
11523
+ unless status_code == 200 || status_code == 202
11524
+ error_model = JSON.load(response_content)
11525
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
11526
+ end
11527
+
11528
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
11529
+ # Deserialize Response
11530
+ if status_code == 200
11531
+ begin
11532
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
11533
+ result_mapper = {
11534
+ client_side_validation: true,
11535
+ required: false,
11536
+ serialized_name: 'parsed_response',
11537
+ type: {
11538
+ name: 'Sequence',
11539
+ element: {
11540
+ client_side_validation: true,
11541
+ required: false,
11542
+ serialized_name: 'NetworkTraceElementType',
11543
+ type: {
11544
+ name: 'Composite',
11545
+ class_name: 'NetworkTrace'
11546
+ }
11547
+ }
11548
+ }
11549
+ }
11550
+ result.body = @client.deserialize(result_mapper, parsed_response)
11551
+ rescue Exception => e
11552
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
11553
+ end
11554
+ end
11555
+ # Deserialize Response
11556
+ if status_code == 202
11557
+ begin
11558
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
11559
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Operation.mapper()
11560
+ result.body = @client.deserialize(result_mapper, parsed_response)
11561
+ rescue Exception => e
11562
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
11563
+ end
11564
+ end
11565
+
11566
+ result
11567
+ end
11568
+
11569
+ promise.execute
11570
+ end
11571
+
11572
+ #
11573
+ # Start capturing network packets for the site (To be deprecated).
11574
+ #
11575
+ # Start capturing network packets for the site (To be deprecated).
11214
11576
  #
11215
11577
  # @param resource_group_name [String] Name of the resource group to which the
11216
11578
  # resource belongs.
@@ -11231,9 +11593,9 @@ module Azure::Web::Mgmt::V2018_02_01
11231
11593
  end
11232
11594
 
11233
11595
  #
11234
- # Start capturing network packets for the site.
11596
+ # Start capturing network packets for the site (To be deprecated).
11235
11597
  #
11236
- # Start capturing network packets for the site.
11598
+ # Start capturing network packets for the site (To be deprecated).
11237
11599
  #
11238
11600
  # @param resource_group_name [String] Name of the resource group to which the
11239
11601
  # resource belongs.
@@ -11253,9 +11615,9 @@ module Azure::Web::Mgmt::V2018_02_01
11253
11615
  end
11254
11616
 
11255
11617
  #
11256
- # Start capturing network packets for the site.
11618
+ # Start capturing network packets for the site (To be deprecated).
11257
11619
  #
11258
- # Start capturing network packets for the site.
11620
+ # Start capturing network packets for the site (To be deprecated).
11259
11621
  #
11260
11622
  # @param resource_group_name [String] Name of the resource group to which the
11261
11623
  # resource belongs.
@@ -11333,6 +11695,69 @@ module Azure::Web::Mgmt::V2018_02_01
11333
11695
  promise.execute
11334
11696
  end
11335
11697
 
11698
+ #
11699
+ # Start capturing network packets for the site.
11700
+ #
11701
+ # Start capturing network packets for the site.
11702
+ #
11703
+ # @param resource_group_name [String] Name of the resource group to which the
11704
+ # resource belongs.
11705
+ # @param name [String] The name of the web app.
11706
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
11707
+ # seconds.
11708
+ # @param max_frame_length [Integer] The maximum frame length in bytes
11709
+ # (Optional).
11710
+ # @param sas_url [String] The Blob URL to store capture file.
11711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
11712
+ # will be added to the HTTP request.
11713
+ #
11714
+ # @return [Object] operation results.
11715
+ #
11716
+ def start_web_site_network_trace_operation(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
11717
+ response = start_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value!
11718
+ response.body unless response.nil?
11719
+ end
11720
+
11721
+ #
11722
+ # @param resource_group_name [String] Name of the resource group to which the
11723
+ # resource belongs.
11724
+ # @param name [String] The name of the web app.
11725
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
11726
+ # seconds.
11727
+ # @param max_frame_length [Integer] The maximum frame length in bytes
11728
+ # (Optional).
11729
+ # @param sas_url [String] The Blob URL to store capture file.
11730
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
11731
+ # will be added to the HTTP request.
11732
+ #
11733
+ # @return [Concurrent::Promise] promise which provides async access to http
11734
+ # response.
11735
+ #
11736
+ def start_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
11737
+ # Send request
11738
+ promise = begin_start_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers)
11739
+
11740
+ promise = promise.then do |response|
11741
+ # Defining deserialization method.
11742
+ deserialize_method = lambda do |parsed_response|
11743
+ result_mapper = {
11744
+ client_side_validation: true,
11745
+ required: false,
11746
+ serialized_name: 'parsed_response',
11747
+ type: {
11748
+ name: 'Object'
11749
+ }
11750
+ }
11751
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
11752
+ end
11753
+
11754
+ # Waiting for response.
11755
+ @client.get_long_running_operation_result(response, deserialize_method)
11756
+ end
11757
+
11758
+ promise
11759
+ end
11760
+
11336
11761
  #
11337
11762
  # Stop ongoing capturing network packets for the site.
11338
11763
  #
@@ -11344,11 +11769,10 @@ module Azure::Web::Mgmt::V2018_02_01
11344
11769
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
11345
11770
  # will be added to the HTTP request.
11346
11771
  #
11347
- # @return [String] operation results.
11348
11772
  #
11349
11773
  def stop_web_site_network_trace(resource_group_name, name, custom_headers:nil)
11350
11774
  response = stop_web_site_network_trace_async(resource_group_name, name, custom_headers:custom_headers).value!
11351
- response.body unless response.nil?
11775
+ nil
11352
11776
  end
11353
11777
 
11354
11778
  #
@@ -11410,6 +11834,110 @@ module Azure::Web::Mgmt::V2018_02_01
11410
11834
  }
11411
11835
  promise = @client.make_request_async(:post, path_template, options)
11412
11836
 
11837
+ promise = promise.then do |result|
11838
+ http_response = result.response
11839
+ status_code = http_response.status
11840
+ response_content = http_response.body
11841
+ unless status_code == 200 || status_code == 204
11842
+ error_model = JSON.load(response_content)
11843
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
11844
+ end
11845
+
11846
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
11847
+
11848
+ result
11849
+ end
11850
+
11851
+ promise.execute
11852
+ end
11853
+
11854
+ #
11855
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11856
+ # specified).
11857
+ #
11858
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11859
+ # specified).
11860
+ #
11861
+ # @param resource_group_name [String] Name of the resource group to which the
11862
+ # resource belongs.
11863
+ # @param name [String] Name of the app.
11864
+ # @param operation_id [String] GUID of the operation.
11865
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
11866
+ # will be added to the HTTP request.
11867
+ #
11868
+ # @return [Array] operation results.
11869
+ #
11870
+ def get_network_traces(resource_group_name, name, operation_id, custom_headers:nil)
11871
+ response = get_network_traces_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
11872
+ response.body unless response.nil?
11873
+ end
11874
+
11875
+ #
11876
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11877
+ # specified).
11878
+ #
11879
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11880
+ # specified).
11881
+ #
11882
+ # @param resource_group_name [String] Name of the resource group to which the
11883
+ # resource belongs.
11884
+ # @param name [String] Name of the app.
11885
+ # @param operation_id [String] GUID of the operation.
11886
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
11887
+ # will be added to the HTTP request.
11888
+ #
11889
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
11890
+ #
11891
+ def get_network_traces_with_http_info(resource_group_name, name, operation_id, custom_headers:nil)
11892
+ get_network_traces_async(resource_group_name, name, operation_id, custom_headers:custom_headers).value!
11893
+ end
11894
+
11895
+ #
11896
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11897
+ # specified).
11898
+ #
11899
+ # Gets a named operation for a network trace capturing (or deployment slot, if
11900
+ # specified).
11901
+ #
11902
+ # @param resource_group_name [String] Name of the resource group to which the
11903
+ # resource belongs.
11904
+ # @param name [String] Name of the app.
11905
+ # @param operation_id [String] GUID of the operation.
11906
+ # @param [Hash{String => String}] A hash of custom headers that will be added
11907
+ # to the HTTP request.
11908
+ #
11909
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
11910
+ #
11911
+ def get_network_traces_async(resource_group_name, name, operation_id, custom_headers:nil)
11912
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
11913
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
11914
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
11915
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
11916
+ fail ArgumentError, 'name is nil' if name.nil?
11917
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
11918
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
11919
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
11920
+
11921
+
11922
+ request_headers = {}
11923
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
11924
+
11925
+ # Set Headers
11926
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
11927
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
11928
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'
11929
+
11930
+ request_url = @base_url || @client.base_url
11931
+
11932
+ options = {
11933
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
11934
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
11935
+ query_params: {'api-version' => @client.api_version},
11936
+ headers: request_headers.merge(custom_headers || {}),
11937
+ base_url: request_url
11938
+ }
11939
+ promise = @client.make_request_async(:get, path_template, options)
11940
+
11413
11941
  promise = promise.then do |result|
11414
11942
  http_response = result.response
11415
11943
  status_code = http_response.status
@@ -11429,7 +11957,16 @@ module Azure::Web::Mgmt::V2018_02_01
11429
11957
  required: false,
11430
11958
  serialized_name: 'parsed_response',
11431
11959
  type: {
11432
- name: 'String'
11960
+ name: 'Sequence',
11961
+ element: {
11962
+ client_side_validation: true,
11963
+ required: false,
11964
+ serialized_name: 'NetworkTraceElementType',
11965
+ type: {
11966
+ name: 'Composite',
11967
+ class_name: 'NetworkTrace'
11968
+ }
11969
+ }
11433
11970
  }
11434
11971
  }
11435
11972
  result.body = @client.deserialize(result_mapper, parsed_response)
@@ -11553,7 +12090,7 @@ module Azure::Web::Mgmt::V2018_02_01
11553
12090
  # @param name [String] Name of web app.
11554
12091
  # @param filter [String] Return only usages/metrics specified in the filter.
11555
12092
  # Filter conforms to odata syntax. Example: $filter=(startTime eq
11556
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
12093
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
11557
12094
  # duration'[Hour|Minute|Day]'.
11558
12095
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
11559
12096
  # will be added to the HTTP request.
@@ -11575,7 +12112,7 @@ module Azure::Web::Mgmt::V2018_02_01
11575
12112
  # @param name [String] Name of web app.
11576
12113
  # @param filter [String] Return only usages/metrics specified in the filter.
11577
12114
  # Filter conforms to odata syntax. Example: $filter=(startTime eq
11578
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
12115
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
11579
12116
  # duration'[Hour|Minute|Day]'.
11580
12117
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
11581
12118
  # will be added to the HTTP request.
@@ -11596,7 +12133,7 @@ module Azure::Web::Mgmt::V2018_02_01
11596
12133
  # @param name [String] Name of web app.
11597
12134
  # @param filter [String] Return only usages/metrics specified in the filter.
11598
12135
  # Filter conforms to odata syntax. Example: $filter=(startTime eq
11599
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
12136
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
11600
12137
  # duration'[Hour|Minute|Day]'.
11601
12138
  # @param [Hash{String => String}] A hash of custom headers that will be added
11602
12139
  # to the HTTP request.
@@ -16729,69 +17266,75 @@ module Azure::Web::Mgmt::V2018_02_01
16729
17266
  end
16730
17267
 
16731
17268
  #
16732
- # Updates the backup configuration of an app.
17269
+ # Updates the Azure storage account configurations of an app.
16733
17270
  #
16734
- # Updates the backup configuration of an app.
17271
+ # Updates the Azure storage account configurations of an app.
16735
17272
  #
16736
17273
  # @param resource_group_name [String] Name of the resource group to which the
16737
17274
  # resource belongs.
16738
17275
  # @param name [String] Name of the app.
16739
- # @param request [BackupRequest] Edited backup configuration.
17276
+ # @param azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure
17277
+ # storage accounts of the app.
16740
17278
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
16741
- # the API will update the backup configuration for the production slot.
17279
+ # the API will update the Azure storage account configurations for the
17280
+ # production slot.
16742
17281
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
16743
17282
  # will be added to the HTTP request.
16744
17283
  #
16745
- # @return [BackupRequest] operation results.
17284
+ # @return [AzureStoragePropertyDictionaryResource] operation results.
16746
17285
  #
16747
- def update_backup_configuration_slot(resource_group_name, name, request, slot, custom_headers:nil)
16748
- response = update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
17286
+ def update_azure_storage_accounts_slot(resource_group_name, name, azure_storage_accounts, slot, custom_headers:nil)
17287
+ response = update_azure_storage_accounts_slot_async(resource_group_name, name, azure_storage_accounts, slot, custom_headers:custom_headers).value!
16749
17288
  response.body unless response.nil?
16750
17289
  end
16751
17290
 
16752
17291
  #
16753
- # Updates the backup configuration of an app.
17292
+ # Updates the Azure storage account configurations of an app.
16754
17293
  #
16755
- # Updates the backup configuration of an app.
17294
+ # Updates the Azure storage account configurations of an app.
16756
17295
  #
16757
17296
  # @param resource_group_name [String] Name of the resource group to which the
16758
17297
  # resource belongs.
16759
17298
  # @param name [String] Name of the app.
16760
- # @param request [BackupRequest] Edited backup configuration.
17299
+ # @param azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure
17300
+ # storage accounts of the app.
16761
17301
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
16762
- # the API will update the backup configuration for the production slot.
17302
+ # the API will update the Azure storage account configurations for the
17303
+ # production slot.
16763
17304
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
16764
17305
  # will be added to the HTTP request.
16765
17306
  #
16766
17307
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
16767
17308
  #
16768
- def update_backup_configuration_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil)
16769
- update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
17309
+ def update_azure_storage_accounts_slot_with_http_info(resource_group_name, name, azure_storage_accounts, slot, custom_headers:nil)
17310
+ update_azure_storage_accounts_slot_async(resource_group_name, name, azure_storage_accounts, slot, custom_headers:custom_headers).value!
16770
17311
  end
16771
17312
 
16772
17313
  #
16773
- # Updates the backup configuration of an app.
17314
+ # Updates the Azure storage account configurations of an app.
16774
17315
  #
16775
- # Updates the backup configuration of an app.
17316
+ # Updates the Azure storage account configurations of an app.
16776
17317
  #
16777
17318
  # @param resource_group_name [String] Name of the resource group to which the
16778
17319
  # resource belongs.
16779
17320
  # @param name [String] Name of the app.
16780
- # @param request [BackupRequest] Edited backup configuration.
17321
+ # @param azure_storage_accounts [AzureStoragePropertyDictionaryResource] Azure
17322
+ # storage accounts of the app.
16781
17323
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
16782
- # the API will update the backup configuration for the production slot.
17324
+ # the API will update the Azure storage account configurations for the
17325
+ # production slot.
16783
17326
  # @param [Hash{String => String}] A hash of custom headers that will be added
16784
17327
  # to the HTTP request.
16785
17328
  #
16786
17329
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
16787
17330
  #
16788
- def update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:nil)
17331
+ def update_azure_storage_accounts_slot_async(resource_group_name, name, azure_storage_accounts, slot, custom_headers:nil)
16789
17332
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
16790
17333
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
16791
17334
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
16792
17335
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
16793
17336
  fail ArgumentError, 'name is nil' if name.nil?
16794
- fail ArgumentError, 'request is nil' if request.nil?
17337
+ fail ArgumentError, 'azure_storage_accounts is nil' if azure_storage_accounts.nil?
16795
17338
  fail ArgumentError, 'slot is nil' if slot.nil?
16796
17339
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
16797
17340
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -16805,11 +17348,11 @@ module Azure::Web::Mgmt::V2018_02_01
16805
17348
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
16806
17349
 
16807
17350
  # Serialize Request
16808
- request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
16809
- request_content = @client.serialize(request_mapper, request)
17351
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource.mapper()
17352
+ request_content = @client.serialize(request_mapper, azure_storage_accounts)
16810
17353
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
16811
17354
 
16812
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'
17355
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'
16813
17356
 
16814
17357
  request_url = @base_url || @client.base_url
16815
17358
 
@@ -16837,7 +17380,7 @@ module Azure::Web::Mgmt::V2018_02_01
16837
17380
  if status_code == 200
16838
17381
  begin
16839
17382
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
16840
- result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
17383
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource.mapper()
16841
17384
  result.body = @client.deserialize(result_mapper, parsed_response)
16842
17385
  rescue Exception => e
16843
17386
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -16851,160 +17394,63 @@ module Azure::Web::Mgmt::V2018_02_01
16851
17394
  end
16852
17395
 
16853
17396
  #
16854
- # Deletes the backup configuration of an app.
17397
+ # Gets the Azure storage account configurations of an app.
16855
17398
  #
16856
- # Deletes the backup configuration of an app.
17399
+ # Gets the Azure storage account configurations of an app.
16857
17400
  #
16858
17401
  # @param resource_group_name [String] Name of the resource group to which the
16859
17402
  # resource belongs.
16860
17403
  # @param name [String] Name of the app.
16861
17404
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
16862
- # the API will delete the backup configuration for the production slot.
17405
+ # the API will update the Azure storage account configurations for the
17406
+ # production slot.
16863
17407
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
16864
17408
  # will be added to the HTTP request.
16865
17409
  #
17410
+ # @return [AzureStoragePropertyDictionaryResource] operation results.
16866
17411
  #
16867
- def delete_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil)
16868
- response = delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
16869
- nil
16870
- end
16871
-
16872
- #
16873
- # Deletes the backup configuration of an app.
16874
- #
16875
- # Deletes the backup configuration of an app.
16876
- #
16877
- # @param resource_group_name [String] Name of the resource group to which the
16878
- # resource belongs.
16879
- # @param name [String] Name of the app.
16880
- # @param slot [String] Name of the deployment slot. If a slot is not specified,
16881
- # the API will delete the backup configuration for the production slot.
16882
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
16883
- # will be added to the HTTP request.
16884
- #
16885
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
16886
- #
16887
- def delete_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
16888
- delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
16889
- end
16890
-
16891
- #
16892
- # Deletes the backup configuration of an app.
16893
- #
16894
- # Deletes the backup configuration of an app.
16895
- #
16896
- # @param resource_group_name [String] Name of the resource group to which the
16897
- # resource belongs.
16898
- # @param name [String] Name of the app.
16899
- # @param slot [String] Name of the deployment slot. If a slot is not specified,
16900
- # the API will delete the backup configuration for the production slot.
16901
- # @param [Hash{String => String}] A hash of custom headers that will be added
16902
- # to the HTTP request.
16903
- #
16904
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
16905
- #
16906
- def delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil)
16907
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
16908
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
16909
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
16910
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
16911
- fail ArgumentError, 'name is nil' if name.nil?
16912
- fail ArgumentError, 'slot is nil' if slot.nil?
16913
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
16914
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
16915
-
16916
-
16917
- request_headers = {}
16918
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
16919
-
16920
- # Set Headers
16921
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
16922
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
16923
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'
16924
-
16925
- request_url = @base_url || @client.base_url
16926
-
16927
- options = {
16928
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
16929
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
16930
- query_params: {'api-version' => @client.api_version},
16931
- headers: request_headers.merge(custom_headers || {}),
16932
- base_url: request_url
16933
- }
16934
- promise = @client.make_request_async(:delete, path_template, options)
16935
-
16936
- promise = promise.then do |result|
16937
- http_response = result.response
16938
- status_code = http_response.status
16939
- response_content = http_response.body
16940
- unless status_code == 200
16941
- error_model = JSON.load(response_content)
16942
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
16943
- end
16944
-
16945
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
16946
-
16947
- result
16948
- end
16949
-
16950
- promise.execute
16951
- end
16952
-
16953
- #
16954
- # Gets the backup configuration of an app.
16955
- #
16956
- # Gets the backup configuration of an app.
16957
- #
16958
- # @param resource_group_name [String] Name of the resource group to which the
16959
- # resource belongs.
16960
- # @param name [String] Name of the app.
16961
- # @param slot [String] Name of the deployment slot. If a slot is not specified,
16962
- # the API will get the backup configuration for the production slot.
16963
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
16964
- # will be added to the HTTP request.
16965
- #
16966
- # @return [BackupRequest] operation results.
16967
- #
16968
- def get_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil)
16969
- response = get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
17412
+ def list_azure_storage_accounts_slot(resource_group_name, name, slot, custom_headers:nil)
17413
+ response = list_azure_storage_accounts_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
16970
17414
  response.body unless response.nil?
16971
17415
  end
16972
17416
 
16973
17417
  #
16974
- # Gets the backup configuration of an app.
17418
+ # Gets the Azure storage account configurations of an app.
16975
17419
  #
16976
- # Gets the backup configuration of an app.
17420
+ # Gets the Azure storage account configurations of an app.
16977
17421
  #
16978
17422
  # @param resource_group_name [String] Name of the resource group to which the
16979
17423
  # resource belongs.
16980
17424
  # @param name [String] Name of the app.
16981
17425
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
16982
- # the API will get the backup configuration for the production slot.
17426
+ # the API will update the Azure storage account configurations for the
17427
+ # production slot.
16983
17428
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
16984
17429
  # will be added to the HTTP request.
16985
17430
  #
16986
17431
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
16987
17432
  #
16988
- def get_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
16989
- get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
17433
+ def list_azure_storage_accounts_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
17434
+ list_azure_storage_accounts_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
16990
17435
  end
16991
17436
 
16992
17437
  #
16993
- # Gets the backup configuration of an app.
17438
+ # Gets the Azure storage account configurations of an app.
16994
17439
  #
16995
- # Gets the backup configuration of an app.
17440
+ # Gets the Azure storage account configurations of an app.
16996
17441
  #
16997
17442
  # @param resource_group_name [String] Name of the resource group to which the
16998
17443
  # resource belongs.
16999
17444
  # @param name [String] Name of the app.
17000
17445
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
17001
- # the API will get the backup configuration for the production slot.
17446
+ # the API will update the Azure storage account configurations for the
17447
+ # production slot.
17002
17448
  # @param [Hash{String => String}] A hash of custom headers that will be added
17003
17449
  # to the HTTP request.
17004
17450
  #
17005
17451
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
17006
17452
  #
17007
- def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil)
17453
+ def list_azure_storage_accounts_slot_async(resource_group_name, name, slot, custom_headers:nil)
17008
17454
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
17009
17455
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
17010
17456
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -17021,7 +17467,7 @@ module Azure::Web::Mgmt::V2018_02_01
17021
17467
  # Set Headers
17022
17468
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
17023
17469
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
17024
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'
17470
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'
17025
17471
 
17026
17472
  request_url = @base_url || @client.base_url
17027
17473
 
@@ -17048,7 +17494,7 @@ module Azure::Web::Mgmt::V2018_02_01
17048
17494
  if status_code == 200
17049
17495
  begin
17050
17496
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
17051
- result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
17497
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::AzureStoragePropertyDictionaryResource.mapper()
17052
17498
  result.body = @client.deserialize(result_mapper, parsed_response)
17053
17499
  rescue Exception => e
17054
17500
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -17062,72 +17508,69 @@ module Azure::Web::Mgmt::V2018_02_01
17062
17508
  end
17063
17509
 
17064
17510
  #
17065
- # Replaces the connection strings of an app.
17511
+ # Updates the backup configuration of an app.
17066
17512
  #
17067
- # Replaces the connection strings of an app.
17513
+ # Updates the backup configuration of an app.
17068
17514
  #
17069
17515
  # @param resource_group_name [String] Name of the resource group to which the
17070
17516
  # resource belongs.
17071
17517
  # @param name [String] Name of the app.
17072
- # @param connection_strings [ConnectionStringDictionary] Connection strings of
17073
- # the app or deployment slot. See example.
17518
+ # @param request [BackupRequest] Edited backup configuration.
17074
17519
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
17075
- # the API will update the connection settings for the production slot.
17520
+ # the API will update the backup configuration for the production slot.
17076
17521
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
17077
17522
  # will be added to the HTTP request.
17078
17523
  #
17079
- # @return [ConnectionStringDictionary] operation results.
17524
+ # @return [BackupRequest] operation results.
17080
17525
  #
17081
- def update_connection_strings_slot(resource_group_name, name, connection_strings, slot, custom_headers:nil)
17082
- response = update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:custom_headers).value!
17526
+ def update_backup_configuration_slot(resource_group_name, name, request, slot, custom_headers:nil)
17527
+ response = update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
17083
17528
  response.body unless response.nil?
17084
17529
  end
17085
17530
 
17086
17531
  #
17087
- # Replaces the connection strings of an app.
17532
+ # Updates the backup configuration of an app.
17088
17533
  #
17089
- # Replaces the connection strings of an app.
17534
+ # Updates the backup configuration of an app.
17090
17535
  #
17091
17536
  # @param resource_group_name [String] Name of the resource group to which the
17092
17537
  # resource belongs.
17093
17538
  # @param name [String] Name of the app.
17094
- # @param connection_strings [ConnectionStringDictionary] Connection strings of
17095
- # the app or deployment slot. See example.
17539
+ # @param request [BackupRequest] Edited backup configuration.
17096
17540
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
17097
- # the API will update the connection settings for the production slot.
17541
+ # the API will update the backup configuration for the production slot.
17098
17542
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
17099
17543
  # will be added to the HTTP request.
17100
17544
  #
17101
17545
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
17102
17546
  #
17103
- def update_connection_strings_slot_with_http_info(resource_group_name, name, connection_strings, slot, custom_headers:nil)
17104
- update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:custom_headers).value!
17547
+ def update_backup_configuration_slot_with_http_info(resource_group_name, name, request, slot, custom_headers:nil)
17548
+ update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:custom_headers).value!
17105
17549
  end
17106
17550
 
17107
17551
  #
17108
- # Replaces the connection strings of an app.
17552
+ # Updates the backup configuration of an app.
17109
17553
  #
17110
- # Replaces the connection strings of an app.
17554
+ # Updates the backup configuration of an app.
17111
17555
  #
17112
17556
  # @param resource_group_name [String] Name of the resource group to which the
17113
17557
  # resource belongs.
17114
17558
  # @param name [String] Name of the app.
17115
- # @param connection_strings [ConnectionStringDictionary] Connection strings of
17116
- # the app or deployment slot. See example.
17559
+ # @param request [BackupRequest] Edited backup configuration.
17117
17560
  # @param slot [String] Name of the deployment slot. If a slot is not specified,
17118
- # the API will update the connection settings for the production slot.
17561
+ # the API will update the backup configuration for the production slot.
17119
17562
  # @param [Hash{String => String}] A hash of custom headers that will be added
17120
17563
  # to the HTTP request.
17121
17564
  #
17122
17565
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
17123
17566
  #
17124
- def update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:nil)
17567
+ def update_backup_configuration_slot_async(resource_group_name, name, request, slot, custom_headers:nil)
17125
17568
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
17126
17569
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
17127
17570
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
17128
17571
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
17129
17572
  fail ArgumentError, 'name is nil' if name.nil?
17130
- fail ArgumentError, 'connection_strings is nil' if connection_strings.nil?
17573
+ fail ArgumentError, 'request is nil' if request.nil?
17131
17574
  fail ArgumentError, 'slot is nil' if slot.nil?
17132
17575
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
17133
17576
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -17141,11 +17584,347 @@ module Azure::Web::Mgmt::V2018_02_01
17141
17584
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
17142
17585
 
17143
17586
  # Serialize Request
17144
- request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ConnectionStringDictionary.mapper()
17145
- request_content = @client.serialize(request_mapper, connection_strings)
17587
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
17588
+ request_content = @client.serialize(request_mapper, request)
17146
17589
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
17147
17590
 
17148
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'
17591
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'
17592
+
17593
+ request_url = @base_url || @client.base_url
17594
+
17595
+ options = {
17596
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
17597
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
17598
+ query_params: {'api-version' => @client.api_version},
17599
+ body: request_content,
17600
+ headers: request_headers.merge(custom_headers || {}),
17601
+ base_url: request_url
17602
+ }
17603
+ promise = @client.make_request_async(:put, path_template, options)
17604
+
17605
+ promise = promise.then do |result|
17606
+ http_response = result.response
17607
+ status_code = http_response.status
17608
+ response_content = http_response.body
17609
+ unless status_code == 200
17610
+ error_model = JSON.load(response_content)
17611
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
17612
+ end
17613
+
17614
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
17615
+ # Deserialize Response
17616
+ if status_code == 200
17617
+ begin
17618
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
17619
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
17620
+ result.body = @client.deserialize(result_mapper, parsed_response)
17621
+ rescue Exception => e
17622
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
17623
+ end
17624
+ end
17625
+
17626
+ result
17627
+ end
17628
+
17629
+ promise.execute
17630
+ end
17631
+
17632
+ #
17633
+ # Deletes the backup configuration of an app.
17634
+ #
17635
+ # Deletes the backup configuration of an app.
17636
+ #
17637
+ # @param resource_group_name [String] Name of the resource group to which the
17638
+ # resource belongs.
17639
+ # @param name [String] Name of the app.
17640
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17641
+ # the API will delete the backup configuration for the production slot.
17642
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
17643
+ # will be added to the HTTP request.
17644
+ #
17645
+ #
17646
+ def delete_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil)
17647
+ response = delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
17648
+ nil
17649
+ end
17650
+
17651
+ #
17652
+ # Deletes the backup configuration of an app.
17653
+ #
17654
+ # Deletes the backup configuration of an app.
17655
+ #
17656
+ # @param resource_group_name [String] Name of the resource group to which the
17657
+ # resource belongs.
17658
+ # @param name [String] Name of the app.
17659
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17660
+ # the API will delete the backup configuration for the production slot.
17661
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
17662
+ # will be added to the HTTP request.
17663
+ #
17664
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
17665
+ #
17666
+ def delete_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
17667
+ delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
17668
+ end
17669
+
17670
+ #
17671
+ # Deletes the backup configuration of an app.
17672
+ #
17673
+ # Deletes the backup configuration of an app.
17674
+ #
17675
+ # @param resource_group_name [String] Name of the resource group to which the
17676
+ # resource belongs.
17677
+ # @param name [String] Name of the app.
17678
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17679
+ # the API will delete the backup configuration for the production slot.
17680
+ # @param [Hash{String => String}] A hash of custom headers that will be added
17681
+ # to the HTTP request.
17682
+ #
17683
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
17684
+ #
17685
+ def delete_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil)
17686
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
17687
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
17688
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
17689
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
17690
+ fail ArgumentError, 'name is nil' if name.nil?
17691
+ fail ArgumentError, 'slot is nil' if slot.nil?
17692
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
17693
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
17694
+
17695
+
17696
+ request_headers = {}
17697
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
17698
+
17699
+ # Set Headers
17700
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
17701
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
17702
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'
17703
+
17704
+ request_url = @base_url || @client.base_url
17705
+
17706
+ options = {
17707
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
17708
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
17709
+ query_params: {'api-version' => @client.api_version},
17710
+ headers: request_headers.merge(custom_headers || {}),
17711
+ base_url: request_url
17712
+ }
17713
+ promise = @client.make_request_async(:delete, path_template, options)
17714
+
17715
+ promise = promise.then do |result|
17716
+ http_response = result.response
17717
+ status_code = http_response.status
17718
+ response_content = http_response.body
17719
+ unless status_code == 200
17720
+ error_model = JSON.load(response_content)
17721
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
17722
+ end
17723
+
17724
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
17725
+
17726
+ result
17727
+ end
17728
+
17729
+ promise.execute
17730
+ end
17731
+
17732
+ #
17733
+ # Gets the backup configuration of an app.
17734
+ #
17735
+ # Gets the backup configuration of an app.
17736
+ #
17737
+ # @param resource_group_name [String] Name of the resource group to which the
17738
+ # resource belongs.
17739
+ # @param name [String] Name of the app.
17740
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17741
+ # the API will get the backup configuration for the production slot.
17742
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
17743
+ # will be added to the HTTP request.
17744
+ #
17745
+ # @return [BackupRequest] operation results.
17746
+ #
17747
+ def get_backup_configuration_slot(resource_group_name, name, slot, custom_headers:nil)
17748
+ response = get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
17749
+ response.body unless response.nil?
17750
+ end
17751
+
17752
+ #
17753
+ # Gets the backup configuration of an app.
17754
+ #
17755
+ # Gets the backup configuration of an app.
17756
+ #
17757
+ # @param resource_group_name [String] Name of the resource group to which the
17758
+ # resource belongs.
17759
+ # @param name [String] Name of the app.
17760
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17761
+ # the API will get the backup configuration for the production slot.
17762
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
17763
+ # will be added to the HTTP request.
17764
+ #
17765
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
17766
+ #
17767
+ def get_backup_configuration_slot_with_http_info(resource_group_name, name, slot, custom_headers:nil)
17768
+ get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
17769
+ end
17770
+
17771
+ #
17772
+ # Gets the backup configuration of an app.
17773
+ #
17774
+ # Gets the backup configuration of an app.
17775
+ #
17776
+ # @param resource_group_name [String] Name of the resource group to which the
17777
+ # resource belongs.
17778
+ # @param name [String] Name of the app.
17779
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17780
+ # the API will get the backup configuration for the production slot.
17781
+ # @param [Hash{String => String}] A hash of custom headers that will be added
17782
+ # to the HTTP request.
17783
+ #
17784
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
17785
+ #
17786
+ def get_backup_configuration_slot_async(resource_group_name, name, slot, custom_headers:nil)
17787
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
17788
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
17789
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
17790
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
17791
+ fail ArgumentError, 'name is nil' if name.nil?
17792
+ fail ArgumentError, 'slot is nil' if slot.nil?
17793
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
17794
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
17795
+
17796
+
17797
+ request_headers = {}
17798
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
17799
+
17800
+ # Set Headers
17801
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
17802
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
17803
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'
17804
+
17805
+ request_url = @base_url || @client.base_url
17806
+
17807
+ options = {
17808
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
17809
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
17810
+ query_params: {'api-version' => @client.api_version},
17811
+ headers: request_headers.merge(custom_headers || {}),
17812
+ base_url: request_url
17813
+ }
17814
+ promise = @client.make_request_async(:post, path_template, options)
17815
+
17816
+ promise = promise.then do |result|
17817
+ http_response = result.response
17818
+ status_code = http_response.status
17819
+ response_content = http_response.body
17820
+ unless status_code == 200
17821
+ error_model = JSON.load(response_content)
17822
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
17823
+ end
17824
+
17825
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
17826
+ # Deserialize Response
17827
+ if status_code == 200
17828
+ begin
17829
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
17830
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::BackupRequest.mapper()
17831
+ result.body = @client.deserialize(result_mapper, parsed_response)
17832
+ rescue Exception => e
17833
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
17834
+ end
17835
+ end
17836
+
17837
+ result
17838
+ end
17839
+
17840
+ promise.execute
17841
+ end
17842
+
17843
+ #
17844
+ # Replaces the connection strings of an app.
17845
+ #
17846
+ # Replaces the connection strings of an app.
17847
+ #
17848
+ # @param resource_group_name [String] Name of the resource group to which the
17849
+ # resource belongs.
17850
+ # @param name [String] Name of the app.
17851
+ # @param connection_strings [ConnectionStringDictionary] Connection strings of
17852
+ # the app or deployment slot. See example.
17853
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17854
+ # the API will update the connection settings for the production slot.
17855
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
17856
+ # will be added to the HTTP request.
17857
+ #
17858
+ # @return [ConnectionStringDictionary] operation results.
17859
+ #
17860
+ def update_connection_strings_slot(resource_group_name, name, connection_strings, slot, custom_headers:nil)
17861
+ response = update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:custom_headers).value!
17862
+ response.body unless response.nil?
17863
+ end
17864
+
17865
+ #
17866
+ # Replaces the connection strings of an app.
17867
+ #
17868
+ # Replaces the connection strings of an app.
17869
+ #
17870
+ # @param resource_group_name [String] Name of the resource group to which the
17871
+ # resource belongs.
17872
+ # @param name [String] Name of the app.
17873
+ # @param connection_strings [ConnectionStringDictionary] Connection strings of
17874
+ # the app or deployment slot. See example.
17875
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17876
+ # the API will update the connection settings for the production slot.
17877
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
17878
+ # will be added to the HTTP request.
17879
+ #
17880
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
17881
+ #
17882
+ def update_connection_strings_slot_with_http_info(resource_group_name, name, connection_strings, slot, custom_headers:nil)
17883
+ update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:custom_headers).value!
17884
+ end
17885
+
17886
+ #
17887
+ # Replaces the connection strings of an app.
17888
+ #
17889
+ # Replaces the connection strings of an app.
17890
+ #
17891
+ # @param resource_group_name [String] Name of the resource group to which the
17892
+ # resource belongs.
17893
+ # @param name [String] Name of the app.
17894
+ # @param connection_strings [ConnectionStringDictionary] Connection strings of
17895
+ # the app or deployment slot. See example.
17896
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
17897
+ # the API will update the connection settings for the production slot.
17898
+ # @param [Hash{String => String}] A hash of custom headers that will be added
17899
+ # to the HTTP request.
17900
+ #
17901
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
17902
+ #
17903
+ def update_connection_strings_slot_async(resource_group_name, name, connection_strings, slot, custom_headers:nil)
17904
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
17905
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
17906
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
17907
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
17908
+ fail ArgumentError, 'name is nil' if name.nil?
17909
+ fail ArgumentError, 'connection_strings is nil' if connection_strings.nil?
17910
+ fail ArgumentError, 'slot is nil' if slot.nil?
17911
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
17912
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
17913
+
17914
+
17915
+ request_headers = {}
17916
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
17917
+
17918
+ # Set Headers
17919
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
17920
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
17921
+
17922
+ # Serialize Request
17923
+ request_mapper = Azure::Web::Mgmt::V2018_02_01::Models::ConnectionStringDictionary.mapper()
17924
+ request_content = @client.serialize(request_mapper, connection_strings)
17925
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
17926
+
17927
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'
17149
17928
 
17150
17929
  request_url = @base_url || @client.base_url
17151
17930
 
@@ -25797,8 +26576,8 @@ module Azure::Web::Mgmt::V2018_02_01
25797
26576
  # response. It is "false" by default.
25798
26577
  # @param filter [String] Return only metrics specified in the filter (using
25799
26578
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
25800
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
25801
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
26579
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
26580
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
25802
26581
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
25803
26582
  # will be added to the HTTP request.
25804
26583
  #
@@ -25823,8 +26602,8 @@ module Azure::Web::Mgmt::V2018_02_01
25823
26602
  # response. It is "false" by default.
25824
26603
  # @param filter [String] Return only metrics specified in the filter (using
25825
26604
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
25826
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
25827
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
26605
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
26606
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
25828
26607
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
25829
26608
  # will be added to the HTTP request.
25830
26609
  #
@@ -25848,8 +26627,8 @@ module Azure::Web::Mgmt::V2018_02_01
25848
26627
  # response. It is "false" by default.
25849
26628
  # @param filter [String] Return only metrics specified in the filter (using
25850
26629
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
25851
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
25852
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
26630
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
26631
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
25853
26632
  # @param [Hash{String => String}] A hash of custom headers that will be added
25854
26633
  # to the HTTP request.
25855
26634
  #
@@ -26146,9 +26925,156 @@ module Azure::Web::Mgmt::V2018_02_01
26146
26925
  end
26147
26926
 
26148
26927
  #
26149
- # Start capturing network packets for the site.
26928
+ # Gets a named operation for a network trace capturing (or deployment slot, if
26929
+ # specified).
26150
26930
  #
26151
- # Start capturing network packets for the site.
26931
+ # Gets a named operation for a network trace capturing (or deployment slot, if
26932
+ # specified).
26933
+ #
26934
+ # @param resource_group_name [String] Name of the resource group to which the
26935
+ # resource belongs.
26936
+ # @param name [String] Name of the app.
26937
+ # @param operation_id [String] GUID of the operation.
26938
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
26939
+ # the API will get an operation for the production slot.
26940
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
26941
+ # will be added to the HTTP request.
26942
+ #
26943
+ # @return [Object] operation results.
26944
+ #
26945
+ def get_network_trace_operation_slot(resource_group_name, name, operation_id, slot, custom_headers:nil)
26946
+ response = get_network_trace_operation_slot_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
26947
+ response.body unless response.nil?
26948
+ end
26949
+
26950
+ #
26951
+ # Gets a named operation for a network trace capturing (or deployment slot, if
26952
+ # specified).
26953
+ #
26954
+ # Gets a named operation for a network trace capturing (or deployment slot, if
26955
+ # specified).
26956
+ #
26957
+ # @param resource_group_name [String] Name of the resource group to which the
26958
+ # resource belongs.
26959
+ # @param name [String] Name of the app.
26960
+ # @param operation_id [String] GUID of the operation.
26961
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
26962
+ # the API will get an operation for the production slot.
26963
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
26964
+ # will be added to the HTTP request.
26965
+ #
26966
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
26967
+ #
26968
+ def get_network_trace_operation_slot_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil)
26969
+ get_network_trace_operation_slot_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
26970
+ end
26971
+
26972
+ #
26973
+ # Gets a named operation for a network trace capturing (or deployment slot, if
26974
+ # specified).
26975
+ #
26976
+ # Gets a named operation for a network trace capturing (or deployment slot, if
26977
+ # specified).
26978
+ #
26979
+ # @param resource_group_name [String] Name of the resource group to which the
26980
+ # resource belongs.
26981
+ # @param name [String] Name of the app.
26982
+ # @param operation_id [String] GUID of the operation.
26983
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
26984
+ # the API will get an operation for the production slot.
26985
+ # @param [Hash{String => String}] A hash of custom headers that will be added
26986
+ # to the HTTP request.
26987
+ #
26988
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
26989
+ #
26990
+ def get_network_trace_operation_slot_async(resource_group_name, name, operation_id, slot, custom_headers:nil)
26991
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
26992
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
26993
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
26994
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
26995
+ fail ArgumentError, 'name is nil' if name.nil?
26996
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
26997
+ fail ArgumentError, 'slot is nil' if slot.nil?
26998
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
26999
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
27000
+
27001
+
27002
+ request_headers = {}
27003
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
27004
+
27005
+ # Set Headers
27006
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
27007
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
27008
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'
27009
+
27010
+ request_url = @base_url || @client.base_url
27011
+
27012
+ options = {
27013
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
27014
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
27015
+ query_params: {'api-version' => @client.api_version},
27016
+ headers: request_headers.merge(custom_headers || {}),
27017
+ base_url: request_url
27018
+ }
27019
+ promise = @client.make_request_async(:get, path_template, options)
27020
+
27021
+ promise = promise.then do |result|
27022
+ http_response = result.response
27023
+ status_code = http_response.status
27024
+ response_content = http_response.body
27025
+ unless status_code == 200 || status_code == 202
27026
+ error_model = JSON.load(response_content)
27027
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
27028
+ end
27029
+
27030
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
27031
+ # Deserialize Response
27032
+ if status_code == 200
27033
+ begin
27034
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
27035
+ result_mapper = {
27036
+ client_side_validation: true,
27037
+ required: false,
27038
+ serialized_name: 'parsed_response',
27039
+ type: {
27040
+ name: 'Sequence',
27041
+ element: {
27042
+ client_side_validation: true,
27043
+ required: false,
27044
+ serialized_name: 'NetworkTraceElementType',
27045
+ type: {
27046
+ name: 'Composite',
27047
+ class_name: 'NetworkTrace'
27048
+ }
27049
+ }
27050
+ }
27051
+ }
27052
+ result.body = @client.deserialize(result_mapper, parsed_response)
27053
+ rescue Exception => e
27054
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
27055
+ end
27056
+ end
27057
+ # Deserialize Response
27058
+ if status_code == 202
27059
+ begin
27060
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
27061
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Operation.mapper()
27062
+ result.body = @client.deserialize(result_mapper, parsed_response)
27063
+ rescue Exception => e
27064
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
27065
+ end
27066
+ end
27067
+
27068
+ result
27069
+ end
27070
+
27071
+ promise.execute
27072
+ end
27073
+
27074
+ #
27075
+ # Start capturing network packets for the site (To be deprecated).
27076
+ #
27077
+ # Start capturing network packets for the site (To be deprecated).
26152
27078
  #
26153
27079
  # @param resource_group_name [String] Name of the resource group to which the
26154
27080
  # resource belongs.
@@ -26170,9 +27096,9 @@ module Azure::Web::Mgmt::V2018_02_01
26170
27096
  end
26171
27097
 
26172
27098
  #
26173
- # Start capturing network packets for the site.
27099
+ # Start capturing network packets for the site (To be deprecated).
26174
27100
  #
26175
- # Start capturing network packets for the site.
27101
+ # Start capturing network packets for the site (To be deprecated).
26176
27102
  #
26177
27103
  # @param resource_group_name [String] Name of the resource group to which the
26178
27104
  # resource belongs.
@@ -26193,9 +27119,9 @@ module Azure::Web::Mgmt::V2018_02_01
26193
27119
  end
26194
27120
 
26195
27121
  #
26196
- # Start capturing network packets for the site.
27122
+ # Start capturing network packets for the site (To be deprecated).
26197
27123
  #
26198
- # Start capturing network packets for the site.
27124
+ # Start capturing network packets for the site (To be deprecated).
26199
27125
  #
26200
27126
  # @param resource_group_name [String] Name of the resource group to which the
26201
27127
  # resource belongs.
@@ -26275,6 +27201,71 @@ module Azure::Web::Mgmt::V2018_02_01
26275
27201
  promise.execute
26276
27202
  end
26277
27203
 
27204
+ #
27205
+ # Start capturing network packets for the site.
27206
+ #
27207
+ # Start capturing network packets for the site.
27208
+ #
27209
+ # @param resource_group_name [String] Name of the resource group to which the
27210
+ # resource belongs.
27211
+ # @param name [String] The name of the web app.
27212
+ # @param slot [String] The name of the slot for this web app.
27213
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
27214
+ # seconds.
27215
+ # @param max_frame_length [Integer] The maximum frame length in bytes
27216
+ # (Optional).
27217
+ # @param sas_url [String] The Blob URL to store capture file.
27218
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
27219
+ # will be added to the HTTP request.
27220
+ #
27221
+ # @return [Object] operation results.
27222
+ #
27223
+ def start_web_site_network_trace_operation_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
27224
+ response = start_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value!
27225
+ response.body unless response.nil?
27226
+ end
27227
+
27228
+ #
27229
+ # @param resource_group_name [String] Name of the resource group to which the
27230
+ # resource belongs.
27231
+ # @param name [String] The name of the web app.
27232
+ # @param slot [String] The name of the slot for this web app.
27233
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
27234
+ # seconds.
27235
+ # @param max_frame_length [Integer] The maximum frame length in bytes
27236
+ # (Optional).
27237
+ # @param sas_url [String] The Blob URL to store capture file.
27238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
27239
+ # will be added to the HTTP request.
27240
+ #
27241
+ # @return [Concurrent::Promise] promise which provides async access to http
27242
+ # response.
27243
+ #
27244
+ def start_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
27245
+ # Send request
27246
+ promise = begin_start_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers)
27247
+
27248
+ promise = promise.then do |response|
27249
+ # Defining deserialization method.
27250
+ deserialize_method = lambda do |parsed_response|
27251
+ result_mapper = {
27252
+ client_side_validation: true,
27253
+ required: false,
27254
+ serialized_name: 'parsed_response',
27255
+ type: {
27256
+ name: 'Object'
27257
+ }
27258
+ }
27259
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
27260
+ end
27261
+
27262
+ # Waiting for response.
27263
+ @client.get_long_running_operation_result(response, deserialize_method)
27264
+ end
27265
+
27266
+ promise
27267
+ end
27268
+
26278
27269
  #
26279
27270
  # Stop ongoing capturing network packets for the site.
26280
27271
  #
@@ -26287,11 +27278,10 @@ module Azure::Web::Mgmt::V2018_02_01
26287
27278
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
26288
27279
  # will be added to the HTTP request.
26289
27280
  #
26290
- # @return [String] operation results.
26291
27281
  #
26292
27282
  def stop_web_site_network_trace_slot(resource_group_name, name, slot, custom_headers:nil)
26293
27283
  response = stop_web_site_network_trace_slot_async(resource_group_name, name, slot, custom_headers:custom_headers).value!
26294
- response.body unless response.nil?
27284
+ nil
26295
27285
  end
26296
27286
 
26297
27287
  #
@@ -26356,6 +27346,117 @@ module Azure::Web::Mgmt::V2018_02_01
26356
27346
  }
26357
27347
  promise = @client.make_request_async(:post, path_template, options)
26358
27348
 
27349
+ promise = promise.then do |result|
27350
+ http_response = result.response
27351
+ status_code = http_response.status
27352
+ response_content = http_response.body
27353
+ unless status_code == 200 || status_code == 204
27354
+ error_model = JSON.load(response_content)
27355
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
27356
+ end
27357
+
27358
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
27359
+
27360
+ result
27361
+ end
27362
+
27363
+ promise.execute
27364
+ end
27365
+
27366
+ #
27367
+ # Gets a named operation for a network trace capturing (or deployment slot, if
27368
+ # specified).
27369
+ #
27370
+ # Gets a named operation for a network trace capturing (or deployment slot, if
27371
+ # specified).
27372
+ #
27373
+ # @param resource_group_name [String] Name of the resource group to which the
27374
+ # resource belongs.
27375
+ # @param name [String] Name of the app.
27376
+ # @param operation_id [String] GUID of the operation.
27377
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
27378
+ # the API will get an operation for the production slot.
27379
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
27380
+ # will be added to the HTTP request.
27381
+ #
27382
+ # @return [Array] operation results.
27383
+ #
27384
+ def get_network_traces_slot(resource_group_name, name, operation_id, slot, custom_headers:nil)
27385
+ response = get_network_traces_slot_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
27386
+ response.body unless response.nil?
27387
+ end
27388
+
27389
+ #
27390
+ # Gets a named operation for a network trace capturing (or deployment slot, if
27391
+ # specified).
27392
+ #
27393
+ # Gets a named operation for a network trace capturing (or deployment slot, if
27394
+ # specified).
27395
+ #
27396
+ # @param resource_group_name [String] Name of the resource group to which the
27397
+ # resource belongs.
27398
+ # @param name [String] Name of the app.
27399
+ # @param operation_id [String] GUID of the operation.
27400
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
27401
+ # the API will get an operation for the production slot.
27402
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
27403
+ # will be added to the HTTP request.
27404
+ #
27405
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
27406
+ #
27407
+ def get_network_traces_slot_with_http_info(resource_group_name, name, operation_id, slot, custom_headers:nil)
27408
+ get_network_traces_slot_async(resource_group_name, name, operation_id, slot, custom_headers:custom_headers).value!
27409
+ end
27410
+
27411
+ #
27412
+ # Gets a named operation for a network trace capturing (or deployment slot, if
27413
+ # specified).
27414
+ #
27415
+ # Gets a named operation for a network trace capturing (or deployment slot, if
27416
+ # specified).
27417
+ #
27418
+ # @param resource_group_name [String] Name of the resource group to which the
27419
+ # resource belongs.
27420
+ # @param name [String] Name of the app.
27421
+ # @param operation_id [String] GUID of the operation.
27422
+ # @param slot [String] Name of the deployment slot. If a slot is not specified,
27423
+ # the API will get an operation for the production slot.
27424
+ # @param [Hash{String => String}] A hash of custom headers that will be added
27425
+ # to the HTTP request.
27426
+ #
27427
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
27428
+ #
27429
+ def get_network_traces_slot_async(resource_group_name, name, operation_id, slot, custom_headers:nil)
27430
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
27431
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
27432
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
27433
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
27434
+ fail ArgumentError, 'name is nil' if name.nil?
27435
+ fail ArgumentError, 'operation_id is nil' if operation_id.nil?
27436
+ fail ArgumentError, 'slot is nil' if slot.nil?
27437
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
27438
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
27439
+
27440
+
27441
+ request_headers = {}
27442
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
27443
+
27444
+ # Set Headers
27445
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
27446
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
27447
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'
27448
+
27449
+ request_url = @base_url || @client.base_url
27450
+
27451
+ options = {
27452
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
27453
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'operationId' => operation_id,'slot' => slot,'subscriptionId' => @client.subscription_id},
27454
+ query_params: {'api-version' => @client.api_version},
27455
+ headers: request_headers.merge(custom_headers || {}),
27456
+ base_url: request_url
27457
+ }
27458
+ promise = @client.make_request_async(:get, path_template, options)
27459
+
26359
27460
  promise = promise.then do |result|
26360
27461
  http_response = result.response
26361
27462
  status_code = http_response.status
@@ -26375,7 +27476,16 @@ module Azure::Web::Mgmt::V2018_02_01
26375
27476
  required: false,
26376
27477
  serialized_name: 'parsed_response',
26377
27478
  type: {
26378
- name: 'String'
27479
+ name: 'Sequence',
27480
+ element: {
27481
+ client_side_validation: true,
27482
+ required: false,
27483
+ serialized_name: 'NetworkTraceElementType',
27484
+ type: {
27485
+ name: 'Composite',
27486
+ class_name: 'NetworkTrace'
27487
+ }
27488
+ }
26379
27489
  }
26380
27490
  }
26381
27491
  result.body = @client.deserialize(result_mapper, parsed_response)
@@ -26508,7 +27618,7 @@ module Azure::Web::Mgmt::V2018_02_01
26508
27618
  # to production slot.
26509
27619
  # @param filter [String] Return only usages/metrics specified in the filter.
26510
27620
  # Filter conforms to odata syntax. Example: $filter=(startTime eq
26511
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
27621
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
26512
27622
  # duration'[Hour|Minute|Day]'.
26513
27623
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
26514
27624
  # will be added to the HTTP request.
@@ -26532,7 +27642,7 @@ module Azure::Web::Mgmt::V2018_02_01
26532
27642
  # to production slot.
26533
27643
  # @param filter [String] Return only usages/metrics specified in the filter.
26534
27644
  # Filter conforms to odata syntax. Example: $filter=(startTime eq
26535
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
27645
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
26536
27646
  # duration'[Hour|Minute|Day]'.
26537
27647
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
26538
27648
  # will be added to the HTTP request.
@@ -26555,7 +27665,7 @@ module Azure::Web::Mgmt::V2018_02_01
26555
27665
  # to production slot.
26556
27666
  # @param filter [String] Return only usages/metrics specified in the filter.
26557
27667
  # Filter conforms to odata syntax. Example: $filter=(startTime eq
26558
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
27668
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
26559
27669
  # duration'[Hour|Minute|Day]'.
26560
27670
  # @param [Hash{String => String}] A hash of custom headers that will be added
26561
27671
  # to the HTTP request.
@@ -31689,8 +32799,8 @@ module Azure::Web::Mgmt::V2018_02_01
31689
32799
  # the API will get quota information of the production slot.
31690
32800
  # @param filter [String] Return only information specified in the filter (using
31691
32801
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
31692
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
31693
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
32802
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
32803
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
31694
32804
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
31695
32805
  # will be added to the HTTP request.
31696
32806
  #
@@ -31715,8 +32825,8 @@ module Azure::Web::Mgmt::V2018_02_01
31715
32825
  # the API will get quota information of the production slot.
31716
32826
  # @param filter [String] Return only information specified in the filter (using
31717
32827
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
31718
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
31719
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
32828
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
32829
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
31720
32830
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
31721
32831
  # will be added to the HTTP request.
31722
32832
  #
@@ -31740,8 +32850,8 @@ module Azure::Web::Mgmt::V2018_02_01
31740
32850
  # the API will get quota information of the production slot.
31741
32851
  # @param filter [String] Return only information specified in the filter (using
31742
32852
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
31743
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
31744
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
32853
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
32854
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
31745
32855
  # @param [Hash{String => String}] A hash of custom headers that will be added
31746
32856
  # to the HTTP request.
31747
32857
  #
@@ -34742,8 +35852,8 @@ module Azure::Web::Mgmt::V2018_02_01
34742
35852
  # @param name [String] Name of the app.
34743
35853
  # @param filter [String] Return only information specified in the filter (using
34744
35854
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
34745
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
34746
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
35855
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
35856
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
34747
35857
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
34748
35858
  # will be added to the HTTP request.
34749
35859
  #
@@ -34766,8 +35876,8 @@ module Azure::Web::Mgmt::V2018_02_01
34766
35876
  # @param name [String] Name of the app.
34767
35877
  # @param filter [String] Return only information specified in the filter (using
34768
35878
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
34769
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
34770
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
35879
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
35880
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
34771
35881
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
34772
35882
  # will be added to the HTTP request.
34773
35883
  #
@@ -34789,8 +35899,8 @@ module Azure::Web::Mgmt::V2018_02_01
34789
35899
  # @param name [String] Name of the app.
34790
35900
  # @param filter [String] Return only information specified in the filter (using
34791
35901
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
34792
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
34793
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
35902
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
35903
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
34794
35904
  # @param [Hash{String => String}] A hash of custom headers that will be added
34795
35905
  # to the HTTP request.
34796
35906
  #
@@ -36967,6 +38077,151 @@ module Azure::Web::Mgmt::V2018_02_01
36967
38077
  promise.execute
36968
38078
  end
36969
38079
 
38080
+ #
38081
+ # Start capturing network packets for the site.
38082
+ #
38083
+ # Start capturing network packets for the site.
38084
+ #
38085
+ # @param resource_group_name [String] Name of the resource group to which the
38086
+ # resource belongs.
38087
+ # @param name [String] The name of the web app.
38088
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
38089
+ # seconds.
38090
+ # @param max_frame_length [Integer] The maximum frame length in bytes
38091
+ # (Optional).
38092
+ # @param sas_url [String] The Blob URL to store capture file.
38093
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38094
+ # will be added to the HTTP request.
38095
+ #
38096
+ # @return [Object] operation results.
38097
+ #
38098
+ def begin_start_web_site_network_trace_operation(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
38099
+ response = begin_start_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value!
38100
+ response.body unless response.nil?
38101
+ end
38102
+
38103
+ #
38104
+ # Start capturing network packets for the site.
38105
+ #
38106
+ # Start capturing network packets for the site.
38107
+ #
38108
+ # @param resource_group_name [String] Name of the resource group to which the
38109
+ # resource belongs.
38110
+ # @param name [String] The name of the web app.
38111
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
38112
+ # seconds.
38113
+ # @param max_frame_length [Integer] The maximum frame length in bytes
38114
+ # (Optional).
38115
+ # @param sas_url [String] The Blob URL to store capture file.
38116
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38117
+ # will be added to the HTTP request.
38118
+ #
38119
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
38120
+ #
38121
+ def begin_start_web_site_network_trace_operation_with_http_info(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
38122
+ begin_start_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value!
38123
+ end
38124
+
38125
+ #
38126
+ # Start capturing network packets for the site.
38127
+ #
38128
+ # Start capturing network packets for the site.
38129
+ #
38130
+ # @param resource_group_name [String] Name of the resource group to which the
38131
+ # resource belongs.
38132
+ # @param name [String] The name of the web app.
38133
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
38134
+ # seconds.
38135
+ # @param max_frame_length [Integer] The maximum frame length in bytes
38136
+ # (Optional).
38137
+ # @param sas_url [String] The Blob URL to store capture file.
38138
+ # @param [Hash{String => String}] A hash of custom headers that will be added
38139
+ # to the HTTP request.
38140
+ #
38141
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
38142
+ #
38143
+ def begin_start_web_site_network_trace_operation_async(resource_group_name, name, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
38144
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
38145
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
38146
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
38147
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
38148
+ fail ArgumentError, 'name is nil' if name.nil?
38149
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
38150
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
38151
+
38152
+
38153
+ request_headers = {}
38154
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
38155
+
38156
+ # Set Headers
38157
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
38158
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
38159
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'
38160
+
38161
+ request_url = @base_url || @client.base_url
38162
+
38163
+ options = {
38164
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
38165
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
38166
+ query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => @client.api_version},
38167
+ headers: request_headers.merge(custom_headers || {}),
38168
+ base_url: request_url
38169
+ }
38170
+ promise = @client.make_request_async(:post, path_template, options)
38171
+
38172
+ promise = promise.then do |result|
38173
+ http_response = result.response
38174
+ status_code = http_response.status
38175
+ response_content = http_response.body
38176
+ unless status_code == 200 || status_code == 202
38177
+ error_model = JSON.load(response_content)
38178
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
38179
+ end
38180
+
38181
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
38182
+ # Deserialize Response
38183
+ if status_code == 200
38184
+ begin
38185
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
38186
+ result_mapper = {
38187
+ client_side_validation: true,
38188
+ required: false,
38189
+ serialized_name: 'parsed_response',
38190
+ type: {
38191
+ name: 'Sequence',
38192
+ element: {
38193
+ client_side_validation: true,
38194
+ required: false,
38195
+ serialized_name: 'NetworkTraceElementType',
38196
+ type: {
38197
+ name: 'Composite',
38198
+ class_name: 'NetworkTrace'
38199
+ }
38200
+ }
38201
+ }
38202
+ }
38203
+ result.body = @client.deserialize(result_mapper, parsed_response)
38204
+ rescue Exception => e
38205
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
38206
+ end
38207
+ end
38208
+ # Deserialize Response
38209
+ if status_code == 202
38210
+ begin
38211
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
38212
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Operation.mapper()
38213
+ result.body = @client.deserialize(result_mapper, parsed_response)
38214
+ rescue Exception => e
38215
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
38216
+ end
38217
+ end
38218
+
38219
+ result
38220
+ end
38221
+
38222
+ promise.execute
38223
+ end
38224
+
36970
38225
  #
36971
38226
  # Restores an app from a backup blob in Azure Storage.
36972
38227
  #
@@ -38150,6 +39405,155 @@ module Azure::Web::Mgmt::V2018_02_01
38150
39405
  promise.execute
38151
39406
  end
38152
39407
 
39408
+ #
39409
+ # Start capturing network packets for the site.
39410
+ #
39411
+ # Start capturing network packets for the site.
39412
+ #
39413
+ # @param resource_group_name [String] Name of the resource group to which the
39414
+ # resource belongs.
39415
+ # @param name [String] The name of the web app.
39416
+ # @param slot [String] The name of the slot for this web app.
39417
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
39418
+ # seconds.
39419
+ # @param max_frame_length [Integer] The maximum frame length in bytes
39420
+ # (Optional).
39421
+ # @param sas_url [String] The Blob URL to store capture file.
39422
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39423
+ # will be added to the HTTP request.
39424
+ #
39425
+ # @return [Object] operation results.
39426
+ #
39427
+ def begin_start_web_site_network_trace_operation_slot(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
39428
+ response = begin_start_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value!
39429
+ response.body unless response.nil?
39430
+ end
39431
+
39432
+ #
39433
+ # Start capturing network packets for the site.
39434
+ #
39435
+ # Start capturing network packets for the site.
39436
+ #
39437
+ # @param resource_group_name [String] Name of the resource group to which the
39438
+ # resource belongs.
39439
+ # @param name [String] The name of the web app.
39440
+ # @param slot [String] The name of the slot for this web app.
39441
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
39442
+ # seconds.
39443
+ # @param max_frame_length [Integer] The maximum frame length in bytes
39444
+ # (Optional).
39445
+ # @param sas_url [String] The Blob URL to store capture file.
39446
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39447
+ # will be added to the HTTP request.
39448
+ #
39449
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
39450
+ #
39451
+ def begin_start_web_site_network_trace_operation_slot_with_http_info(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
39452
+ begin_start_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:duration_in_seconds, max_frame_length:max_frame_length, sas_url:sas_url, custom_headers:custom_headers).value!
39453
+ end
39454
+
39455
+ #
39456
+ # Start capturing network packets for the site.
39457
+ #
39458
+ # Start capturing network packets for the site.
39459
+ #
39460
+ # @param resource_group_name [String] Name of the resource group to which the
39461
+ # resource belongs.
39462
+ # @param name [String] The name of the web app.
39463
+ # @param slot [String] The name of the slot for this web app.
39464
+ # @param duration_in_seconds [Integer] The duration to keep capturing in
39465
+ # seconds.
39466
+ # @param max_frame_length [Integer] The maximum frame length in bytes
39467
+ # (Optional).
39468
+ # @param sas_url [String] The Blob URL to store capture file.
39469
+ # @param [Hash{String => String}] A hash of custom headers that will be added
39470
+ # to the HTTP request.
39471
+ #
39472
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
39473
+ #
39474
+ def begin_start_web_site_network_trace_operation_slot_async(resource_group_name, name, slot, duration_in_seconds:nil, max_frame_length:nil, sas_url:nil, custom_headers:nil)
39475
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
39476
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
39477
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
39478
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil?
39479
+ fail ArgumentError, 'name is nil' if name.nil?
39480
+ fail ArgumentError, 'slot is nil' if slot.nil?
39481
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
39482
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
39483
+
39484
+
39485
+ request_headers = {}
39486
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
39487
+
39488
+ # Set Headers
39489
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
39490
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
39491
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'
39492
+
39493
+ request_url = @base_url || @client.base_url
39494
+
39495
+ options = {
39496
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
39497
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'slot' => slot,'subscriptionId' => @client.subscription_id},
39498
+ query_params: {'durationInSeconds' => duration_in_seconds,'maxFrameLength' => max_frame_length,'sasUrl' => sas_url,'api-version' => @client.api_version},
39499
+ headers: request_headers.merge(custom_headers || {}),
39500
+ base_url: request_url
39501
+ }
39502
+ promise = @client.make_request_async(:post, path_template, options)
39503
+
39504
+ promise = promise.then do |result|
39505
+ http_response = result.response
39506
+ status_code = http_response.status
39507
+ response_content = http_response.body
39508
+ unless status_code == 200 || status_code == 202
39509
+ error_model = JSON.load(response_content)
39510
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
39511
+ end
39512
+
39513
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
39514
+ # Deserialize Response
39515
+ if status_code == 200
39516
+ begin
39517
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
39518
+ result_mapper = {
39519
+ client_side_validation: true,
39520
+ required: false,
39521
+ serialized_name: 'parsed_response',
39522
+ type: {
39523
+ name: 'Sequence',
39524
+ element: {
39525
+ client_side_validation: true,
39526
+ required: false,
39527
+ serialized_name: 'NetworkTraceElementType',
39528
+ type: {
39529
+ name: 'Composite',
39530
+ class_name: 'NetworkTrace'
39531
+ }
39532
+ }
39533
+ }
39534
+ }
39535
+ result.body = @client.deserialize(result_mapper, parsed_response)
39536
+ rescue Exception => e
39537
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
39538
+ end
39539
+ end
39540
+ # Deserialize Response
39541
+ if status_code == 202
39542
+ begin
39543
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
39544
+ result_mapper = Azure::Web::Mgmt::V2018_02_01::Models::Operation.mapper()
39545
+ result.body = @client.deserialize(result_mapper, parsed_response)
39546
+ rescue Exception => e
39547
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
39548
+ end
39549
+ end
39550
+
39551
+ result
39552
+ end
39553
+
39554
+ promise.execute
39555
+ end
39556
+
38153
39557
  #
38154
39558
  # Restores an app from a backup blob in Azure Storage.
38155
39559
  #
@@ -44792,8 +46196,8 @@ module Azure::Web::Mgmt::V2018_02_01
44792
46196
  # response. It is "false" by default.
44793
46197
  # @param filter [String] Return only metrics specified in the filter (using
44794
46198
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
44795
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
44796
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
46199
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
46200
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
44797
46201
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
44798
46202
  # will be added to the HTTP request.
44799
46203
  #
@@ -44821,7 +46225,7 @@ module Azure::Web::Mgmt::V2018_02_01
44821
46225
  # @param name [String] Name of web app.
44822
46226
  # @param filter [String] Return only usages/metrics specified in the filter.
44823
46227
  # Filter conforms to odata syntax. Example: $filter=(startTime eq
44824
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
46228
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
44825
46229
  # duration'[Hour|Minute|Day]'.
44826
46230
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
44827
46231
  # will be added to the HTTP request.
@@ -45382,8 +46786,8 @@ module Azure::Web::Mgmt::V2018_02_01
45382
46786
  # response. It is "false" by default.
45383
46787
  # @param filter [String] Return only metrics specified in the filter (using
45384
46788
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
45385
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
45386
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
46789
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
46790
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
45387
46791
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
45388
46792
  # will be added to the HTTP request.
45389
46793
  #
@@ -45413,7 +46817,7 @@ module Azure::Web::Mgmt::V2018_02_01
45413
46817
  # to production slot.
45414
46818
  # @param filter [String] Return only usages/metrics specified in the filter.
45415
46819
  # Filter conforms to odata syntax. Example: $filter=(startTime eq
45416
- # '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq
46820
+ # 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
45417
46821
  # duration'[Hour|Minute|Day]'.
45418
46822
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
45419
46823
  # will be added to the HTTP request.
@@ -45699,8 +47103,8 @@ module Azure::Web::Mgmt::V2018_02_01
45699
47103
  # the API will get quota information of the production slot.
45700
47104
  # @param filter [String] Return only information specified in the filter (using
45701
47105
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
45702
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
45703
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
47106
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
47107
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
45704
47108
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
45705
47109
  # will be added to the HTTP request.
45706
47110
  #
@@ -45860,8 +47264,8 @@ module Azure::Web::Mgmt::V2018_02_01
45860
47264
  # @param name [String] Name of the app.
45861
47265
  # @param filter [String] Return only information specified in the filter (using
45862
47266
  # OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq
45863
- # 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq
45864
- # '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
47267
+ # 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
47268
+ # 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
45865
47269
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
45866
47270
  # will be added to the HTTP request.
45867
47271
  #