azure_mgmt_operational_insights 0.19.1 → 0.19.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +1 -1
  3. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +1 -1
  4. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +1 -1
  5. data/lib/2020-08-01/generated/azure_mgmt_operational_insights.rb +123 -0
  6. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/available_service_tiers.rb +146 -0
  7. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/clusters.rb +959 -0
  8. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/data_exports.rb +473 -0
  9. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/data_sources.rb +603 -0
  10. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/deleted_workspaces.rb +211 -0
  11. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/gateways.rb +123 -0
  12. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/intelligence_packs.rb +351 -0
  13. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/linked_services.rb +577 -0
  14. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb +481 -0
  15. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/management_groups.rb +130 -0
  16. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
  17. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb +75 -0
  18. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster.rb +159 -0
  19. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb +21 -0
  20. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb +48 -0
  21. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb +98 -0
  22. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_patch.rb +78 -0
  23. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_sku.rb +58 -0
  24. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb +15 -0
  25. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/core_summary.rb +57 -0
  26. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_export.rb +174 -0
  27. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb +48 -0
  28. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb +56 -0
  29. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb +20 -0
  30. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source.rb +130 -0
  31. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +61 -0
  32. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +47 -0
  33. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +98 -0
  34. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_type.rb +18 -0
  35. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/error_additional_info.rb +59 -0
  36. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/error_contract.rb +49 -0
  37. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/error_response.rb +113 -0
  38. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/identity.rb +72 -0
  39. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/identity_type.rb +16 -0
  40. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +69 -0
  41. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb +71 -0
  42. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service.rb +120 -0
  43. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb +18 -0
  44. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +55 -0
  45. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb +56 -0
  46. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb +95 -0
  47. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/management_group.rb +128 -0
  48. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/metric_name.rb +57 -0
  49. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  50. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/operation_display.rb +79 -0
  51. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  52. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
  53. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb +58 -0
  54. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +63 -0
  55. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb +16 -0
  56. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
  57. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/resource.rb +83 -0
  58. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/saved_search.rb +165 -0
  59. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +55 -0
  60. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +67 -0
  61. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_metadata.rb +241 -0
  62. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +57 -0
  63. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +123 -0
  64. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_sort.rb +58 -0
  65. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
  66. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
  67. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  68. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_account.rb +58 -0
  69. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight.rb +157 -0
  70. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +98 -0
  71. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
  72. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +58 -0
  73. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/table.rb +79 -0
  74. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/tables_list_result.rb +55 -0
  75. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/tag.rb +57 -0
  76. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/tracked_resource.rb +92 -0
  77. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/type.rb +16 -0
  78. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/usage_metric.rb +103 -0
  79. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace.rb +213 -0
  80. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_capping.rb +72 -0
  81. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb +21 -0
  82. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +56 -0
  83. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +55 -0
  84. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +56 -0
  85. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_patch.rb +206 -0
  86. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
  87. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
  88. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
  89. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
  90. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_sku.rb +85 -0
  91. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb +21 -0
  92. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
  93. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/operation_statuses.rb +121 -0
  94. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +207 -0
  95. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/operations.rb +220 -0
  96. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/saved_searches.rb +457 -0
  97. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/schema.rb +130 -0
  98. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/shared_keys_operations.rb +238 -0
  99. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/storage_insight_configs.rb +592 -0
  100. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/tables.rb +359 -0
  101. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/usages.rb +130 -0
  102. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/workspace_purge.rb +277 -0
  103. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/workspaces.rb +768 -0
  104. data/lib/azure_mgmt_operational_insights.rb +1 -0
  105. data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +173 -173
  106. data/lib/version.rb +1 -1
  107. metadata +101 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a0f00cd44c0fe90899e4e3d84b867b1f52c4760ec74a54cfd9ffb981fe1e347
