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
@@ -0,0 +1,67 @@
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
+ module Models
8
+ #
9
+ # Describes the body of a purge request for an App Insights Workspace
10
+ #
11
+ class WorkspacePurgeBody
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Table from which to purge data.
16
+ attr_accessor :table
17
+
18
+ # @return [Array<WorkspacePurgeBodyFilters>] The set of columns and
19
+ # filters (queries) to run over them to purge the resulting data.
20
+ attr_accessor :filters
21
+
22
+
23
+ #
24
+ # Mapper for WorkspacePurgeBody class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'WorkspacePurgeBody',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'WorkspacePurgeBody',
35
+ model_properties: {
36
+ table: {
37
+ client_side_validation: true,
38
+ required: true,
39
+ serialized_name: 'table',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ filters: {
45
+ client_side_validation: true,
46
+ required: true,
47
+ serialized_name: 'filters',
48
+ type: {
49
+ name: 'Sequence',
50
+ element: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ serialized_name: 'WorkspacePurgeBodyFiltersElementType',
54
+ type: {
55
+ name: 'Composite',
56
+ class_name: 'WorkspacePurgeBodyFilters'
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,85 @@
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
+ module Models
8
+ #
9
+ # User-defined filters to return data which will be purged from the table.
10
+ #
11
+ class WorkspacePurgeBodyFilters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The column of the table over which the given query
16
+ # should run
17
+ attr_accessor :column
18
+
19
+ # @return [String] A query operator to evaluate over the provided column
20
+ # and value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=,
21
+ # between, and have the same behavior as they would in a KQL query.
22
+ attr_accessor :operator
23
+
24
+ # @return the value for the operator to function over. This can be a
25
+ # number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of
26
+ # values.
27
+ attr_accessor :value
28
+
29
+ # @return [String] When filtering over custom dimensions, this key will
30
+ # be used as the name of the custom dimension.
31
+ attr_accessor :key
32
+
33
+
34
+ #
35
+ # Mapper for WorkspacePurgeBodyFilters class as Ruby Hash.
36
+ # This will be used for serialization/deserialization.
37
+ #
38
+ def self.mapper()
39
+ {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'WorkspacePurgeBodyFilters',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'WorkspacePurgeBodyFilters',
46
+ model_properties: {
47
+ column: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'column',
51
+ type: {
52
+ name: 'String'
53
+ }
54
+ },
55
+ operator: {
56
+ client_side_validation: true,
57
+ required: false,
58
+ serialized_name: 'operator',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ value: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ serialized_name: 'value',
67
+ type: {
68
+ name: 'Object'
69
+ }
70
+ },
71
+ key: {
72
+ client_side_validation: true,
73
+ required: false,
74
+ serialized_name: 'key',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,47 @@
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
+ module Models
8
+ #
9
+ # Response containing operationId for a specific purge action.
10
+ #
11
+ class WorkspacePurgeResponse
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Id to use when querying for status for a particular
16
+ # purge operation.
17
+ attr_accessor :operation_id
18
+
19
+
20
+ #
21
+ # Mapper for WorkspacePurgeResponse class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'WorkspacePurgeResponse',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'WorkspacePurgeResponse',
32
+ model_properties: {
33
+ operation_id: {
34
+ client_side_validation: true,
35
+ required: true,
36
+ serialized_name: 'operationId',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,47 @@
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
+ module Models
8
+ #
9
+ # Response containing status for a specific purge operation.
10
+ #
11
+ class WorkspacePurgeStatusResponse
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [PurgeState] Status of the operation represented by the
16
+ # requested Id. Possible values include: 'pending', 'completed'
17
+ attr_accessor :status
18
+
19
+
20
+ #
21
+ # Mapper for WorkspacePurgeStatusResponse class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'WorkspacePurgeStatusResponse',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'WorkspacePurgeStatusResponse',
32
+ model_properties: {
33
+ status: {
34
+ client_side_validation: true,
35
+ required: true,
36
+ serialized_name: 'status',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,85 @@
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
+ module Models
8
+ #
9
+ # The SKU (tier) of a workspace.
10
+ #
11
+ class WorkspaceSku
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [WorkspaceSkuNameEnum] The name of the SKU. Possible values
16
+ # include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018',
17
+ # 'Standalone', 'CapacityReservation'
18
+ attr_accessor :name
19
+
20
+ # @return [Integer] The capacity reservation level for this workspace,
21
+ # when CapacityReservation sku is selected.
22
+ attr_accessor :capacity_reservation_level
23
+
24
+ # @return [Integer] The maximum capacity reservation level available for
25
+ # this workspace, when CapacityReservation sku is selected.
26
+ attr_accessor :max_capacity_reservation_level
27
+
28
+ # @return [String] The last time when the sku was updated.
29
+ attr_accessor :last_sku_update
30
+
31
+
32
+ #
33
+ # Mapper for WorkspaceSku class as Ruby Hash.
34
+ # This will be used for serialization/deserialization.
35
+ #
36
+ def self.mapper()
37
+ {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'WorkspaceSku',
41
+ type: {
42
+ name: 'Composite',
43
+ class_name: 'WorkspaceSku',
44
+ model_properties: {
45
+ name: {
46
+ client_side_validation: true,
47
+ required: true,
48
+ serialized_name: 'name',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ },
53
+ capacity_reservation_level: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'capacityReservationLevel',
57
+ type: {
58
+ name: 'Number'
59
+ }
60
+ },
61
+ max_capacity_reservation_level: {
62
+ client_side_validation: true,
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'maxCapacityReservationLevel',
66
+ type: {
67
+ name: 'Number'
68
+ }
69
+ },
70
+ last_sku_update: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ read_only: true,
74
+ serialized_name: 'lastSkuUpdate',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,21 @@
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
+ module Models
8
+ #
9
+ # Defines values for WorkspaceSkuNameEnum
10
+ #
11
+ module WorkspaceSkuNameEnum
12
+ Free = "Free"
13
+ Standard = "Standard"
14
+ Premium = "Premium"
15
+ PerNode = "PerNode"
16
+ PerGB2018 = "PerGB2018"
17
+ Standalone = "Standalone"
18
+ CapacityReservation = "CapacityReservation"
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,9 @@
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 end
7
+ module Azure::OperationalInsights end
8
+ module Azure::OperationalInsights::Mgmt end
9
+ module Azure::OperationalInsights::Mgmt::V2020_08_01 end
@@ -0,0 +1,121 @@
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 OperationStatuses
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the OperationStatuses 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
+ # Get the status of a long running azure asynchronous operation.
26
+ #
27
+ # @param location [String] The region name of operation.
28
+ # @param async_operation_id [String] The operation Id.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [OperationStatus] operation results.
33
+ #
34
+ def get(location, async_operation_id, custom_headers:nil)
35
+ response = get_async(location, async_operation_id, custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Get the status of a long running azure asynchronous operation.
41
+ #
42
+ # @param location [String] The region name of operation.
43
+ # @param async_operation_id [String] The operation Id.
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 get_with_http_info(location, async_operation_id, custom_headers:nil)
50
+ get_async(location, async_operation_id, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Get the status of a long running azure asynchronous operation.
55
+ #
56
+ # @param location [String] The region name of operation.
57
+ # @param async_operation_id [String] The operation Id.
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 get_async(location, async_operation_id, custom_headers:nil)
64
+ fail ArgumentError, 'location is nil' if location.nil?
65
+ fail ArgumentError, 'async_operation_id is nil' if async_operation_id.nil?
66
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
67
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
68
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
70
+
71
+
72
+ request_headers = {}
73
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
+
75
+ # Set Headers
76
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
77
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
78
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}'
79
+
80
+ request_url = @base_url || @client.base_url
81
+
82
+ options = {
83
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
84
+ path_params: {'location' => location,'asyncOperationId' => async_operation_id,'subscriptionId' => @client.subscription_id},
85
+ query_params: {'api-version' => @client.api_version},
86
+ headers: request_headers.merge(custom_headers || {}),
87
+ base_url: request_url
88
+ }
89
+ promise = @client.make_request_async(:get, path_template, options)
90
+
91
+ promise = promise.then do |result|
92
+ http_response = result.response
93
+ status_code = http_response.status
94
+ response_content = http_response.body
95
+ unless status_code == 200
96
+ error_model = JSON.load(response_content)
97
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
98
+ end
99
+
100
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
101
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
102
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
103
+ # Deserialize Response
104
+ if status_code == 200
105
+ begin
106
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
107
+ result_mapper = Azure::OperationalInsights::Mgmt::V2020_08_01::Models::OperationStatus.mapper()
108
+ result.body = @client.deserialize(result_mapper, parsed_response)
109
+ rescue Exception => e
110
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
111
+ end
112
+ end
113
+
114
+ result
115
+ end
116
+
117
+ promise.execute
118
+ end
119
+
120
+ end
121
+ end