azure_mgmt_operational_insights 0.17.2 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights.rb +15 -16
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb +1 -1
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb +1 -1
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +3 -3
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb +5 -5
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +4 -3
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/{search_highlight.rb → shared_keys.rb} +13 -13
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +1 -2
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +14 -1
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +3 -5
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operations.rb +2 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/saved_searches.rb +69 -175
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/storage_insights.rb +36 -52
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb +319 -169
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights.rb +9 -7
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +10 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +8 -0
- data/lib/{2015-03-20/generated/azure_mgmt_operational_insights/models/search_error.rb → 2015-11-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb} +11 -11
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku.rb +2 -2
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +1 -1
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +9 -10
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +1 -1
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +95 -1
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operations.rb +4 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +24 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights.rb +123 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/available_service_tiers.rb +146 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/clusters.rb +959 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_exports.rb +523 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +603 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/deleted_workspaces.rb +211 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/gateways.rb +123 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/intelligence_packs.rb +351 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +577 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb +481 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/management_groups.rb +130 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb +75 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster.rb +159 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb +21 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb +48 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb +98 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_patch.rb +78 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb +15 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/core_summary.rb +57 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export.rb +174 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb +48 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb +56 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb +20 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb +130 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +61 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +47 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +98 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_type.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_additional_info.rb +59 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_contract.rb +49 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb +113 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity.rb +72 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity_type.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +69 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb +71 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service.rb +120 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb +18 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +55 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb +56 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb +95 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/management_group.rb +128 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/metric_name.rb +57 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +79 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +63 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +83 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_search.rb +165 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +55 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +67 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata.rb +241 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +57 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +123 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_account.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight.rb +157 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +98 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/table.rb +79 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tables_list_result.rb +55 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tag.rb +57 -0
- data/lib/{2015-03-20/generated/azure_mgmt_operational_insights/models/search_results_response.rb → 2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tracked_resource.rb} +33 -31
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/type.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/usage_metric.rb +103 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +214 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_capping.rb +73 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb +21 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +56 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +55 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +56 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_patch.rb +207 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku.rb +85 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb +21 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operation_statuses.rb +121 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +207 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operations.rb +220 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/saved_searches.rb +457 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/schema.rb +130 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/shared_keys_operations.rb +238 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/storage_insight_configs.rb +592 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/tables.rb +359 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/usages.rb +130 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspace_purge.rb +277 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +768 -0
- data/lib/azure_mgmt_operational_insights.rb +1 -0
- data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +291 -145
- data/lib/version.rb +1 -1
- metadata +109 -9
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_parameters.rb +0 -94
@@ -86,6 +86,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
86
86
|
end
|
87
87
|
|
88
88
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
89
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
90
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
89
91
|
# Deserialize Response
|
90
92
|
if status_code == 200
|
91
93
|
begin
|
@@ -174,6 +176,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
174
176
|
end
|
175
177
|
|
176
178
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
179
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
180
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
177
181
|
# Deserialize Response
|
178
182
|
if status_code == 200
|
179
183
|
begin
|
@@ -108,6 +108,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
108
108
|
end
|
109
109
|
|
110
110
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
111
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
112
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
111
113
|
|
112
114
|
result
|
113
115
|
end
|
@@ -202,6 +204,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
202
204
|
end
|
203
205
|
|
204
206
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
207
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
208
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
205
209
|
|
206
210
|
result
|
207
211
|
end
|
@@ -293,6 +297,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
293
297
|
end
|
294
298
|
|
295
299
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
300
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
301
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
296
302
|
# Deserialize Response
|
297
303
|
if status_code == 200
|
298
304
|
begin
|
@@ -407,6 +413,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
407
413
|
end
|
408
414
|
|
409
415
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
416
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
417
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
410
418
|
# Deserialize Response
|
411
419
|
if status_code == 200
|
412
420
|
begin
|
@@ -505,6 +513,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
505
513
|
end
|
506
514
|
|
507
515
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
516
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
517
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
508
518
|
# Deserialize Response
|
509
519
|
if status_code == 200
|
510
520
|
begin
|
@@ -603,6 +613,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
603
613
|
end
|
604
614
|
|
605
615
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
616
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
617
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
606
618
|
# Deserialize Response
|
607
619
|
if status_code == 200
|
608
620
|
begin
|
@@ -697,6 +709,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
697
709
|
end
|
698
710
|
|
699
711
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
712
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
713
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
700
714
|
# Deserialize Response
|
701
715
|
if status_code == 200
|
702
716
|
begin
|
@@ -781,6 +795,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
781
795
|
end
|
782
796
|
|
783
797
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
798
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
799
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
784
800
|
# Deserialize Response
|
785
801
|
if status_code == 200
|
786
802
|
begin
|
@@ -918,6 +934,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
918
934
|
end
|
919
935
|
|
920
936
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
937
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
938
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
921
939
|
|
922
940
|
result
|
923
941
|
end
|
@@ -1000,6 +1018,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
1000
1018
|
end
|
1001
1019
|
|
1002
1020
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1021
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1022
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1003
1023
|
# Deserialize Response
|
1004
1024
|
if status_code == 200
|
1005
1025
|
begin
|
@@ -1106,6 +1126,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
1106
1126
|
end
|
1107
1127
|
|
1108
1128
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1129
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1130
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1109
1131
|
# Deserialize Response
|
1110
1132
|
if status_code == 200
|
1111
1133
|
begin
|
@@ -1215,6 +1237,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
|
|
1215
1237
|
end
|
1216
1238
|
|
1217
1239
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1240
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1241
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1218
1242
|
# Deserialize Response
|
1219
1243
|
if status_code == 200
|
1220
1244
|
begin
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2020-03-01-preview/generated/azure_mgmt_operational_insights/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
|
23
|
+
autoload :DataExports, '2020-03-01-preview/generated/azure_mgmt_operational_insights/data_exports.rb'
|
24
|
+
autoload :DataSources, '2020-03-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb'
|
25
|
+
autoload :IntelligencePacks, '2020-03-01-preview/generated/azure_mgmt_operational_insights/intelligence_packs.rb'
|
26
|
+
autoload :LinkedServices, '2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb'
|
27
|
+
autoload :LinkedStorageAccounts, '2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb'
|
28
|
+
autoload :ManagementGroups, '2020-03-01-preview/generated/azure_mgmt_operational_insights/management_groups.rb'
|
29
|
+
autoload :Operations, '2020-03-01-preview/generated/azure_mgmt_operational_insights/operations.rb'
|
30
|
+
autoload :OperationStatuses, '2020-03-01-preview/generated/azure_mgmt_operational_insights/operation_statuses.rb'
|
31
|
+
autoload :SharedKeysOperations, '2020-03-01-preview/generated/azure_mgmt_operational_insights/shared_keys_operations.rb'
|
32
|
+
autoload :Usages, '2020-03-01-preview/generated/azure_mgmt_operational_insights/usages.rb'
|
33
|
+
autoload :Workspaces, '2020-03-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb'
|
34
|
+
autoload :DeletedWorkspaces, '2020-03-01-preview/generated/azure_mgmt_operational_insights/deleted_workspaces.rb'
|
35
|
+
autoload :Clusters, '2020-03-01-preview/generated/azure_mgmt_operational_insights/clusters.rb'
|
36
|
+
autoload :StorageInsightConfigs, '2020-03-01-preview/generated/azure_mgmt_operational_insights/storage_insight_configs.rb'
|
37
|
+
autoload :SavedSearches, '2020-03-01-preview/generated/azure_mgmt_operational_insights/saved_searches.rb'
|
38
|
+
autoload :AvailableServiceTiers, '2020-03-01-preview/generated/azure_mgmt_operational_insights/available_service_tiers.rb'
|
39
|
+
autoload :Gateways, '2020-03-01-preview/generated/azure_mgmt_operational_insights/gateways.rb'
|
40
|
+
autoload :Schema, '2020-03-01-preview/generated/azure_mgmt_operational_insights/schema.rb'
|
41
|
+
autoload :WorkspacePurge, '2020-03-01-preview/generated/azure_mgmt_operational_insights/workspace_purge.rb'
|
42
|
+
autoload :Tables, '2020-03-01-preview/generated/azure_mgmt_operational_insights/tables.rb'
|
43
|
+
autoload :OperationalInsightsManagementClient, '2020-03-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb'
|
44
|
+
|
45
|
+
module Models
|
46
|
+
autoload :WorkspaceSku, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku.rb'
|
47
|
+
autoload :WorkspaceCapping, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_capping.rb'
|
48
|
+
autoload :DataExportListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb'
|
49
|
+
autoload :PrivateLinkScopedResource, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb'
|
50
|
+
autoload :ErrorResponse, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb'
|
51
|
+
autoload :SearchSort, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort.rb'
|
52
|
+
autoload :WorkspacePurgeBody, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb'
|
53
|
+
autoload :ErrorAdditionalInfo, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_additional_info.rb'
|
54
|
+
autoload :WorkspacePurgeBodyFilters, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb'
|
55
|
+
autoload :DataExportErrorResponse, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb'
|
56
|
+
autoload :DataSourceFilter, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_filter.rb'
|
57
|
+
autoload :SearchMetadataSchema, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb'
|
58
|
+
autoload :IntelligencePack, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb'
|
59
|
+
autoload :ErrorContract, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_contract.rb'
|
60
|
+
autoload :LinkedServiceListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb'
|
61
|
+
autoload :WorkspaceListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb'
|
62
|
+
autoload :LinkedStorageAccountsListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb'
|
63
|
+
autoload :KeyVaultProperties, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb'
|
64
|
+
autoload :WorkspaceListManagementGroupsResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb'
|
65
|
+
autoload :ClusterErrorResponse, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb'
|
66
|
+
autoload :Operation, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb'
|
67
|
+
autoload :ClusterSku, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku.rb'
|
68
|
+
autoload :OperationStatus, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb'
|
69
|
+
autoload :ClusterPatch, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_patch.rb'
|
70
|
+
autoload :MetricName, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/metric_name.rb'
|
71
|
+
autoload :Identity, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity.rb'
|
72
|
+
autoload :WorkspaceListUsagesResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb'
|
73
|
+
autoload :TablesListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tables_list_result.rb'
|
74
|
+
autoload :SearchGetSchemaResponse, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb'
|
75
|
+
autoload :ClusterListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb'
|
76
|
+
autoload :SearchSchemaValue, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_schema_value.rb'
|
77
|
+
autoload :StorageAccount, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_account.rb'
|
78
|
+
autoload :ManagementGroup, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/management_group.rb'
|
79
|
+
autoload :StorageInsightStatus, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb'
|
80
|
+
autoload :OperationListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb'
|
81
|
+
autoload :WorkspacePurgeStatusResponse, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb'
|
82
|
+
autoload :UsageMetric, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/usage_metric.rb'
|
83
|
+
autoload :StorageInsightListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb'
|
84
|
+
autoload :DataSourceListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb'
|
85
|
+
autoload :Tag, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tag.rb'
|
86
|
+
autoload :OperationDisplay, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb'
|
87
|
+
autoload :WorkspacePurgeResponse, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb'
|
88
|
+
autoload :Resource, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb'
|
89
|
+
autoload :SavedSearchesListResult, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb'
|
90
|
+
autoload :SharedKeys, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/shared_keys.rb'
|
91
|
+
autoload :AvailableServiceTier, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/available_service_tier.rb'
|
92
|
+
autoload :SearchMetadata, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata.rb'
|
93
|
+
autoload :CoreSummary, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/core_summary.rb'
|
94
|
+
autoload :DataExport, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export.rb'
|
95
|
+
autoload :TrackedResource, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tracked_resource.rb'
|
96
|
+
autoload :AzureEntityResource, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb'
|
97
|
+
autoload :ProxyResource, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb'
|
98
|
+
autoload :DataSource, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb'
|
99
|
+
autoload :LinkedService, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service.rb'
|
100
|
+
autoload :LinkedStorageAccountsResource, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb'
|
101
|
+
autoload :Workspace, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb'
|
102
|
+
autoload :WorkspacePatch, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_patch.rb'
|
103
|
+
autoload :Cluster, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster.rb'
|
104
|
+
autoload :StorageInsight, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight.rb'
|
105
|
+
autoload :SavedSearch, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_search.rb'
|
106
|
+
autoload :Table, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/table.rb'
|
107
|
+
autoload :Type, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/type.rb'
|
108
|
+
autoload :DataSourceKind, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_kind.rb'
|
109
|
+
autoload :LinkedServiceEntityStatus, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb'
|
110
|
+
autoload :DataSourceType, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_type.rb'
|
111
|
+
autoload :WorkspaceSkuNameEnum, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb'
|
112
|
+
autoload :DataIngestionStatus, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb'
|
113
|
+
autoload :WorkspaceEntityStatus, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb'
|
114
|
+
autoload :PublicNetworkAccessType, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb'
|
115
|
+
autoload :ClusterEntityStatus, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb'
|
116
|
+
autoload :ClusterSkuNameEnum, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb'
|
117
|
+
autoload :IdentityType, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity_type.rb'
|
118
|
+
autoload :StorageInsightState, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb'
|
119
|
+
autoload :SkuNameEnum, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb'
|
120
|
+
autoload :SearchSortEnum, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb'
|
121
|
+
autoload :PurgeState, '2020-03-01-preview/generated/azure_mgmt_operational_insights/models/purge_state.rb'
|
122
|
+
end
|
123
|
+
end
|
data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/available_service_tiers.rb
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
|
7
|
+
#
|
8
|
+
# Operational Insights Client
|
9
|
+
#
|
10
|
+
class AvailableServiceTiers
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the AvailableServiceTiers class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets the available service tiers for the workspace.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
28
|
+
# is case insensitive.
|
29
|
+
# @param workspace_name [String] The name of the workspace.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [Array] operation results.
|
34
|
+
#
|
35
|
+
def list_by_workspace(resource_group_name, workspace_name, custom_headers:nil)
|
36
|
+
response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
|
37
|
+
response.body unless response.nil?
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets the available service tiers for the workspace.
|
42
|
+
#
|
43
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
44
|
+
# is case insensitive.
|
45
|
+
# @param workspace_name [String] The name of the workspace.
|
46
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
47
|
+
# will be added to the HTTP request.
|
48
|
+
#
|
49
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
|
+
#
|
51
|
+
def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
|
52
|
+
list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Gets the available service tiers for the workspace.
|
57
|
+
#
|
58
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
59
|
+
# is case insensitive.
|
60
|
+
# @param workspace_name [String] The name of the workspace.
|
61
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
62
|
+
# to the HTTP request.
|
63
|
+
#
|
64
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
|
+
#
|
66
|
+
def list_by_workspace_async(resource_group_name, workspace_name, custom_headers:nil)
|
67
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
68
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
69
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
70
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
71
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
72
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
73
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
74
|
+
fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '63'" if !workspace_name.nil? && workspace_name.length > 63
|
75
|
+
fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '4'" if !workspace_name.nil? && workspace_name.length < 4
|
76
|
+
fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$$')).nil?
|
77
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
78
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
79
|
+
|
80
|
+
|
81
|
+
request_headers = {}
|
82
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
83
|
+
|
84
|
+
# Set Headers
|
85
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
86
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
87
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers'
|
88
|
+
|
89
|
+
request_url = @base_url || @client.base_url
|
90
|
+
|
91
|
+
options = {
|
92
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
93
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
|
94
|
+
query_params: {'api-version' => @client.api_version},
|
95
|
+
headers: request_headers.merge(custom_headers || {}),
|
96
|
+
base_url: request_url
|
97
|
+
}
|
98
|
+
promise = @client.make_request_async(:get, path_template, options)
|
99
|
+
|
100
|
+
promise = promise.then do |result|
|
101
|
+
http_response = result.response
|
102
|
+
status_code = http_response.status
|
103
|
+
response_content = http_response.body
|
104
|
+
unless status_code == 200
|
105
|
+
error_model = JSON.load(response_content)
|
106
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
107
|
+
end
|
108
|
+
|
109
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
110
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
111
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
112
|
+
# Deserialize Response
|
113
|
+
if status_code == 200
|
114
|
+
begin
|
115
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
116
|
+
result_mapper = {
|
117
|
+
client_side_validation: true,
|
118
|
+
required: false,
|
119
|
+
serialized_name: 'parsed_response',
|
120
|
+
type: {
|
121
|
+
name: 'Sequence',
|
122
|
+
element: {
|
123
|
+
client_side_validation: true,
|
124
|
+
required: false,
|
125
|
+
serialized_name: 'AvailableServiceTierElementType',
|
126
|
+
type: {
|
127
|
+
name: 'Composite',
|
128
|
+
class_name: 'AvailableServiceTier'
|
129
|
+
}
|
130
|
+
}
|
131
|
+
}
|
132
|
+
}
|
133
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
134
|
+
rescue Exception => e
|
135
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
result
|
140
|
+
end
|
141
|
+
|
142
|
+
promise.execute
|
143
|
+
end
|
144
|
+
|
145
|
+
end
|
146
|
+
end
|
@@ -0,0 +1,959 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
|
7
|
+
#
|
8
|
+
# Operational Insights Client
|
9
|
+
#
|
10
|
+
class Clusters
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Clusters class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets Log Analytics clusters in a resource group.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
28
|
+
# is case insensitive.
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [Array<Cluster>] operation results.
|
33
|
+
#
|
34
|
+
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
35
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
|
36
|
+
first_page.get_all_items
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Gets Log Analytics clusters in a resource group.
|
41
|
+
#
|
42
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
43
|
+
# is case insensitive.
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
50
|
+
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Gets Log Analytics clusters in a resource group.
|
55
|
+
#
|
56
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
57
|
+
# is case insensitive.
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
64
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
65
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
66
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
67
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
68
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
69
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
70
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
71
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
72
|
+
|
73
|
+
|
74
|
+
request_headers = {}
|
75
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
76
|
+
|
77
|
+
# Set Headers
|
78
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
79
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
80
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters'
|
81
|
+
|
82
|
+
request_url = @base_url || @client.base_url
|
83
|
+
|
84
|
+
options = {
|
85
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
86
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
87
|
+
query_params: {'api-version' => @client.api_version},
|
88
|
+
headers: request_headers.merge(custom_headers || {}),
|
89
|
+
base_url: request_url
|
90
|
+
}
|
91
|
+
promise = @client.make_request_async(:get, path_template, options)
|
92
|
+
|
93
|
+
promise = promise.then do |result|
|
94
|
+
http_response = result.response
|
95
|
+
status_code = http_response.status
|
96
|
+
response_content = http_response.body
|
97
|
+
unless status_code == 200
|
98
|
+
error_model = JSON.load(response_content)
|
99
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
100
|
+
end
|
101
|
+
|
102
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
103
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
104
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
105
|
+
# Deserialize Response
|
106
|
+
if status_code == 200
|
107
|
+
begin
|
108
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
109
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::ClusterListResult.mapper()
|
110
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
111
|
+
rescue Exception => e
|
112
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
result
|
117
|
+
end
|
118
|
+
|
119
|
+
promise.execute
|
120
|
+
end
|
121
|
+
|
122
|
+
#
|
123
|
+
# Gets the Log Analytics clusters in a subscription.
|
124
|
+
#
|
125
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
126
|
+
# will be added to the HTTP request.
|
127
|
+
#
|
128
|
+
# @return [Array<Cluster>] operation results.
|
129
|
+
#
|
130
|
+
def list(custom_headers:nil)
|
131
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
132
|
+
first_page.get_all_items
|
133
|
+
end
|
134
|
+
|
135
|
+
#
|
136
|
+
# Gets the Log Analytics clusters in a subscription.
|
137
|
+
#
|
138
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
139
|
+
# will be added to the HTTP request.
|
140
|
+
#
|
141
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
142
|
+
#
|
143
|
+
def list_with_http_info(custom_headers:nil)
|
144
|
+
list_async(custom_headers:custom_headers).value!
|
145
|
+
end
|
146
|
+
|
147
|
+
#
|
148
|
+
# Gets the Log Analytics clusters in a subscription.
|
149
|
+
#
|
150
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
151
|
+
# to the HTTP request.
|
152
|
+
#
|
153
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
154
|
+
#
|
155
|
+
def list_async(custom_headers:nil)
|
156
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
157
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
158
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
159
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
160
|
+
|
161
|
+
|
162
|
+
request_headers = {}
|
163
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
164
|
+
|
165
|
+
# Set Headers
|
166
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
167
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
168
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters'
|
169
|
+
|
170
|
+
request_url = @base_url || @client.base_url
|
171
|
+
|
172
|
+
options = {
|
173
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
174
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
175
|
+
query_params: {'api-version' => @client.api_version},
|
176
|
+
headers: request_headers.merge(custom_headers || {}),
|
177
|
+
base_url: request_url
|
178
|
+
}
|
179
|
+
promise = @client.make_request_async(:get, path_template, options)
|
180
|
+
|
181
|
+
promise = promise.then do |result|
|
182
|
+
http_response = result.response
|
183
|
+
status_code = http_response.status
|
184
|
+
response_content = http_response.body
|
185
|
+
unless status_code == 200
|
186
|
+
error_model = JSON.load(response_content)
|
187
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
188
|
+
end
|
189
|
+
|
190
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
191
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
192
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
193
|
+
# Deserialize Response
|
194
|
+
if status_code == 200
|
195
|
+
begin
|
196
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
197
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::ClusterListResult.mapper()
|
198
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
199
|
+
rescue Exception => e
|
200
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
result
|
205
|
+
end
|
206
|
+
|
207
|
+
promise.execute
|
208
|
+
end
|
209
|
+
|
210
|
+
#
|
211
|
+
# Create or update a Log Analytics cluster.
|
212
|
+
#
|
213
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
214
|
+
# is case insensitive.
|
215
|
+
# @param cluster_name [String] The name of the Log Analytics cluster.
|
216
|
+
# @param parameters [Cluster] The parameters required to create or update a Log
|
217
|
+
# Analytics cluster.
|
218
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
219
|
+
# will be added to the HTTP request.
|
220
|
+
#
|
221
|
+
# @return [Cluster] operation results.
|
222
|
+
#
|
223
|
+
def create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
224
|
+
response = create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
225
|
+
response.body unless response.nil?
|
226
|
+
end
|
227
|
+
|
228
|
+
#
|
229
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
230
|
+
# is case insensitive.
|
231
|
+
# @param cluster_name [String] The name of the Log Analytics cluster.
|
232
|
+
# @param parameters [Cluster] The parameters required to create or update a Log
|
233
|
+
# Analytics cluster.
|
234
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
235
|
+
# will be added to the HTTP request.
|
236
|
+
#
|
237
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
238
|
+
# response.
|
239
|
+
#
|
240
|
+
def create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
241
|
+
# Send request
|
242
|
+
promise = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
|
243
|
+
|
244
|
+
promise = promise.then do |response|
|
245
|
+
# Defining deserialization method.
|
246
|
+
deserialize_method = lambda do |parsed_response|
|
247
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::Cluster.mapper()
|
248
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
249
|
+
end
|
250
|
+
|
251
|
+
# Waiting for response.
|
252
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
253
|
+
end
|
254
|
+
|
255
|
+
promise
|
256
|
+
end
|
257
|
+
|
258
|
+
#
|
259
|
+
# Deletes a cluster instance.
|
260
|
+
#
|
261
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
262
|
+
# is case insensitive.
|
263
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
264
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
265
|
+
# will be added to the HTTP request.
|
266
|
+
#
|
267
|
+
def delete(resource_group_name, cluster_name, custom_headers:nil)
|
268
|
+
response = delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
269
|
+
nil
|
270
|
+
end
|
271
|
+
|
272
|
+
#
|
273
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
274
|
+
# is case insensitive.
|
275
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
276
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
277
|
+
# will be added to the HTTP request.
|
278
|
+
#
|
279
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
280
|
+
# response.
|
281
|
+
#
|
282
|
+
def delete_async(resource_group_name, cluster_name, custom_headers:nil)
|
283
|
+
# Send request
|
284
|
+
promise = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers)
|
285
|
+
|
286
|
+
promise = promise.then do |response|
|
287
|
+
# Defining deserialization method.
|
288
|
+
deserialize_method = lambda do |parsed_response|
|
289
|
+
end
|
290
|
+
|
291
|
+
# Waiting for response.
|
292
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
293
|
+
end
|
294
|
+
|
295
|
+
promise
|
296
|
+
end
|
297
|
+
|
298
|
+
#
|
299
|
+
# Gets a Log Analytics cluster instance.
|
300
|
+
#
|
301
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
302
|
+
# is case insensitive.
|
303
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
304
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
305
|
+
# will be added to the HTTP request.
|
306
|
+
#
|
307
|
+
# @return [Cluster] operation results.
|
308
|
+
#
|
309
|
+
def get(resource_group_name, cluster_name, custom_headers:nil)
|
310
|
+
response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
311
|
+
response.body unless response.nil?
|
312
|
+
end
|
313
|
+
|
314
|
+
#
|
315
|
+
# Gets a Log Analytics cluster instance.
|
316
|
+
#
|
317
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
318
|
+
# is case insensitive.
|
319
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
320
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
321
|
+
# will be added to the HTTP request.
|
322
|
+
#
|
323
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
324
|
+
#
|
325
|
+
def get_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
326
|
+
get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
327
|
+
end
|
328
|
+
|
329
|
+
#
|
330
|
+
# Gets a Log Analytics cluster instance.
|
331
|
+
#
|
332
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
333
|
+
# is case insensitive.
|
334
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
335
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
336
|
+
# to the HTTP request.
|
337
|
+
#
|
338
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
339
|
+
#
|
340
|
+
def get_async(resource_group_name, cluster_name, custom_headers:nil)
|
341
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
342
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
343
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
344
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
345
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
346
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
347
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
348
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
349
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
350
|
+
|
351
|
+
|
352
|
+
request_headers = {}
|
353
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
354
|
+
|
355
|
+
# Set Headers
|
356
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
357
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
358
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'
|
359
|
+
|
360
|
+
request_url = @base_url || @client.base_url
|
361
|
+
|
362
|
+
options = {
|
363
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
364
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
|
365
|
+
query_params: {'api-version' => @client.api_version},
|
366
|
+
headers: request_headers.merge(custom_headers || {}),
|
367
|
+
base_url: request_url
|
368
|
+
}
|
369
|
+
promise = @client.make_request_async(:get, path_template, options)
|
370
|
+
|
371
|
+
promise = promise.then do |result|
|
372
|
+
http_response = result.response
|
373
|
+
status_code = http_response.status
|
374
|
+
response_content = http_response.body
|
375
|
+
unless status_code == 200
|
376
|
+
error_model = JSON.load(response_content)
|
377
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
378
|
+
end
|
379
|
+
|
380
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
381
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
382
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
383
|
+
# Deserialize Response
|
384
|
+
if status_code == 200
|
385
|
+
begin
|
386
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
387
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::Cluster.mapper()
|
388
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
389
|
+
rescue Exception => e
|
390
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
391
|
+
end
|
392
|
+
end
|
393
|
+
|
394
|
+
result
|
395
|
+
end
|
396
|
+
|
397
|
+
promise.execute
|
398
|
+
end
|
399
|
+
|
400
|
+
#
|
401
|
+
# Updates a Log Analytics cluster.
|
402
|
+
#
|
403
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
404
|
+
# is case insensitive.
|
405
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
406
|
+
# @param parameters [ClusterPatch] The parameters required to patch a Log
|
407
|
+
# Analytics cluster.
|
408
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
409
|
+
# will be added to the HTTP request.
|
410
|
+
#
|
411
|
+
# @return [Cluster] operation results.
|
412
|
+
#
|
413
|
+
def update(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
414
|
+
response = update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
415
|
+
response.body unless response.nil?
|
416
|
+
end
|
417
|
+
|
418
|
+
#
|
419
|
+
# Updates a Log Analytics cluster.
|
420
|
+
#
|
421
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
422
|
+
# is case insensitive.
|
423
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
424
|
+
# @param parameters [ClusterPatch] The parameters required to patch a Log
|
425
|
+
# Analytics cluster.
|
426
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
427
|
+
# will be added to the HTTP request.
|
428
|
+
#
|
429
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
430
|
+
#
|
431
|
+
def update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
432
|
+
update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
433
|
+
end
|
434
|
+
|
435
|
+
#
|
436
|
+
# Updates a Log Analytics cluster.
|
437
|
+
#
|
438
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
439
|
+
# is case insensitive.
|
440
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
441
|
+
# @param parameters [ClusterPatch] The parameters required to patch a Log
|
442
|
+
# Analytics cluster.
|
443
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
444
|
+
# to the HTTP request.
|
445
|
+
#
|
446
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
447
|
+
#
|
448
|
+
def update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
449
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
450
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
451
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
452
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
453
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
454
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
455
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
456
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
457
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
458
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
459
|
+
|
460
|
+
|
461
|
+
request_headers = {}
|
462
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
463
|
+
|
464
|
+
# Set Headers
|
465
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
466
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
467
|
+
|
468
|
+
# Serialize Request
|
469
|
+
request_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::ClusterPatch.mapper()
|
470
|
+
request_content = @client.serialize(request_mapper, parameters)
|
471
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
472
|
+
|
473
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'
|
474
|
+
|
475
|
+
request_url = @base_url || @client.base_url
|
476
|
+
|
477
|
+
options = {
|
478
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
479
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
480
|
+
query_params: {'api-version' => @client.api_version},
|
481
|
+
body: request_content,
|
482
|
+
headers: request_headers.merge(custom_headers || {}),
|
483
|
+
base_url: request_url
|
484
|
+
}
|
485
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
486
|
+
|
487
|
+
promise = promise.then do |result|
|
488
|
+
http_response = result.response
|
489
|
+
status_code = http_response.status
|
490
|
+
response_content = http_response.body
|
491
|
+
unless status_code == 200
|
492
|
+
error_model = JSON.load(response_content)
|
493
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
494
|
+
end
|
495
|
+
|
496
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
497
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
498
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
499
|
+
# Deserialize Response
|
500
|
+
if status_code == 200
|
501
|
+
begin
|
502
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
503
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::Cluster.mapper()
|
504
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
505
|
+
rescue Exception => e
|
506
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
507
|
+
end
|
508
|
+
end
|
509
|
+
|
510
|
+
result
|
511
|
+
end
|
512
|
+
|
513
|
+
promise.execute
|
514
|
+
end
|
515
|
+
|
516
|
+
#
|
517
|
+
# Create or update a Log Analytics cluster.
|
518
|
+
#
|
519
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
520
|
+
# is case insensitive.
|
521
|
+
# @param cluster_name [String] The name of the Log Analytics cluster.
|
522
|
+
# @param parameters [Cluster] The parameters required to create or update a Log
|
523
|
+
# Analytics cluster.
|
524
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
525
|
+
# will be added to the HTTP request.
|
526
|
+
#
|
527
|
+
# @return [Cluster] operation results.
|
528
|
+
#
|
529
|
+
def begin_create_or_update(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
530
|
+
response = begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
531
|
+
response.body unless response.nil?
|
532
|
+
end
|
533
|
+
|
534
|
+
#
|
535
|
+
# Create or update a Log Analytics cluster.
|
536
|
+
#
|
537
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
538
|
+
# is case insensitive.
|
539
|
+
# @param cluster_name [String] The name of the Log Analytics cluster.
|
540
|
+
# @param parameters [Cluster] The parameters required to create or update a Log
|
541
|
+
# Analytics cluster.
|
542
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
543
|
+
# will be added to the HTTP request.
|
544
|
+
#
|
545
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
546
|
+
#
|
547
|
+
def begin_create_or_update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
548
|
+
begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
549
|
+
end
|
550
|
+
|
551
|
+
#
|
552
|
+
# Create or update a Log Analytics cluster.
|
553
|
+
#
|
554
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
555
|
+
# is case insensitive.
|
556
|
+
# @param cluster_name [String] The name of the Log Analytics cluster.
|
557
|
+
# @param parameters [Cluster] The parameters required to create or update a Log
|
558
|
+
# Analytics cluster.
|
559
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
560
|
+
# to the HTTP request.
|
561
|
+
#
|
562
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
563
|
+
#
|
564
|
+
def begin_create_or_update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
565
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
566
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
567
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
568
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
569
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
570
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
571
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
572
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
573
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
574
|
+
fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '63'" if !cluster_name.nil? && cluster_name.length > 63
|
575
|
+
fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '4'" if !cluster_name.nil? && cluster_name.length < 4
|
576
|
+
fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$$')).nil?
|
577
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
578
|
+
|
579
|
+
|
580
|
+
request_headers = {}
|
581
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
582
|
+
|
583
|
+
# Set Headers
|
584
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
585
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
586
|
+
|
587
|
+
# Serialize Request
|
588
|
+
request_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::Cluster.mapper()
|
589
|
+
request_content = @client.serialize(request_mapper, parameters)
|
590
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
591
|
+
|
592
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'
|
593
|
+
|
594
|
+
request_url = @base_url || @client.base_url
|
595
|
+
|
596
|
+
options = {
|
597
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
598
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'clusterName' => cluster_name},
|
599
|
+
query_params: {'api-version' => @client.api_version},
|
600
|
+
body: request_content,
|
601
|
+
headers: request_headers.merge(custom_headers || {}),
|
602
|
+
base_url: request_url
|
603
|
+
}
|
604
|
+
promise = @client.make_request_async(:put, path_template, options)
|
605
|
+
|
606
|
+
promise = promise.then do |result|
|
607
|
+
http_response = result.response
|
608
|
+
status_code = http_response.status
|
609
|
+
response_content = http_response.body
|
610
|
+
unless status_code == 202 || status_code == 200 || status_code == 201
|
611
|
+
error_model = JSON.load(response_content)
|
612
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
613
|
+
end
|
614
|
+
|
615
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
616
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
617
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
618
|
+
# Deserialize Response
|
619
|
+
if status_code == 200
|
620
|
+
begin
|
621
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
622
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::Cluster.mapper()
|
623
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
624
|
+
rescue Exception => e
|
625
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
626
|
+
end
|
627
|
+
end
|
628
|
+
# Deserialize Response
|
629
|
+
if status_code == 201
|
630
|
+
begin
|
631
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
632
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::Cluster.mapper()
|
633
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
634
|
+
rescue Exception => e
|
635
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
636
|
+
end
|
637
|
+
end
|
638
|
+
|
639
|
+
result
|
640
|
+
end
|
641
|
+
|
642
|
+
promise.execute
|
643
|
+
end
|
644
|
+
|
645
|
+
#
|
646
|
+
# Deletes a cluster instance.
|
647
|
+
#
|
648
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
649
|
+
# is case insensitive.
|
650
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
651
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
652
|
+
# will be added to the HTTP request.
|
653
|
+
#
|
654
|
+
#
|
655
|
+
def begin_delete(resource_group_name, cluster_name, custom_headers:nil)
|
656
|
+
response = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
657
|
+
nil
|
658
|
+
end
|
659
|
+
|
660
|
+
#
|
661
|
+
# Deletes a cluster instance.
|
662
|
+
#
|
663
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
664
|
+
# is case insensitive.
|
665
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
666
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
667
|
+
# will be added to the HTTP request.
|
668
|
+
#
|
669
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
670
|
+
#
|
671
|
+
def begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
672
|
+
begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
673
|
+
end
|
674
|
+
|
675
|
+
#
|
676
|
+
# Deletes a cluster instance.
|
677
|
+
#
|
678
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
679
|
+
# is case insensitive.
|
680
|
+
# @param cluster_name [String] Name of the Log Analytics Cluster.
|
681
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
682
|
+
# to the HTTP request.
|
683
|
+
#
|
684
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
685
|
+
#
|
686
|
+
def begin_delete_async(resource_group_name, cluster_name, custom_headers:nil)
|
687
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
688
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
689
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
690
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
691
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
692
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
693
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
694
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
695
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
696
|
+
|
697
|
+
|
698
|
+
request_headers = {}
|
699
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
700
|
+
|
701
|
+
# Set Headers
|
702
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
703
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
704
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'
|
705
|
+
|
706
|
+
request_url = @base_url || @client.base_url
|
707
|
+
|
708
|
+
options = {
|
709
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
710
|
+
path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
|
711
|
+
query_params: {'api-version' => @client.api_version},
|
712
|
+
headers: request_headers.merge(custom_headers || {}),
|
713
|
+
base_url: request_url
|
714
|
+
}
|
715
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
716
|
+
|
717
|
+
promise = promise.then do |result|
|
718
|
+
http_response = result.response
|
719
|
+
status_code = http_response.status
|
720
|
+
response_content = http_response.body
|
721
|
+
unless status_code == 200 || status_code == 204
|
722
|
+
error_model = JSON.load(response_content)
|
723
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
724
|
+
end
|
725
|
+
|
726
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
727
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
728
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
729
|
+
|
730
|
+
result
|
731
|
+
end
|
732
|
+
|
733
|
+
promise.execute
|
734
|
+
end
|
735
|
+
|
736
|
+
#
|
737
|
+
# Gets Log Analytics clusters in a resource group.
|
738
|
+
#
|
739
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
740
|
+
# to List operation.
|
741
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
742
|
+
# will be added to the HTTP request.
|
743
|
+
#
|
744
|
+
# @return [ClusterListResult] operation results.
|
745
|
+
#
|
746
|
+
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
747
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
748
|
+
response.body unless response.nil?
|
749
|
+
end
|
750
|
+
|
751
|
+
#
|
752
|
+
# Gets Log Analytics clusters in a resource group.
|
753
|
+
#
|
754
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
755
|
+
# to List operation.
|
756
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
757
|
+
# will be added to the HTTP request.
|
758
|
+
#
|
759
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
760
|
+
#
|
761
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
762
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
763
|
+
end
|
764
|
+
|
765
|
+
#
|
766
|
+
# Gets Log Analytics clusters in a resource group.
|
767
|
+
#
|
768
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
769
|
+
# to List operation.
|
770
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
771
|
+
# to the HTTP request.
|
772
|
+
#
|
773
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
774
|
+
#
|
775
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
776
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
777
|
+
|
778
|
+
|
779
|
+
request_headers = {}
|
780
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
781
|
+
|
782
|
+
# Set Headers
|
783
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
784
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
785
|
+
path_template = '{nextLink}'
|
786
|
+
|
787
|
+
request_url = @base_url || @client.base_url
|
788
|
+
|
789
|
+
options = {
|
790
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
791
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
792
|
+
headers: request_headers.merge(custom_headers || {}),
|
793
|
+
base_url: request_url
|
794
|
+
}
|
795
|
+
promise = @client.make_request_async(:get, path_template, options)
|
796
|
+
|
797
|
+
promise = promise.then do |result|
|
798
|
+
http_response = result.response
|
799
|
+
status_code = http_response.status
|
800
|
+
response_content = http_response.body
|
801
|
+
unless status_code == 200
|
802
|
+
error_model = JSON.load(response_content)
|
803
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
804
|
+
end
|
805
|
+
|
806
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
807
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
808
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
809
|
+
# Deserialize Response
|
810
|
+
if status_code == 200
|
811
|
+
begin
|
812
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
813
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::ClusterListResult.mapper()
|
814
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
815
|
+
rescue Exception => e
|
816
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
817
|
+
end
|
818
|
+
end
|
819
|
+
|
820
|
+
result
|
821
|
+
end
|
822
|
+
|
823
|
+
promise.execute
|
824
|
+
end
|
825
|
+
|
826
|
+
#
|
827
|
+
# Gets the Log Analytics clusters in a subscription.
|
828
|
+
#
|
829
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
830
|
+
# to List operation.
|
831
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
832
|
+
# will be added to the HTTP request.
|
833
|
+
#
|
834
|
+
# @return [ClusterListResult] operation results.
|
835
|
+
#
|
836
|
+
def list_next(next_page_link, custom_headers:nil)
|
837
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
838
|
+
response.body unless response.nil?
|
839
|
+
end
|
840
|
+
|
841
|
+
#
|
842
|
+
# Gets the Log Analytics clusters in a subscription.
|
843
|
+
#
|
844
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
845
|
+
# to List operation.
|
846
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
847
|
+
# will be added to the HTTP request.
|
848
|
+
#
|
849
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
850
|
+
#
|
851
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
852
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
853
|
+
end
|
854
|
+
|
855
|
+
#
|
856
|
+
# Gets the Log Analytics clusters in a subscription.
|
857
|
+
#
|
858
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
859
|
+
# to List operation.
|
860
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
861
|
+
# to the HTTP request.
|
862
|
+
#
|
863
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
864
|
+
#
|
865
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
866
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
867
|
+
|
868
|
+
|
869
|
+
request_headers = {}
|
870
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
871
|
+
|
872
|
+
# Set Headers
|
873
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
874
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
875
|
+
path_template = '{nextLink}'
|
876
|
+
|
877
|
+
request_url = @base_url || @client.base_url
|
878
|
+
|
879
|
+
options = {
|
880
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
881
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
882
|
+
headers: request_headers.merge(custom_headers || {}),
|
883
|
+
base_url: request_url
|
884
|
+
}
|
885
|
+
promise = @client.make_request_async(:get, path_template, options)
|
886
|
+
|
887
|
+
promise = promise.then do |result|
|
888
|
+
http_response = result.response
|
889
|
+
status_code = http_response.status
|
890
|
+
response_content = http_response.body
|
891
|
+
unless status_code == 200
|
892
|
+
error_model = JSON.load(response_content)
|
893
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
894
|
+
end
|
895
|
+
|
896
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
897
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
898
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
899
|
+
# Deserialize Response
|
900
|
+
if status_code == 200
|
901
|
+
begin
|
902
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
903
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::ClusterListResult.mapper()
|
904
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
905
|
+
rescue Exception => e
|
906
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
907
|
+
end
|
908
|
+
end
|
909
|
+
|
910
|
+
result
|
911
|
+
end
|
912
|
+
|
913
|
+
promise.execute
|
914
|
+
end
|
915
|
+
|
916
|
+
#
|
917
|
+
# Gets Log Analytics clusters in a resource group.
|
918
|
+
#
|
919
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
920
|
+
# is case insensitive.
|
921
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
922
|
+
# will be added to the HTTP request.
|
923
|
+
#
|
924
|
+
# @return [ClusterListResult] which provide lazy access to pages of the
|
925
|
+
# response.
|
926
|
+
#
|
927
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
|
928
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
929
|
+
unless response.nil?
|
930
|
+
page = response.body
|
931
|
+
page.next_method = Proc.new do |next_page_link|
|
932
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
933
|
+
end
|
934
|
+
page
|
935
|
+
end
|
936
|
+
end
|
937
|
+
|
938
|
+
#
|
939
|
+
# Gets the Log Analytics clusters in a subscription.
|
940
|
+
#
|
941
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
942
|
+
# will be added to the HTTP request.
|
943
|
+
#
|
944
|
+
# @return [ClusterListResult] which provide lazy access to pages of the
|
945
|
+
# response.
|
946
|
+
#
|
947
|
+
def list_as_lazy(custom_headers:nil)
|
948
|
+
response = list_async(custom_headers:custom_headers).value!
|
949
|
+
unless response.nil?
|
950
|
+
page = response.body
|
951
|
+
page.next_method = Proc.new do |next_page_link|
|
952
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
953
|
+
end
|
954
|
+
page
|
955
|
+
end
|
956
|
+
end
|
957
|
+
|
958
|
+
end
|
959
|
+
end
|