Class: Azure::Web::Mgmt::V2016_03_01::Recommendations
- Inherits:
-
Object
- Object
- Azure::Web::Mgmt::V2016_03_01::Recommendations
- Includes:
- MsRestAzure
- Defined in:
- lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb
Overview
WebSite Management Client
Instance Attribute Summary collapse
-
#client ⇒ WebSiteManagementClient
readonly
Reference to the WebSiteManagementClient.
Instance Method Summary collapse
-
#disable_all_for_web_app(resource_group_name, site_name, custom_headers: nil) ⇒ Object
Disable all recommendations for an app.
-
#disable_all_for_web_app_async(resource_group_name, site_name, custom_headers: nil) ⇒ Concurrent::Promise
Disable all recommendations for an app.
-
#disable_all_for_web_app_with_http_info(resource_group_name, site_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Disable all recommendations for an app.
-
#disable_recommendation_for_site(resource_group_name, site_name, name, custom_headers: nil) ⇒ Object
Disables the specific rule for a web site permanently.
-
#disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers: nil) ⇒ Concurrent::Promise
Disables the specific rule for a web site permanently.
-
#disable_recommendation_for_site_with_http_info(resource_group_name, site_name, name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Disables the specific rule for a web site permanently.
-
#disable_recommendation_for_subscription(name, custom_headers: nil) ⇒ Object
Disables the specified rule so it will not apply to a subscription in the future.
-
#disable_recommendation_for_subscription_async(name, custom_headers: nil) ⇒ Concurrent::Promise
Disables the specified rule so it will not apply to a subscription in the future.
-
#disable_recommendation_for_subscription_with_http_info(name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Disables the specified rule so it will not apply to a subscription in the future.
-
#get_rule_details_by_web_app(resource_group_name, site_name, name, update_seen: nil, recommendation_id: nil, custom_headers: nil) ⇒ RecommendationRule
Get a recommendation rule for an app.
-
#get_rule_details_by_web_app_async(resource_group_name, site_name, name, update_seen: nil, recommendation_id: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get a recommendation rule for an app.
-
#get_rule_details_by_web_app_with_http_info(resource_group_name, site_name, name, update_seen: nil, recommendation_id: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get a recommendation rule for an app.
-
#initialize(client) ⇒ Recommendations
constructor
Creates and initializes a new instance of the Recommendations class.
-
#list(featured: nil, filter: nil, custom_headers: nil) ⇒ Array<Recommendation>
List all recommendations for a subscription.
-
#list_as_lazy(featured: nil, filter: nil, custom_headers: nil) ⇒ RecommendationCollection
List all recommendations for a subscription.
-
#list_async(featured: nil, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all recommendations for a subscription.
-
#list_history_for_web_app(resource_group_name, site_name, filter: nil, custom_headers: nil) ⇒ Array<Recommendation>
Get past recommendations for an app, optionally specified by the time range.
-
#list_history_for_web_app_as_lazy(resource_group_name, site_name, filter: nil, custom_headers: nil) ⇒ RecommendationCollection
Get past recommendations for an app, optionally specified by the time range.
-
#list_history_for_web_app_async(resource_group_name, site_name, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get past recommendations for an app, optionally specified by the time range.
-
#list_history_for_web_app_next(next_page_link, custom_headers: nil) ⇒ RecommendationCollection
Get past recommendations for an app, optionally specified by the time range.
-
#list_history_for_web_app_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get past recommendations for an app, optionally specified by the time range.
-
#list_history_for_web_app_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get past recommendations for an app, optionally specified by the time range.
-
#list_history_for_web_app_with_http_info(resource_group_name, site_name, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get past recommendations for an app, optionally specified by the time range.
-
#list_next(next_page_link, custom_headers: nil) ⇒ RecommendationCollection
List all recommendations for a subscription.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all recommendations for a subscription.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all recommendations for a subscription.
-
#list_recommended_rules_for_web_app(resource_group_name, site_name, featured: nil, filter: nil, custom_headers: nil) ⇒ Array<Recommendation>
Get all recommendations for an app.
-
#list_recommended_rules_for_web_app_as_lazy(resource_group_name, site_name, featured: nil, filter: nil, custom_headers: nil) ⇒ RecommendationCollection
Get all recommendations for an app.
-
#list_recommended_rules_for_web_app_async(resource_group_name, site_name, featured: nil, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all recommendations for an app.
-
#list_recommended_rules_for_web_app_next(next_page_link, custom_headers: nil) ⇒ RecommendationCollection
Get all recommendations for an app.
-
#list_recommended_rules_for_web_app_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all recommendations for an app.
-
#list_recommended_rules_for_web_app_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all recommendations for an app.
-
#list_recommended_rules_for_web_app_with_http_info(resource_group_name, site_name, featured: nil, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all recommendations for an app.
-
#list_with_http_info(featured: nil, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all recommendations for a subscription.
-
#reset_all_filters(custom_headers: nil) ⇒ Object
Reset all recommendation opt-out settings for a subscription.
-
#reset_all_filters_async(custom_headers: nil) ⇒ Concurrent::Promise
Reset all recommendation opt-out settings for a subscription.
-
#reset_all_filters_for_web_app(resource_group_name, site_name, custom_headers: nil) ⇒ Object
Reset all recommendation opt-out settings for an app.
-
#reset_all_filters_for_web_app_async(resource_group_name, site_name, custom_headers: nil) ⇒ Concurrent::Promise
Reset all recommendation opt-out settings for an app.
-
#reset_all_filters_for_web_app_with_http_info(resource_group_name, site_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reset all recommendation opt-out settings for an app.
-
#reset_all_filters_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reset all recommendation opt-out settings for a subscription.
Constructor Details
#initialize(client) ⇒ Recommendations
Creates and initializes a new instance of the Recommendations class.
17 18 19 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ WebSiteManagementClient (readonly)
Returns reference to the WebSiteManagementClient.
22 23 24 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 22 def client @client end |
Instance Method Details
#disable_all_for_web_app(resource_group_name, site_name, custom_headers: nil) ⇒ Object
Disable all recommendations for an app.
Disable all recommendations for an app.
resource belongs. will be added to the HTTP request.
566 567 568 569 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 566 def disable_all_for_web_app(resource_group_name, site_name, custom_headers:nil) response = disable_all_for_web_app_async(resource_group_name, site_name, custom_headers:custom_headers).value! nil end |
#disable_all_for_web_app_async(resource_group_name, site_name, custom_headers: nil) ⇒ Concurrent::Promise
Disable all recommendations for an app.
Disable all recommendations for an app.
resource belongs. to the HTTP request.
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 601 def disable_all_for_web_app_async(resource_group_name, site_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'site_name is nil' if site_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#disable_all_for_web_app_with_http_info(resource_group_name, site_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Disable all recommendations for an app.
Disable all recommendations for an app.
resource belongs. will be added to the HTTP request.
584 585 586 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 584 def disable_all_for_web_app_with_http_info(resource_group_name, site_name, custom_headers:nil) disable_all_for_web_app_async(resource_group_name, site_name, custom_headers:custom_headers).value! end |
#disable_recommendation_for_site(resource_group_name, site_name, name, custom_headers: nil) ⇒ Object
Disables the specific rule for a web site permanently.
Disables the specific rule for a web site permanently.
resource belongs. will be added to the HTTP request.
879 880 881 882 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 879 def disable_recommendation_for_site(resource_group_name, site_name, name, custom_headers:nil) response = disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers:custom_headers).value! nil end |
#disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers: nil) ⇒ Concurrent::Promise
Disables the specific rule for a web site permanently.
Disables the specific rule for a web site permanently.
resource belongs. to the HTTP request.
916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 916 def disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'site_name is nil' if site_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#disable_recommendation_for_site_with_http_info(resource_group_name, site_name, name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Disables the specific rule for a web site permanently.
Disables the specific rule for a web site permanently.
resource belongs. will be added to the HTTP request.
898 899 900 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 898 def disable_recommendation_for_site_with_http_info(resource_group_name, site_name, name, custom_headers:nil) disable_recommendation_for_site_async(resource_group_name, site_name, name, custom_headers:custom_headers).value! end |
#disable_recommendation_for_subscription(name, custom_headers: nil) ⇒ Object
Disables the specified rule so it will not apply to a subscription in the future.
Disables the specified rule so it will not apply to a subscription in the future.
will be added to the HTTP request.
231 232 233 234 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 231 def disable_recommendation_for_subscription(name, custom_headers:nil) response = disable_recommendation_for_subscription_async(name, custom_headers:custom_headers).value! nil end |
#disable_recommendation_for_subscription_async(name, custom_headers: nil) ⇒ Concurrent::Promise
Disables the specified rule so it will not apply to a subscription in the future.
Disables the specified rule so it will not apply to a subscription in the future.
to the HTTP request.
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 266 def disable_recommendation_for_subscription_async(name, custom_headers:nil) fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#disable_recommendation_for_subscription_with_http_info(name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Disables the specified rule so it will not apply to a subscription in the future.
Disables the specified rule so it will not apply to a subscription in the future.
will be added to the HTTP request.
249 250 251 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 249 def disable_recommendation_for_subscription_with_http_info(name, custom_headers:nil) disable_recommendation_for_subscription_async(name, custom_headers:custom_headers).value! end |
#get_rule_details_by_web_app(resource_group_name, site_name, name, update_seen: nil, recommendation_id: nil, custom_headers: nil) ⇒ RecommendationRule
Get a recommendation rule for an app.
Get a recommendation rule for an app.
resource belongs. last-seen timestamp of the recommendation object. query an expired one. You don’t need to specify it to query an active entry. will be added to the HTTP request.
762 763 764 765 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 762 def get_rule_details_by_web_app(resource_group_name, site_name, name, update_seen:nil, recommendation_id:nil, custom_headers:nil) response = get_rule_details_by_web_app_async(resource_group_name, site_name, name, update_seen:update_seen, recommendation_id:recommendation_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_rule_details_by_web_app_async(resource_group_name, site_name, name, update_seen: nil, recommendation_id: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get a recommendation rule for an app.
Get a recommendation rule for an app.
resource belongs. last-seen timestamp of the recommendation object. query an expired one. You don’t need to specify it to query an active entry. to the HTTP request.
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 807 def get_rule_details_by_web_app_async(resource_group_name, site_name, name, update_seen:nil, recommendation_id:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'site_name is nil' if site_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'name' => name,'subscriptionId' => @client.subscription_id}, query_params: {'updateSeen' => update_seen,'recommendationId' => recommendation_id,'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::RecommendationRule.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_rule_details_by_web_app_with_http_info(resource_group_name, site_name, name, update_seen: nil, recommendation_id: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get a recommendation rule for an app.
Get a recommendation rule for an app.
resource belongs. last-seen timestamp of the recommendation object. query an expired one. You don’t need to specify it to query an active entry. will be added to the HTTP request.
785 786 787 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 785 def get_rule_details_by_web_app_with_http_info(resource_group_name, site_name, name, update_seen:nil, recommendation_id:nil, custom_headers:nil) get_rule_details_by_web_app_async(resource_group_name, site_name, name, update_seen:update_seen, recommendation_id:recommendation_id, custom_headers:custom_headers).value! end |
#list(featured: nil, filter: nil, custom_headers: nil) ⇒ Array<Recommendation>
List all recommendations for a subscription.
List all recommendations for a subscription.
critical recommendations. The default is false, which returns all recommendations. $filter=channels eq ‘Api’ or channel eq ‘Notification’ and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’ will be added to the HTTP request.
41 42 43 44 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 41 def list(featured:nil, filter:nil, custom_headers:nil) first_page = list_as_lazy(featured:featured, filter:filter, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(featured: nil, filter: nil, custom_headers: nil) ⇒ RecommendationCollection
List all recommendations for a subscription.
List all recommendations for a subscription.
critical recommendations. The default is false, which returns all recommendations. $filter=channels eq ‘Api’ or channel eq ‘Notification’ and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’ will be added to the HTTP request.
response.
1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1271 def list_as_lazy(featured:nil, filter:nil, custom_headers:nil) response = list_async(featured:featured, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(featured: nil, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
List all recommendations for a subscription.
List all recommendations for a subscription.
critical recommendations. The default is false, which returns all recommendations. $filter=channels eq ‘Api’ or channel eq ‘Notification’ and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’ to the HTTP request.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 84 def list_async(featured:nil, filter:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'featured' => featured,'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::RecommendationCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_history_for_web_app(resource_group_name, site_name, filter: nil, custom_headers: nil) ⇒ Array<Recommendation>
Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
resource belongs. $filter=channels eq ‘Api’ or channel eq ‘Notification’ and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’ will be added to the HTTP request.
327 328 329 330 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 327 def list_history_for_web_app(resource_group_name, site_name, filter:nil, custom_headers:nil) first_page = list_history_for_web_app_as_lazy(resource_group_name, site_name, filter:filter, custom_headers:custom_headers) first_page.get_all_items end |
#list_history_for_web_app_as_lazy(resource_group_name, site_name, filter: nil, custom_headers: nil) ⇒ RecommendationCollection
Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
resource belongs. $filter=channels eq ‘Api’ or channel eq ‘Notification’ and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’ will be added to the HTTP request.
response.
1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1300 def list_history_for_web_app_as_lazy(resource_group_name, site_name, filter:nil, custom_headers:nil) response = list_history_for_web_app_async(resource_group_name, site_name, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_history_for_web_app_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_history_for_web_app_async(resource_group_name, site_name, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
resource belongs. $filter=channels eq ‘Api’ or channel eq ‘Notification’ and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’ to the HTTP request.
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 370 def list_history_for_web_app_async(resource_group_name, site_name, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'site_name is nil' if site_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::RecommendationCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_history_for_web_app_next(next_page_link, custom_headers: nil) ⇒ RecommendationCollection
Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
to List operation. will be added to the HTTP request.
1073 1074 1075 1076 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1073 def list_history_for_web_app_next(next_page_link, custom_headers:nil) response = list_history_for_web_app_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_history_for_web_app_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
to List operation. to the HTTP request.
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1106 def list_history_for_web_app_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::RecommendationCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_history_for_web_app_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
to List operation. will be added to the HTTP request.
1090 1091 1092 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1090 def list_history_for_web_app_next_with_http_info(next_page_link, custom_headers:nil) list_history_for_web_app_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_history_for_web_app_with_http_info(resource_group_name, site_name, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get past recommendations for an app, optionally specified by the time range.
Get past recommendations for an app, optionally specified by the time range.
resource belongs. $filter=channels eq ‘Api’ or channel eq ‘Notification’ and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’ will be added to the HTTP request.
349 350 351 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 349 def list_history_for_web_app_with_http_info(resource_group_name, site_name, filter:nil, custom_headers:nil) list_history_for_web_app_async(resource_group_name, site_name, filter:filter, custom_headers:custom_headers).value! end |
#list_next(next_page_link, custom_headers: nil) ⇒ RecommendationCollection
List all recommendations for a subscription.
List all recommendations for a subscription.
to List operation. will be added to the HTTP request.
977 978 979 980 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 977 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all recommendations for a subscription.
List all recommendations for a subscription.
to List operation. to the HTTP request.
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1010 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::RecommendationCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all recommendations for a subscription.
List all recommendations for a subscription.
to List operation. will be added to the HTTP request.
994 995 996 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 994 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_recommended_rules_for_web_app(resource_group_name, site_name, featured: nil, filter: nil, custom_headers: nil) ⇒ Array<Recommendation>
Get all recommendations for an app.
Get all recommendations for an app.
resource belongs. critical recommendations. The default is false, which returns all recommendations. is specified by using OData syntax. Example: $filter=channels eq ‘Api’ or channel eq ‘Notification’ will be added to the HTTP request.
448 449 450 451 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 448 def list_recommended_rules_for_web_app(resource_group_name, site_name, featured:nil, filter:nil, custom_headers:nil) first_page = list_recommended_rules_for_web_app_as_lazy(resource_group_name, site_name, featured:featured, filter:filter, custom_headers:custom_headers) first_page.get_all_items end |
#list_recommended_rules_for_web_app_as_lazy(resource_group_name, site_name, featured: nil, filter: nil, custom_headers: nil) ⇒ RecommendationCollection
Get all recommendations for an app.
Get all recommendations for an app.
resource belongs. critical recommendations. The default is false, which returns all recommendations. is specified by using OData syntax. Example: $filter=channels eq ‘Api’ or channel eq ‘Notification’ will be added to the HTTP request.
response.
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1331 def list_recommended_rules_for_web_app_as_lazy(resource_group_name, site_name, featured:nil, filter:nil, custom_headers:nil) response = list_recommended_rules_for_web_app_async(resource_group_name, site_name, featured:featured, filter:filter, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_recommended_rules_for_web_app_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_recommended_rules_for_web_app_async(resource_group_name, site_name, featured: nil, filter: nil, custom_headers: nil) ⇒ Concurrent::Promise
Get all recommendations for an app.
Get all recommendations for an app.
resource belongs. critical recommendations. The default is false, which returns all recommendations. is specified by using OData syntax. Example: $filter=channels eq ‘Api’ or channel eq ‘Notification’ to the HTTP request.
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 495 def list_recommended_rules_for_web_app_async(resource_group_name, site_name, featured:nil, filter:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'site_name is nil' if site_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'subscriptionId' => @client.subscription_id}, query_params: {'featured' => featured,'api-version' => @client.api_version}, skip_encoding_query_params: {'$filter' => filter}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::RecommendationCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_recommended_rules_for_web_app_next(next_page_link, custom_headers: nil) ⇒ RecommendationCollection
Get all recommendations for an app.
Get all recommendations for an app.
to List operation. will be added to the HTTP request.
1169 1170 1171 1172 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1169 def list_recommended_rules_for_web_app_next(next_page_link, custom_headers:nil) response = list_recommended_rules_for_web_app_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_recommended_rules_for_web_app_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get all recommendations for an app.
Get all recommendations for an app.
to List operation. to the HTTP request.
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1202 def list_recommended_rules_for_web_app_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Web::Mgmt::V2016_03_01::Models::RecommendationCollection.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_recommended_rules_for_web_app_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all recommendations for an app.
Get all recommendations for an app.
to List operation. will be added to the HTTP request.
1186 1187 1188 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 1186 def list_recommended_rules_for_web_app_next_with_http_info(next_page_link, custom_headers:nil) list_recommended_rules_for_web_app_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_recommended_rules_for_web_app_with_http_info(resource_group_name, site_name, featured: nil, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get all recommendations for an app.
Get all recommendations for an app.
resource belongs. critical recommendations. The default is false, which returns all recommendations. is specified by using OData syntax. Example: $filter=channels eq ‘Api’ or channel eq ‘Notification’ will be added to the HTTP request.
472 473 474 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 472 def list_recommended_rules_for_web_app_with_http_info(resource_group_name, site_name, featured:nil, filter:nil, custom_headers:nil) list_recommended_rules_for_web_app_async(resource_group_name, site_name, featured:featured, filter:filter, custom_headers:custom_headers).value! end |
#list_with_http_info(featured: nil, filter: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all recommendations for a subscription.
List all recommendations for a subscription.
critical recommendations. The default is false, which returns all recommendations. $filter=channels eq ‘Api’ or channel eq ‘Notification’ and startTime eq ‘2014-01-01T00:00:00Z’ and endTime eq ‘2014-12-31T23:59:59Z’ and timeGrain eq duration’ will be added to the HTTP request.
63 64 65 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 63 def list_with_http_info(featured:nil, filter:nil, custom_headers:nil) list_async(featured:featured, filter:filter, custom_headers:custom_headers).value! end |
#reset_all_filters(custom_headers: nil) ⇒ Object
Reset all recommendation opt-out settings for a subscription.
Reset all recommendation opt-out settings for a subscription.
will be added to the HTTP request.
147 148 149 150 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 147 def reset_all_filters(custom_headers:nil) response = reset_all_filters_async(custom_headers:custom_headers).value! nil end |
#reset_all_filters_async(custom_headers: nil) ⇒ Concurrent::Promise
Reset all recommendation opt-out settings for a subscription.
Reset all recommendation opt-out settings for a subscription.
to the HTTP request.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 176 def reset_all_filters_async(custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#reset_all_filters_for_web_app(resource_group_name, site_name, custom_headers: nil) ⇒ Object
Reset all recommendation opt-out settings for an app.
Reset all recommendation opt-out settings for an app.
resource belongs. will be added to the HTTP request.
661 662 663 664 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 661 def reset_all_filters_for_web_app(resource_group_name, site_name, custom_headers:nil) response = reset_all_filters_for_web_app_async(resource_group_name, site_name, custom_headers:custom_headers).value! nil end |
#reset_all_filters_for_web_app_async(resource_group_name, site_name, custom_headers: nil) ⇒ Concurrent::Promise
Reset all recommendation opt-out settings for an app.
Reset all recommendation opt-out settings for an app.
resource belongs. to the HTTP request.
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 696 def reset_all_filters_for_web_app_async(resource_group_name, site_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+[^\.]$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+[^\.]$$')).nil? fail ArgumentError, 'site_name is nil' if site_name.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'siteName' => site_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#reset_all_filters_for_web_app_with_http_info(resource_group_name, site_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reset all recommendation opt-out settings for an app.
Reset all recommendation opt-out settings for an app.
resource belongs. will be added to the HTTP request.
679 680 681 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 679 def reset_all_filters_for_web_app_with_http_info(resource_group_name, site_name, custom_headers:nil) reset_all_filters_for_web_app_async(resource_group_name, site_name, custom_headers:custom_headers).value! end |
#reset_all_filters_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reset all recommendation opt-out settings for a subscription.
Reset all recommendation opt-out settings for a subscription.
will be added to the HTTP request.
162 163 164 |
# File 'lib/2016-03-01/generated/azure_mgmt_web/recommendations.rb', line 162 def reset_all_filters_with_http_info(custom_headers:nil) reset_all_filters_async(custom_headers:custom_headers).value! end |