4
- data.tar.gz: d3d983aa1dcbcc9f9e9fa6d30a35d4454234def96b19862bac3a80d6e46b1dcb
3
+ metadata.gz: 9499c4849c0f3ea6148a2547932f2d055cc9fbca12c0ef3681791edf803ce403
4
+ data.tar.gz: a0d88bda97c122553aba6b1b09be50efcd2c0647e8c788c4d34f739c69ec5929
5
5
  SHA512:
6
- metadata.gz: fa85432bebd883df44a9a65f35928de703525e682237a0a2d09c4d88ee9db2ac1f225e2656e9e0e0d020182e567a858c529bb48dbc7982cf8e5290417d2c22af
7
- data.tar.gz: 1107c07ad69a7bab4fbc97204580a5b10ab624852e4f73368036f5ea8d5666a5c0df2a93f65a19aa59c325837c1bd68f535e7cca963b37a40299ad7ffa13d030
6
+ metadata.gz: acc4f15461d46d2cfa111d38b3612d8eda362ba13634699f8700c3ca7864e0b7000bea36eafafc623c00e24c872f9c97fa381e917120b857bb1703fd7aa8b870
7
+ data.tar.gz: b89b5e485e8c1e810360a8e2cb06b5810fd69f81f1dc8ab4938b7679c2589785815865d230656f2fe82072af3bbfac27690609e401550587a50873f8a0a28040
@@ -144,7 +144,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
144
144
  #
145
145
  def add_telemetry
146
146
  sdk_information = 'azure_mgmt_operational_insights'
147
- sdk_information = "#{sdk_information}/0.19.1"
147
+ sdk_information = "#{sdk_information}/0.19.2"
148
148
  add_user_agent_information(sdk_information)
149
149
  end
150
150
  end
@@ -232,7 +232,7 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
232
232
  #
233
233
  def add_telemetry
234
234
  sdk_information = 'azure_mgmt_operational_insights'
235
- sdk_information = "#{sdk_information}/0.19.1"
235
+ sdk_information = "#{sdk_information}/0.19.2"
236
236
  add_user_agent_information(sdk_information)
237
237
  end
238
238
  end
@@ -200,7 +200,7 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
200
200
  #
201
201
  def add_telemetry
202
202
  sdk_information = 'azure_mgmt_operational_insights'
203
- sdk_information = "#{sdk_information}/0.19.1"
203
+ sdk_information = "#{sdk_information}/0.19.2"
204
204
  add_user_agent_information(sdk_information)
205
205
  end
206
206
  end
