Class: Azure::ApiManagement::Mgmt::V2018_01_01::Reports
- Inherits:
-
Object
- Object
- Azure::ApiManagement::Mgmt::V2018_01_01::Reports
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb
Overview
ApiManagement Client
Instance Attribute Summary collapse
-
#client ⇒ ApiManagementClient
readonly
Reference to the ApiManagementClient.
Instance Method Summary collapse
-
#initialize(client) ⇒ Reports
constructor
Creates and initializes a new instance of the Reports class.
-
#list_by_api(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by API.
-
#list_by_api_as_lazy(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by API.
-
#list_by_api_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by API.
-
#list_by_api_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by API.
-
#list_by_api_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by API.
-
#list_by_api_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by API.
-
#list_by_api_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by API.
-
#list_by_geo(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by geography.
-
#list_by_geo_as_lazy(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by geography.
-
#list_by_geo_async(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by geography.
-
#list_by_geo_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by geography.
-
#list_by_geo_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by geography.
-
#list_by_geo_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by geography.
-
#list_by_geo_with_http_info(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by geography.
-
#list_by_operation(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by API Operations.
-
#list_by_operation_as_lazy(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by API Operations.
-
#list_by_operation_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by API Operations.
-
#list_by_operation_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by API Operations.
-
#list_by_operation_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by API Operations.
-
#list_by_operation_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by API Operations.
-
#list_by_operation_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by API Operations.
-
#list_by_product(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by Product.
-
#list_by_product_as_lazy(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by Product.
-
#list_by_product_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Product.
-
#list_by_product_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by Product.
-
#list_by_product_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Product.
-
#list_by_product_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Product.
-
#list_by_product_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Product.
-
#list_by_request(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ RequestReportCollection
Lists report records by Request.
-
#list_by_request_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Request.
-
#list_by_request_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Request.
-
#list_by_subscription(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by subscription.
-
#list_by_subscription_as_lazy(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by subscription.
-
#list_by_subscription_async(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by subscription.
-
#list_by_subscription_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by subscription.
-
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by subscription.
-
#list_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by subscription.
-
#list_by_subscription_with_http_info(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by subscription.
-
#list_by_time(resource_group_name, service_name, interval, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by Time.
-
#list_by_time_as_lazy(resource_group_name, service_name, interval, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by Time.
-
#list_by_time_async(resource_group_name, service_name, interval, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Time.
-
#list_by_time_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by Time.
-
#list_by_time_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Time.
-
#list_by_time_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Time.
-
#list_by_time_with_http_info(resource_group_name, service_name, interval, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Time.
-
#list_by_user(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by User.
-
#list_by_user_as_lazy(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by User.
-
#list_by_user_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by User.
-
#list_by_user_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by User.
-
#list_by_user_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by User.
-
#list_by_user_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by User.
-
#list_by_user_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by User.
Constructor Details
#initialize(client) ⇒ Reports
Creates and initializes a new instance of the Reports class.
17 18 19 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ApiManagementClient (readonly)
Returns reference to the ApiManagementClient.
22 23 24 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 22 def client @client end |
Instance Method Details
#list_by_api(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by API.
will be added to the HTTP request.
37 38 39 40 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 37 def list_by_api(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) first_page = list_by_api_as_lazy(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_api_as_lazy(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by API.
will be added to the HTTP request.
response.
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1553 def list_by_api_as_lazy(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) response = list_by_api_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_api_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_api_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by API.
to the HTTP request.
72 73 74 75 76 77 78 79 80 81 82 83 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 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 72 def list_by_api_async(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'filter is nil' if filter.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.ApiManagement/service/{serviceName}/reports/byApi' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_api_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by API.
to List operation. will be added to the HTTP request.
919 920 921 922 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 919 def list_by_api_next(next_page_link, custom_headers:nil) response = list_by_api_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_api_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by API.
to List operation. to the HTTP request.
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 948 def list_by_api_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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_api_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by API.
to List operation. will be added to the HTTP request.
934 935 936 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 934 def list_by_api_next_with_http_info(next_page_link, custom_headers:nil) list_by_api_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_api_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by API.
will be added to the HTTP request.
55 56 57 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 55 def list_by_api_with_http_info(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) list_by_api_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! end |
#list_by_geo(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by geography.
will be added to the HTTP request.
473 474 475 476 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 473 def list_by_geo(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) first_page = list_by_geo_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_geo_as_lazy(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by geography.
will be added to the HTTP request.
response.
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1653 def list_by_geo_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) response = list_by_geo_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_geo_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_geo_async(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by geography.
to the HTTP request.
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 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 508 def list_by_geo_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.ApiManagement/service/{serviceName}/reports/byGeo' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_geo_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by geography.
to List operation. will be added to the HTTP request.
1279 1280 1281 1282 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1279 def list_by_geo_next(next_page_link, custom_headers:nil) response = list_by_geo_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_geo_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by geography.
to List operation. to the HTTP request.
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1308 def list_by_geo_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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_geo_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by geography.
to List operation. will be added to the HTTP request.
1294 1295 1296 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1294 def list_by_geo_next_with_http_info(next_page_link, custom_headers:nil) list_by_geo_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_geo_with_http_info(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by geography.
will be added to the HTTP request.
491 492 493 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 491 def list_by_geo_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) list_by_geo_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! end |
#list_by_operation(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by API Operations.
will be added to the HTTP request.
255 256 257 258 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 255 def list_by_operation(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) first_page = list_by_operation_as_lazy(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_operation_as_lazy(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by API Operations.
will be added to the HTTP request.
response.
1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1603 def list_by_operation_as_lazy(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) response = list_by_operation_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_operation_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_operation_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by API Operations.
to the HTTP request.
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 290 def list_by_operation_async(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'filter is nil' if filter.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.ApiManagement/service/{serviceName}/reports/byOperation' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_operation_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by API Operations.
to List operation. will be added to the HTTP request.
1099 1100 1101 1102 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1099 def list_by_operation_next(next_page_link, custom_headers:nil) response = list_by_operation_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_operation_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by API Operations.
to List operation. to the HTTP request.
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 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1128 def list_by_operation_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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_operation_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by API Operations.
to List operation. will be added to the HTTP request.
1114 1115 1116 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1114 def list_by_operation_next_with_http_info(next_page_link, custom_headers:nil) list_by_operation_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_operation_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by API Operations.
will be added to the HTTP request.
273 274 275 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 273 def list_by_operation_with_http_info(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) list_by_operation_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! end |
#list_by_product(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by Product.
will be added to the HTTP request.
364 365 366 367 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 364 def list_by_product(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) first_page = list_by_product_as_lazy(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_product_as_lazy(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by Product.
will be added to the HTTP request.
response.
1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1628 def list_by_product_as_lazy(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) response = list_by_product_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_product_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_product_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Product.
to the HTTP request.
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 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 399 def list_by_product_async(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'filter is nil' if filter.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.ApiManagement/service/{serviceName}/reports/byProduct' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_product_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by Product.
to List operation. will be added to the HTTP request.
1189 1190 1191 1192 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1189 def list_by_product_next(next_page_link, custom_headers:nil) response = list_by_product_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_product_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Product.
to List operation. to the HTTP request.
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 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1218 def list_by_product_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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_product_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Product.
to List operation. will be added to the HTTP request.
1204 1205 1206 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1204 def list_by_product_next_with_http_info(next_page_link, custom_headers:nil) list_by_product_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_product_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Product.
will be added to the HTTP request.
382 383 384 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 382 def list_by_product_with_http_info(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) list_by_product_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! end |
#list_by_request(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ RequestReportCollection
Lists report records by Request.
will be added to the HTTP request.
813 814 815 816 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 813 def list_by_request(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) response = list_by_request_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_request_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Request.
to the HTTP request.
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 848 def list_by_request_async(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'filter is nil' if filter.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.ApiManagement/service/{serviceName}/reports/byRequest' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01::Models::RequestReportCollection.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_by_request_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Request.
will be added to the HTTP request.
831 832 833 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 831 def list_by_request_with_http_info(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) list_by_request_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! end |
#list_by_subscription(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by subscription.
will be added to the HTTP request.
581 582 583 584 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 581 def list_by_subscription(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) first_page = list_by_subscription_as_lazy(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_subscription_as_lazy(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by subscription.
will be added to the HTTP request.
response.
1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1678 def list_by_subscription_as_lazy(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) response = list_by_subscription_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_subscription_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_subscription_async(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by subscription.
to the HTTP request.
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 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 616 def list_by_subscription_async(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.ApiManagement/service/{serviceName}/reports/bySubscription' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_subscription_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by subscription.
to List operation. will be added to the HTTP request.
1369 1370 1371 1372 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1369 def list_by_subscription_next(next_page_link, custom_headers:nil) response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by subscription.
to List operation. to the HTTP request.
1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1398 def list_by_subscription_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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by subscription.
to List operation. will be added to the HTTP request.
1384 1385 1386 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1384 def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil) list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_subscription_with_http_info(resource_group_name, service_name, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by subscription.
will be added to the HTTP request.
599 600 601 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 599 def list_by_subscription_with_http_info(resource_group_name, service_name, filter:nil, top:nil, skip:nil, custom_headers:nil) list_by_subscription_async(resource_group_name, service_name, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! end |
#list_by_time(resource_group_name, service_name, interval, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by Time.
minutes and may not be zero. The value should be in ISO 8601 format (en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) will be added to the HTTP request.
694 695 696 697 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 694 def list_by_time(resource_group_name, service_name, interval, filter:nil, top:nil, skip:nil, custom_headers:nil) first_page = list_by_time_as_lazy(resource_group_name, service_name, interval, filter:filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_time_as_lazy(resource_group_name, service_name, interval, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by Time.
minutes and may not be zero. The value should be in ISO 8601 format (en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) will be added to the HTTP request.
response.
1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1708 def list_by_time_as_lazy(resource_group_name, service_name, interval, filter:nil, top:nil, skip:nil, custom_headers:nil) response = list_by_time_async(resource_group_name, service_name, interval, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_time_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_time_async(resource_group_name, service_name, interval, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Time.
minutes and may not be zero. The value should be in ISO 8601 format (en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) to the HTTP request.
739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 739 def list_by_time_async(resource_group_name, service_name, interval, filter:nil, top:nil, skip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 fail ArgumentError, 'interval is nil' if interval.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.ApiManagement/service/{serviceName}/reports/byTime' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'interval' => interval,'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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_time_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by Time.
to List operation. will be added to the HTTP request.
1459 1460 1461 1462 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1459 def list_by_time_next(next_page_link, custom_headers:nil) response = list_by_time_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_time_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by Time.
to List operation. to the HTTP request.
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1488 def list_by_time_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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_time_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Time.
to List operation. will be added to the HTTP request.
1474 1475 1476 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1474 def list_by_time_next_with_http_info(next_page_link, custom_headers:nil) list_by_time_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_time_with_http_info(resource_group_name, service_name, interval, filter: nil, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by Time.
minutes and may not be zero. The value should be in ISO 8601 format (en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)) will be added to the HTTP request.
717 718 719 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 717 def list_by_time_with_http_info(resource_group_name, service_name, interval, filter:nil, top:nil, skip:nil, custom_headers:nil) list_by_time_async(resource_group_name, service_name, interval, filter:filter, top:top, skip:skip, custom_headers:custom_headers).value! end |
#list_by_user(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Array<ReportRecordContract>
Lists report records by User.
will be added to the HTTP request.
146 147 148 149 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 146 def list_by_user(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) first_page = list_by_user_as_lazy(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_user_as_lazy(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ ReportCollection
Lists report records by User.
will be added to the HTTP request.
response.
1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1578 def list_by_user_as_lazy(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) response = list_by_user_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_user_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_user_async(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by User.
to the HTTP request.
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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 181 def list_by_user_async(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'service_name is nil' if service_name.nil? fail ArgumentError, "'service_name' should satisfy the constraint - 'MaxLength': '50'" if !service_name.nil? && service_name.length > 50 fail ArgumentError, "'service_name' should satisfy the constraint - 'MinLength': '1'" if !service_name.nil? && service_name.length < 1 fail ArgumentError, "'service_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'" if !service_name.nil? && service_name.match(Regexp.new('^^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$$')).nil? fail ArgumentError, 'filter is nil' if filter.nil? fail ArgumentError, "'top' should satisfy the constraint - 'InclusiveMinimum': '1'" if !top.nil? && top < 1 fail ArgumentError, "'skip' should satisfy the constraint - 'InclusiveMinimum': '0'" if !skip.nil? && skip < 0 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.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.ApiManagement/service/{serviceName}/reports/byUser' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_user_next(next_page_link, custom_headers: nil) ⇒ ReportCollection
Lists report records by User.
to List operation. will be added to the HTTP request.
1009 1010 1011 1012 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1009 def list_by_user_next(next_page_link, custom_headers:nil) response = list_by_user_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_user_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists report records by User.
to List operation. to the HTTP request.
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1038 def list_by_user_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::ApiManagement::Mgmt::V2018_01_01::Models::ReportCollection.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_by_user_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by User.
to List operation. will be added to the HTTP request.
1024 1025 1026 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 1024 def list_by_user_next_with_http_info(next_page_link, custom_headers:nil) list_by_user_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_user_with_http_info(resource_group_name, service_name, filter, top: nil, skip: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists report records by User.
will be added to the HTTP request.
164 165 166 |
# File 'lib/2018-01-01/generated/azure_mgmt_api_management/reports.rb', line 164 def list_by_user_with_http_info(resource_group_name, service_name, filter, top:nil, skip:nil, custom_headers:nil) list_by_user_async(resource_group_name, service_name, filter, top:top, skip:skip, custom_headers:custom_headers).value! end |