@@ -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-08-01/generated/azure_mgmt_operational_insights/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::OperationalInsights::Mgmt::V2020_08_01
23
+ autoload :DataExports, '2020-08-01/generated/azure_mgmt_operational_insights/data_exports.rb'
24
+ autoload :DataSources, '2020-08-01/generated/azure_mgmt_operational_insights/data_sources.rb'
25
+ autoload :IntelligencePacks, '2020-08-01/generated/azure_mgmt_operational_insights/intelligence_packs.rb'
26
+ autoload :LinkedServices, '2020-08-01/generated/azure_mgmt_operational_insights/linked_services.rb'
27
+ autoload :LinkedStorageAccounts, '2020-08-01/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb'
28
+ autoload :ManagementGroups, '2020-08-01/generated/azure_mgmt_operational_insights/management_groups.rb'
29
+ autoload :Operations, '2020-08-01/generated/azure_mgmt_operational_insights/operations.rb'
30
+ autoload :OperationStatuses, '2020-08-01/generated/azure_mgmt_operational_insights/operation_statuses.rb'
31
+ autoload :SharedKeysOperations, '2020-08-01/generated/azure_mgmt_operational_insights/shared_keys_operations.rb'
32
+ autoload :Usages, '2020-08-01/generated/azure_mgmt_operational_insights/usages.rb'
33
+ autoload :Workspaces, '2020-08-01/generated/azure_mgmt_operational_insights/workspaces.rb'
34
+ autoload :DeletedWorkspaces, '2020-08-01/generated/azure_mgmt_operational_insights/deleted_workspaces.rb'
35
+ autoload :Clusters, '2020-08-01/generated/azure_mgmt_operational_insights/clusters.rb'
36
+ autoload :StorageInsightConfigs, '2020-08-01/generated/azure_mgmt_operational_insights/storage_insight_configs.rb'
37
+ autoload :SavedSearches, '2020-08-01/generated/azure_mgmt_operational_insights/saved_searches.rb'
38
+ autoload :AvailableServiceTiers, '2020-08-01/generated/azure_mgmt_operational_insights/available_service_tiers.rb'
39
+ autoload :Gateways, '2020-08-01/generated/azure_mgmt_operational_insights/gateways.rb'
40
+ autoload :Schema, '2020-08-01/generated/azure_mgmt_operational_insights/schema.rb'
41
+ autoload :WorkspacePurge, '2020-08-01/generated/azure_mgmt_operational_insights/workspace_purge.rb'
42
+ autoload :Tables, '2020-08-01/generated/azure_mgmt_operational_insights/tables.rb'
43
+ autoload :OperationalInsightsManagementClient, '2020-08-01/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb'
44
+
45
+ module Models
46
+ autoload :WorkspaceSku, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_sku.rb'
47
+ autoload :WorkspaceCapping, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_capping.rb'
48
+ autoload :DataExportListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb'
49
+ autoload :PrivateLinkScopedResource, '2020-08-01/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb'
50
+ autoload :ErrorResponse, '2020-08-01/generated/azure_mgmt_operational_insights/models/error_response.rb'
51
+ autoload :SearchSort, '2020-08-01/generated/azure_mgmt_operational_insights/models/search_sort.rb'
52
+ autoload :WorkspacePurgeBody, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb'
53
+ autoload :ErrorAdditionalInfo, '2020-08-01/generated/azure_mgmt_operational_insights/models/error_additional_info.rb'
54
+ autoload :WorkspacePurgeBodyFilters, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb'
55
+ autoload :DataExportErrorResponse, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb'
56
+ autoload :DataSourceFilter, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_filter.rb'
57
+ autoload :SearchMetadataSchema, '2020-08-01/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb'
58
+ autoload :IntelligencePack, '2020-08-01/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb'
59
+ autoload :ErrorContract, '2020-08-01/generated/azure_mgmt_operational_insights/models/error_contract.rb'
60
+ autoload :LinkedServiceListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb'
61
+ autoload :WorkspaceListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb'
62
+ autoload :LinkedStorageAccountsListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb'
63
+ autoload :KeyVaultProperties, '2020-08-01/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb'
64
+ autoload :WorkspaceListManagementGroupsResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb'
65
+ autoload :ClusterErrorResponse, '2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb'
66
+ autoload :Operation, '2020-08-01/generated/azure_mgmt_operational_insights/models/operation.rb'
67
+ autoload :ClusterSku, '2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_sku.rb'
68
+ autoload :OperationStatus, '2020-08-01/generated/azure_mgmt_operational_insights/models/operation_status.rb'
69
+ autoload :ClusterPatch, '2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_patch.rb'
70
+ autoload :MetricName, '2020-08-01/generated/azure_mgmt_operational_insights/models/metric_name.rb'
71
+ autoload :Identity, '2020-08-01/generated/azure_mgmt_operational_insights/models/identity.rb'
72
+ autoload :WorkspaceListUsagesResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb'
73
+ autoload :TablesListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/tables_list_result.rb'
74
+ autoload :SearchGetSchemaResponse, '2020-08-01/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb'
75
+ autoload :ClusterListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb'
76
+ autoload :SearchSchemaValue, '2020-08-01/generated/azure_mgmt_operational_insights/models/search_schema_value.rb'
77
+ autoload :StorageAccount, '2020-08-01/generated/azure_mgmt_operational_insights/models/storage_account.rb'
78
+ autoload :ManagementGroup, '2020-08-01/generated/azure_mgmt_operational_insights/models/management_group.rb'
79
+ autoload :StorageInsightStatus, '2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb'
80
+ autoload :OperationListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/operation_list_result.rb'
81
+ autoload :WorkspacePurgeStatusResponse, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb'
82
+ autoload :UsageMetric, '2020-08-01/generated/azure_mgmt_operational_insights/models/usage_metric.rb'
83
+ autoload :StorageInsightListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb'
84
+ autoload :DataSourceListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb'
85
+ autoload :Tag, '2020-08-01/generated/azure_mgmt_operational_insights/models/tag.rb'
86
+ autoload :OperationDisplay, '2020-08-01/generated/azure_mgmt_operational_insights/models/operation_display.rb'
87
+ autoload :WorkspacePurgeResponse, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb'
88
+ autoload :Resource, '2020-08-01/generated/azure_mgmt_operational_insights/models/resource.rb'
89
+ autoload :SavedSearchesListResult, '2020-08-01/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb'
90
+ autoload :SharedKeys, '2020-08-01/generated/azure_mgmt_operational_insights/models/shared_keys.rb'
91
+ autoload :AvailableServiceTier, '2020-08-01/generated/azure_mgmt_operational_insights/models/available_service_tier.rb'
92
+ autoload :SearchMetadata, '2020-08-01/generated/azure_mgmt_operational_insights/models/search_metadata.rb'
93
+ autoload :CoreSummary, '2020-08-01/generated/azure_mgmt_operational_insights/models/core_summary.rb'
94
+ autoload :DataExport, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_export.rb'
95
+ autoload :TrackedResource, '2020-08-01/generated/azure_mgmt_operational_insights/models/tracked_resource.rb'
96
+ autoload :AzureEntityResource, '2020-08-01/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb'
97
+ autoload :ProxyResource, '2020-08-01/generated/azure_mgmt_operational_insights/models/proxy_resource.rb'
98
+ autoload :DataSource, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_source.rb'
99
+ autoload :LinkedService, '2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service.rb'
100
+ autoload :LinkedStorageAccountsResource, '2020-08-01/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb'
101
+ autoload :Workspace, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace.rb'
102
+ autoload :WorkspacePatch, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_patch.rb'
103
+ autoload :Cluster, '2020-08-01/generated/azure_mgmt_operational_insights/models/cluster.rb'
104
+ autoload :StorageInsight, '2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight.rb'
105
+ autoload :SavedSearch, '2020-08-01/generated/azure_mgmt_operational_insights/models/saved_search.rb'
106
+ autoload :Table, '2020-08-01/generated/azure_mgmt_operational_insights/models/table.rb'
107
+ autoload :Type, '2020-08-01/generated/azure_mgmt_operational_insights/models/type.rb'
108
+ autoload :DataSourceKind, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_kind.rb'
109
+ autoload :LinkedServiceEntityStatus, '2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb'
110
+ autoload :DataSourceType, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_type.rb'
111
+ autoload :WorkspaceSkuNameEnum, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb'
112
+ autoload :DataIngestionStatus, '2020-08-01/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb'
113
+ autoload :WorkspaceEntityStatus, '2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb'
114
+ autoload :PublicNetworkAccessType, '2020-08-01/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb'
115
+ autoload :ClusterEntityStatus, '2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb'
116
+ autoload :ClusterSkuNameEnum, '2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb'
117
+ autoload :IdentityType, '2020-08-01/generated/azure_mgmt_operational_insights/models/identity_type.rb'
118
+ autoload :StorageInsightState, '2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb'
119
+ autoload :SkuNameEnum, '2020-08-01/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb'
120
+ autoload :SearchSortEnum, '2020-08-01/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb'
121
+ autoload :PurgeState, '2020-08-01/generated/azure_mgmt_operational_insights/models/purge_state.rb'
122
+ end
123
+ end
@@ -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_08_01
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_08_01
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_08_01::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_08_01::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_08_01::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_08_01::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_08_01::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_08_01::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_08_01::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_08_01::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_08_01::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_08_01::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_08_01::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