azure_mgmt_resource_health 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health.rb +45 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/availability_statuses.rb +856 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/child_availability_statuses.rb +384 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/child_resources.rb +271 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/availability_state_values.rb +17 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/availability_status.rb +93 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/availability_status_list_result.rb +100 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/availability_status_properties.rb +212 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/availability_status_properties_recently_resolved_state.rb +73 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/error_response.rb +71 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/operation.rb +58 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/operation_display.rb +79 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/operation_list_result.rb +56 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/reason_chronicity_types.rb +16 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/recommended_action.rb +70 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/service_impacting_event.rb +95 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/service_impacting_event_incident_properties.rb +79 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/models/service_impacting_event_status.rb +46 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/module_definition.rb +9 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/operations.rb +109 -0
- data/lib/2015-01-01/generated/azure_mgmt_resource_health/resource_health_client.rb +145 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health.rb +45 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/availability_statuses.rb +863 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/child_availability_statuses.rb +384 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/child_resources.rb +271 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/availability_state_values.rb +17 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/availability_status.rb +93 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/availability_status_list_result.rb +100 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/availability_status_properties.rb +253 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/availability_status_properties_recently_resolved_state.rb +73 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/error_response.rb +71 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/operation.rb +58 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/operation_display.rb +79 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/operation_list_result.rb +56 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/reason_chronicity_types.rb +16 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/recommended_action.rb +70 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event.rb +95 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event_incident_properties.rb +79 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event_status.rb +46 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/module_definition.rb +9 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/operations.rb +109 -0
- data/lib/2017-07-01/generated/azure_mgmt_resource_health/resource_health_client.rb +145 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health.rb +74 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/availability_statuses.rb +842 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/events_operations.rb +463 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/impacted_resources.rb +240 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/metadata.rb +318 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/availability_state_values.rb +18 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/availability_status.rb +93 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/availability_status_list_result.rb +100 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/availability_status_properties.rb +251 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/availability_status_properties_recently_resolved.rb +73 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/azure_entity_resource.rb +75 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/error_response.rb +71 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/event.rb +336 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/event_level_values.rb +17 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/event_properties_article.rb +46 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/event_properties_recommended_actions.rb +79 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/event_properties_recommended_actions_actions_item.rb +59 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/event_source_values.rb +16 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/event_status_values.rb +16 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/event_type_values.rb +18 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/events.rb +99 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/faq.rb +68 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/impact.rb +67 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/impacted_resource_list_result.rb +100 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/impacted_resource_status.rb +123 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/impacted_service_region.rb +110 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/level_values.rb +16 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/link.rb +95 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/link_display_text.rb +57 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/link_type_values.rb +16 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/metadata_entity.rb +134 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/metadata_entity_list_result.rb +98 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/metadata_supported_value_detail.rb +57 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/operation.rb +58 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/operation_display.rb +79 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/operation_list_result.rb +56 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/proxy_resource.rb +63 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/reason_chronicity_types.rb +16 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/reason_type_values.rb +17 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/recommended_action.rb +70 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/resource.rb +83 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/scenario.rb +15 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/service_impacting_event.rb +95 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/service_impacting_event_incident_properties.rb +79 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/service_impacting_event_status.rb +46 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/tracked_resource.rb +92 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/models/update.rb +59 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/module_definition.rb +9 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/operations.rb +109 -0
- data/lib/2018-07-01-preview/generated/azure_mgmt_resource_health/resource_health_client.rb +152 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health.rb +69 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/availability_statuses.rb +842 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/events_operations.rb +463 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/availability_state_values.rb +18 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/availability_status.rb +93 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/availability_status_list_result.rb +100 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/availability_status_properties.rb +251 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/availability_status_properties_recently_resolved.rb +73 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/azure_entity_resource.rb +75 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/error_response.rb +71 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/event.rb +336 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/event_level_values.rb +17 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/event_properties_article.rb +46 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/event_properties_recommended_actions.rb +79 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/event_properties_recommended_actions_actions_item.rb +59 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/event_source_values.rb +16 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/event_status_values.rb +16 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/event_type_values.rb +18 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/events.rb +99 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/faq.rb +68 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/impact.rb +67 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/impacted_service_region.rb +110 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/level_values.rb +16 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/link.rb +95 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/link_display_text.rb +57 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/link_type_values.rb +16 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/metadata_entity.rb +134 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/metadata_entity_list_result.rb +66 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/metadata_supported_value_detail.rb +57 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/operation.rb +58 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/operation_display.rb +79 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/operation_list_result.rb +56 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/proxy_resource.rb +63 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/reason_chronicity_types.rb +16 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/recommended_action.rb +70 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/resource.rb +83 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/scenario.rb +15 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event.rb +95 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event_incident_properties.rb +79 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event_status.rb +46 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/tracked_resource.rb +92 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/models/update.rb +59 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/module_definition.rb +9 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/operations.rb +109 -0
- data/lib/2018-07-01/generated/azure_mgmt_resource_health/resource_health_client.rb +147 -0
- data/lib/azure_mgmt_resource_health.rb +9 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/modules/resourcehealth_profile_module.rb +123 -0
- data/lib/profiles/latest/resourcehealth_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/resourcehealth_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +261 -0
@@ -0,0 +1,69 @@
|
|
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 '2018-07-01/generated/azure_mgmt_resource_health/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ResourceHealth::Mgmt::V2018_07_01
|
23
|
+
autoload :EventsOperations, '2018-07-01/generated/azure_mgmt_resource_health/events_operations.rb'
|
24
|
+
autoload :AvailabilityStatuses, '2018-07-01/generated/azure_mgmt_resource_health/availability_statuses.rb'
|
25
|
+
autoload :Operations, '2018-07-01/generated/azure_mgmt_resource_health/operations.rb'
|
26
|
+
autoload :ResourceHealthClient, '2018-07-01/generated/azure_mgmt_resource_health/resource_health_client.rb'
|
27
|
+
|
28
|
+
module Models
|
29
|
+
autoload :ServiceImpactingEvent, '2018-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event.rb'
|
30
|
+
autoload :EventPropertiesArticle, '2018-07-01/generated/azure_mgmt_resource_health/models/event_properties_article.rb'
|
31
|
+
autoload :AvailabilityStatusProperties, '2018-07-01/generated/azure_mgmt_resource_health/models/availability_status_properties.rb'
|
32
|
+
autoload :Link, '2018-07-01/generated/azure_mgmt_resource_health/models/link.rb'
|
33
|
+
autoload :AvailabilityStatus, '2018-07-01/generated/azure_mgmt_resource_health/models/availability_status.rb'
|
34
|
+
autoload :ImpactedServiceRegion, '2018-07-01/generated/azure_mgmt_resource_health/models/impacted_service_region.rb'
|
35
|
+
autoload :AvailabilityStatusListResult, '2018-07-01/generated/azure_mgmt_resource_health/models/availability_status_list_result.rb'
|
36
|
+
autoload :EventPropertiesRecommendedActionsActionsItem, '2018-07-01/generated/azure_mgmt_resource_health/models/event_properties_recommended_actions_actions_item.rb'
|
37
|
+
autoload :OperationDisplay, '2018-07-01/generated/azure_mgmt_resource_health/models/operation_display.rb'
|
38
|
+
autoload :Faq, '2018-07-01/generated/azure_mgmt_resource_health/models/faq.rb'
|
39
|
+
autoload :Operation, '2018-07-01/generated/azure_mgmt_resource_health/models/operation.rb'
|
40
|
+
autoload :Events, '2018-07-01/generated/azure_mgmt_resource_health/models/events.rb'
|
41
|
+
autoload :OperationListResult, '2018-07-01/generated/azure_mgmt_resource_health/models/operation_list_result.rb'
|
42
|
+
autoload :RecommendedAction, '2018-07-01/generated/azure_mgmt_resource_health/models/recommended_action.rb'
|
43
|
+
autoload :ErrorResponse, '2018-07-01/generated/azure_mgmt_resource_health/models/error_response.rb'
|
44
|
+
autoload :ServiceImpactingEventIncidentProperties, '2018-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event_incident_properties.rb'
|
45
|
+
autoload :MetadataSupportedValueDetail, '2018-07-01/generated/azure_mgmt_resource_health/models/metadata_supported_value_detail.rb'
|
46
|
+
autoload :Update, '2018-07-01/generated/azure_mgmt_resource_health/models/update.rb'
|
47
|
+
autoload :LinkDisplayText, '2018-07-01/generated/azure_mgmt_resource_health/models/link_display_text.rb'
|
48
|
+
autoload :EventPropertiesRecommendedActions, '2018-07-01/generated/azure_mgmt_resource_health/models/event_properties_recommended_actions.rb'
|
49
|
+
autoload :Impact, '2018-07-01/generated/azure_mgmt_resource_health/models/impact.rb'
|
50
|
+
autoload :AvailabilityStatusPropertiesRecentlyResolved, '2018-07-01/generated/azure_mgmt_resource_health/models/availability_status_properties_recently_resolved.rb'
|
51
|
+
autoload :Resource, '2018-07-01/generated/azure_mgmt_resource_health/models/resource.rb'
|
52
|
+
autoload :ServiceImpactingEventStatus, '2018-07-01/generated/azure_mgmt_resource_health/models/service_impacting_event_status.rb'
|
53
|
+
autoload :MetadataEntityListResult, '2018-07-01/generated/azure_mgmt_resource_health/models/metadata_entity_list_result.rb'
|
54
|
+
autoload :Event, '2018-07-01/generated/azure_mgmt_resource_health/models/event.rb'
|
55
|
+
autoload :MetadataEntity, '2018-07-01/generated/azure_mgmt_resource_health/models/metadata_entity.rb'
|
56
|
+
autoload :ProxyResource, '2018-07-01/generated/azure_mgmt_resource_health/models/proxy_resource.rb'
|
57
|
+
autoload :TrackedResource, '2018-07-01/generated/azure_mgmt_resource_health/models/tracked_resource.rb'
|
58
|
+
autoload :AzureEntityResource, '2018-07-01/generated/azure_mgmt_resource_health/models/azure_entity_resource.rb'
|
59
|
+
autoload :EventTypeValues, '2018-07-01/generated/azure_mgmt_resource_health/models/event_type_values.rb'
|
60
|
+
autoload :EventSourceValues, '2018-07-01/generated/azure_mgmt_resource_health/models/event_source_values.rb'
|
61
|
+
autoload :EventStatusValues, '2018-07-01/generated/azure_mgmt_resource_health/models/event_status_values.rb'
|
62
|
+
autoload :LevelValues, '2018-07-01/generated/azure_mgmt_resource_health/models/level_values.rb'
|
63
|
+
autoload :EventLevelValues, '2018-07-01/generated/azure_mgmt_resource_health/models/event_level_values.rb'
|
64
|
+
autoload :LinkTypeValues, '2018-07-01/generated/azure_mgmt_resource_health/models/link_type_values.rb'
|
65
|
+
autoload :AvailabilityStateValues, '2018-07-01/generated/azure_mgmt_resource_health/models/availability_state_values.rb'
|
66
|
+
autoload :ReasonChronicityTypes, '2018-07-01/generated/azure_mgmt_resource_health/models/reason_chronicity_types.rb'
|
67
|
+
autoload :Scenario, '2018-07-01/generated/azure_mgmt_resource_health/models/scenario.rb'
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,842 @@
|
|
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::ResourceHealth::Mgmt::V2018_07_01
|
7
|
+
#
|
8
|
+
# The Resource Health Client.
|
9
|
+
#
|
10
|
+
class AvailabilityStatuses
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the AvailabilityStatuses class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ResourceHealthClient] reference to the ResourceHealthClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists the current availability status for all the resources in the
|
26
|
+
# subscription.
|
27
|
+
#
|
28
|
+
# @param filter [String] The filter to apply on the operation. For more
|
29
|
+
# information please see
|
30
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
31
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
32
|
+
# expands the recommendedactions in the response.
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [Array<AvailabilityStatus>] operation results.
|
37
|
+
#
|
38
|
+
def list_by_subscription_id(filter:nil, expand:nil, custom_headers:nil)
|
39
|
+
first_page = list_by_subscription_id_as_lazy(filter:filter, expand:expand, custom_headers:custom_headers)
|
40
|
+
first_page.get_all_items
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Lists the current availability status for all the resources in the
|
45
|
+
# subscription.
|
46
|
+
#
|
47
|
+
# @param filter [String] The filter to apply on the operation. For more
|
48
|
+
# information please see
|
49
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
50
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
51
|
+
# expands the recommendedactions in the response.
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
53
|
+
# will be added to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
56
|
+
#
|
57
|
+
def list_by_subscription_id_with_http_info(filter:nil, expand:nil, custom_headers:nil)
|
58
|
+
list_by_subscription_id_async(filter:filter, expand:expand, custom_headers:custom_headers).value!
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Lists the current availability status for all the resources in the
|
63
|
+
# subscription.
|
64
|
+
#
|
65
|
+
# @param filter [String] The filter to apply on the operation. For more
|
66
|
+
# information please see
|
67
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
68
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
69
|
+
# expands the recommendedactions in the response.
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def list_by_subscription_id_async(filter:nil, expand:nil, custom_headers:nil)
|
76
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
77
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
78
|
+
|
79
|
+
|
80
|
+
request_headers = {}
|
81
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
82
|
+
|
83
|
+
# Set Headers
|
84
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
85
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
86
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/availabilityStatuses'
|
87
|
+
|
88
|
+
request_url = @base_url || @client.base_url
|
89
|
+
|
90
|
+
options = {
|
91
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
92
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
93
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => expand},
|
94
|
+
headers: request_headers.merge(custom_headers || {}),
|
95
|
+
base_url: request_url
|
96
|
+
}
|
97
|
+
promise = @client.make_request_async(:get, path_template, options)
|
98
|
+
|
99
|
+
promise = promise.then do |result|
|
100
|
+
http_response = result.response
|
101
|
+
status_code = http_response.status
|
102
|
+
response_content = http_response.body
|
103
|
+
unless status_code == 200
|
104
|
+
error_model = JSON.load(response_content)
|
105
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
106
|
+
end
|
107
|
+
|
108
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
109
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
110
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
111
|
+
# Deserialize Response
|
112
|
+
if status_code == 200
|
113
|
+
begin
|
114
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
115
|
+
result_mapper = Azure::ResourceHealth::Mgmt::V2018_07_01::Models::AvailabilityStatusListResult.mapper()
|
116
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
117
|
+
rescue Exception => e
|
118
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
result
|
123
|
+
end
|
124
|
+
|
125
|
+
promise.execute
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# Lists the current availability status for all the resources in the resource
|
130
|
+
# group.
|
131
|
+
#
|
132
|
+
# @param resource_group_name [String] The name of the resource group.
|
133
|
+
# @param filter [String] The filter to apply on the operation. For more
|
134
|
+
# information please see
|
135
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
136
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
137
|
+
# expands the recommendedactions in the response.
|
138
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
139
|
+
# will be added to the HTTP request.
|
140
|
+
#
|
141
|
+
# @return [Array<AvailabilityStatus>] operation results.
|
142
|
+
#
|
143
|
+
def list_by_resource_group(resource_group_name, filter:nil, expand:nil, custom_headers:nil)
|
144
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, filter:filter, expand:expand, custom_headers:custom_headers)
|
145
|
+
first_page.get_all_items
|
146
|
+
end
|
147
|
+
|
148
|
+
#
|
149
|
+
# Lists the current availability status for all the resources in the resource
|
150
|
+
# group.
|
151
|
+
#
|
152
|
+
# @param resource_group_name [String] The name of the resource group.
|
153
|
+
# @param filter [String] The filter to apply on the operation. For more
|
154
|
+
# information please see
|
155
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
156
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
157
|
+
# expands the recommendedactions in the response.
|
158
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
159
|
+
# will be added to the HTTP request.
|
160
|
+
#
|
161
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
162
|
+
#
|
163
|
+
def list_by_resource_group_with_http_info(resource_group_name, filter:nil, expand:nil, custom_headers:nil)
|
164
|
+
list_by_resource_group_async(resource_group_name, filter:filter, expand:expand, custom_headers:custom_headers).value!
|
165
|
+
end
|
166
|
+
|
167
|
+
#
|
168
|
+
# Lists the current availability status for all the resources in the resource
|
169
|
+
# group.
|
170
|
+
#
|
171
|
+
# @param resource_group_name [String] The name of the resource group.
|
172
|
+
# @param filter [String] The filter to apply on the operation. For more
|
173
|
+
# information please see
|
174
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
175
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
176
|
+
# expands the recommendedactions in the response.
|
177
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
178
|
+
# to the HTTP request.
|
179
|
+
#
|
180
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
181
|
+
#
|
182
|
+
def list_by_resource_group_async(resource_group_name, filter:nil, expand:nil, custom_headers:nil)
|
183
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
184
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
185
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
186
|
+
|
187
|
+
|
188
|
+
request_headers = {}
|
189
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
190
|
+
|
191
|
+
# Set Headers
|
192
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
193
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
194
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth/availabilityStatuses'
|
195
|
+
|
196
|
+
request_url = @base_url || @client.base_url
|
197
|
+
|
198
|
+
options = {
|
199
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
200
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
201
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => expand},
|
202
|
+
headers: request_headers.merge(custom_headers || {}),
|
203
|
+
base_url: request_url
|
204
|
+
}
|
205
|
+
promise = @client.make_request_async(:get, path_template, options)
|
206
|
+
|
207
|
+
promise = promise.then do |result|
|
208
|
+
http_response = result.response
|
209
|
+
status_code = http_response.status
|
210
|
+
response_content = http_response.body
|
211
|
+
unless status_code == 200
|
212
|
+
error_model = JSON.load(response_content)
|
213
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
214
|
+
end
|
215
|
+
|
216
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
217
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
218
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
219
|
+
# Deserialize Response
|
220
|
+
if status_code == 200
|
221
|
+
begin
|
222
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
223
|
+
result_mapper = Azure::ResourceHealth::Mgmt::V2018_07_01::Models::AvailabilityStatusListResult.mapper()
|
224
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
225
|
+
rescue Exception => e
|
226
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
result
|
231
|
+
end
|
232
|
+
|
233
|
+
promise.execute
|
234
|
+
end
|
235
|
+
|
236
|
+
#
|
237
|
+
# Gets current availability status for a single resource
|
238
|
+
#
|
239
|
+
# @param resource_uri [String] The fully qualified ID of the resource,
|
240
|
+
# including the resource name and resource type. Currently the API support not
|
241
|
+
# nested and one nesting level resource types :
|
242
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
243
|
+
# and
|
244
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
245
|
+
# @param filter [String] The filter to apply on the operation. For more
|
246
|
+
# information please see
|
247
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
248
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
249
|
+
# expands the recommendedactions in the response.
|
250
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
251
|
+
# will be added to the HTTP request.
|
252
|
+
#
|
253
|
+
# @return [AvailabilityStatus] operation results.
|
254
|
+
#
|
255
|
+
def get_by_resource(resource_uri, filter:nil, expand:nil, custom_headers:nil)
|
256
|
+
response = get_by_resource_async(resource_uri, filter:filter, expand:expand, custom_headers:custom_headers).value!
|
257
|
+
response.body unless response.nil?
|
258
|
+
end
|
259
|
+
|
260
|
+
#
|
261
|
+
# Gets current availability status for a single resource
|
262
|
+
#
|
263
|
+
# @param resource_uri [String] The fully qualified ID of the resource,
|
264
|
+
# including the resource name and resource type. Currently the API support not
|
265
|
+
# nested and one nesting level resource types :
|
266
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
267
|
+
# and
|
268
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
269
|
+
# @param filter [String] The filter to apply on the operation. For more
|
270
|
+
# information please see
|
271
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
272
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
273
|
+
# expands the recommendedactions in the response.
|
274
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
275
|
+
# will be added to the HTTP request.
|
276
|
+
#
|
277
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
278
|
+
#
|
279
|
+
def get_by_resource_with_http_info(resource_uri, filter:nil, expand:nil, custom_headers:nil)
|
280
|
+
get_by_resource_async(resource_uri, filter:filter, expand:expand, custom_headers:custom_headers).value!
|
281
|
+
end
|
282
|
+
|
283
|
+
#
|
284
|
+
# Gets current availability status for a single resource
|
285
|
+
#
|
286
|
+
# @param resource_uri [String] The fully qualified ID of the resource,
|
287
|
+
# including the resource name and resource type. Currently the API support not
|
288
|
+
# nested and one nesting level resource types :
|
289
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
290
|
+
# and
|
291
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
292
|
+
# @param filter [String] The filter to apply on the operation. For more
|
293
|
+
# information please see
|
294
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
295
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
296
|
+
# expands the recommendedactions in the response.
|
297
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
298
|
+
# to the HTTP request.
|
299
|
+
#
|
300
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
301
|
+
#
|
302
|
+
def get_by_resource_async(resource_uri, filter:nil, expand:nil, custom_headers:nil)
|
303
|
+
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
304
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
305
|
+
|
306
|
+
|
307
|
+
request_headers = {}
|
308
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
309
|
+
|
310
|
+
# Set Headers
|
311
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
312
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
313
|
+
path_template = '{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current'
|
314
|
+
|
315
|
+
request_url = @base_url || @client.base_url
|
316
|
+
|
317
|
+
options = {
|
318
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
319
|
+
skip_encoding_path_params: {'resourceUri' => resource_uri},
|
320
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => expand},
|
321
|
+
headers: request_headers.merge(custom_headers || {}),
|
322
|
+
base_url: request_url
|
323
|
+
}
|
324
|
+
promise = @client.make_request_async(:get, path_template, options)
|
325
|
+
|
326
|
+
promise = promise.then do |result|
|
327
|
+
http_response = result.response
|
328
|
+
status_code = http_response.status
|
329
|
+
response_content = http_response.body
|
330
|
+
unless status_code == 200
|
331
|
+
error_model = JSON.load(response_content)
|
332
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
333
|
+
end
|
334
|
+
|
335
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
336
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
337
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
338
|
+
# Deserialize Response
|
339
|
+
if status_code == 200
|
340
|
+
begin
|
341
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
342
|
+
result_mapper = Azure::ResourceHealth::Mgmt::V2018_07_01::Models::AvailabilityStatus.mapper()
|
343
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
344
|
+
rescue Exception => e
|
345
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
result
|
350
|
+
end
|
351
|
+
|
352
|
+
promise.execute
|
353
|
+
end
|
354
|
+
|
355
|
+
#
|
356
|
+
# Lists all historical availability transitions and impacting events for a
|
357
|
+
# single resource.
|
358
|
+
#
|
359
|
+
# @param resource_uri [String] The fully qualified ID of the resource,
|
360
|
+
# including the resource name and resource type. Currently the API support not
|
361
|
+
# nested and one nesting level resource types :
|
362
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
363
|
+
# and
|
364
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
365
|
+
# @param filter [String] The filter to apply on the operation. For more
|
366
|
+
# information please see
|
367
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
368
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
369
|
+
# expands the recommendedactions in the response.
|
370
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
371
|
+
# will be added to the HTTP request.
|
372
|
+
#
|
373
|
+
# @return [Array<AvailabilityStatus>] operation results.
|
374
|
+
#
|
375
|
+
def list(resource_uri, filter:nil, expand:nil, custom_headers:nil)
|
376
|
+
first_page = list_as_lazy(resource_uri, filter:filter, expand:expand, custom_headers:custom_headers)
|
377
|
+
first_page.get_all_items
|
378
|
+
end
|
379
|
+
|
380
|
+
#
|
381
|
+
# Lists all historical availability transitions and impacting events for a
|
382
|
+
# single resource.
|
383
|
+
#
|
384
|
+
# @param resource_uri [String] The fully qualified ID of the resource,
|
385
|
+
# including the resource name and resource type. Currently the API support not
|
386
|
+
# nested and one nesting level resource types :
|
387
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
388
|
+
# and
|
389
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
390
|
+
# @param filter [String] The filter to apply on the operation. For more
|
391
|
+
# information please see
|
392
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
393
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
394
|
+
# expands the recommendedactions in the response.
|
395
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
396
|
+
# will be added to the HTTP request.
|
397
|
+
#
|
398
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
399
|
+
#
|
400
|
+
def list_with_http_info(resource_uri, filter:nil, expand:nil, custom_headers:nil)
|
401
|
+
list_async(resource_uri, filter:filter, expand:expand, custom_headers:custom_headers).value!
|
402
|
+
end
|
403
|
+
|
404
|
+
#
|
405
|
+
# Lists all historical availability transitions and impacting events for a
|
406
|
+
# single resource.
|
407
|
+
#
|
408
|
+
# @param resource_uri [String] The fully qualified ID of the resource,
|
409
|
+
# including the resource name and resource type. Currently the API support not
|
410
|
+
# nested and one nesting level resource types :
|
411
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
412
|
+
# and
|
413
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
414
|
+
# @param filter [String] The filter to apply on the operation. For more
|
415
|
+
# information please see
|
416
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
417
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
418
|
+
# expands the recommendedactions in the response.
|
419
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
420
|
+
# to the HTTP request.
|
421
|
+
#
|
422
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
423
|
+
#
|
424
|
+
def list_async(resource_uri, filter:nil, expand:nil, custom_headers:nil)
|
425
|
+
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
426
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
427
|
+
|
428
|
+
|
429
|
+
request_headers = {}
|
430
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
431
|
+
|
432
|
+
# Set Headers
|
433
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
434
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
435
|
+
path_template = '{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses'
|
436
|
+
|
437
|
+
request_url = @base_url || @client.base_url
|
438
|
+
|
439
|
+
options = {
|
440
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
441
|
+
skip_encoding_path_params: {'resourceUri' => resource_uri},
|
442
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter,'$expand' => expand},
|
443
|
+
headers: request_headers.merge(custom_headers || {}),
|
444
|
+
base_url: request_url
|
445
|
+
}
|
446
|
+
promise = @client.make_request_async(:get, path_template, options)
|
447
|
+
|
448
|
+
promise = promise.then do |result|
|
449
|
+
http_response = result.response
|
450
|
+
status_code = http_response.status
|
451
|
+
response_content = http_response.body
|
452
|
+
unless status_code == 200
|
453
|
+
error_model = JSON.load(response_content)
|
454
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
455
|
+
end
|
456
|
+
|
457
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
458
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
459
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
460
|
+
# Deserialize Response
|
461
|
+
if status_code == 200
|
462
|
+
begin
|
463
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
464
|
+
result_mapper = Azure::ResourceHealth::Mgmt::V2018_07_01::Models::AvailabilityStatusListResult.mapper()
|
465
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
466
|
+
rescue Exception => e
|
467
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
468
|
+
end
|
469
|
+
end
|
470
|
+
|
471
|
+
result
|
472
|
+
end
|
473
|
+
|
474
|
+
promise.execute
|
475
|
+
end
|
476
|
+
|
477
|
+
#
|
478
|
+
# Lists the current availability status for all the resources in the
|
479
|
+
# subscription.
|
480
|
+
#
|
481
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
482
|
+
# to List operation.
|
483
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
484
|
+
# will be added to the HTTP request.
|
485
|
+
#
|
486
|
+
# @return [AvailabilityStatusListResult] operation results.
|
487
|
+
#
|
488
|
+
def list_by_subscription_id_next(next_page_link, custom_headers:nil)
|
489
|
+
response = list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers).value!
|
490
|
+
response.body unless response.nil?
|
491
|
+
end
|
492
|
+
|
493
|
+
#
|
494
|
+
# Lists the current availability status for all the resources in the
|
495
|
+
# subscription.
|
496
|
+
#
|
497
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
498
|
+
# to List operation.
|
499
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
500
|
+
# will be added to the HTTP request.
|
501
|
+
#
|
502
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
503
|
+
#
|
504
|
+
def list_by_subscription_id_next_with_http_info(next_page_link, custom_headers:nil)
|
505
|
+
list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers).value!
|
506
|
+
end
|
507
|
+
|
508
|
+
#
|
509
|
+
# Lists the current availability status for all the resources in the
|
510
|
+
# subscription.
|
511
|
+
#
|
512
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
513
|
+
# to List operation.
|
514
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
515
|
+
# to the HTTP request.
|
516
|
+
#
|
517
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
518
|
+
#
|
519
|
+
def list_by_subscription_id_next_async(next_page_link, custom_headers:nil)
|
520
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
521
|
+
|
522
|
+
|
523
|
+
request_headers = {}
|
524
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
525
|
+
|
526
|
+
# Set Headers
|
527
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
528
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
529
|
+
path_template = '{nextLink}'
|
530
|
+
|
531
|
+
request_url = @base_url || @client.base_url
|
532
|
+
|
533
|
+
options = {
|
534
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
535
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
536
|
+
headers: request_headers.merge(custom_headers || {}),
|
537
|
+
base_url: request_url
|
538
|
+
}
|
539
|
+
promise = @client.make_request_async(:get, path_template, options)
|
540
|
+
|
541
|
+
promise = promise.then do |result|
|
542
|
+
http_response = result.response
|
543
|
+
status_code = http_response.status
|
544
|
+
response_content = http_response.body
|
545
|
+
unless status_code == 200
|
546
|
+
error_model = JSON.load(response_content)
|
547
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
548
|
+
end
|
549
|
+
|
550
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
551
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
552
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
553
|
+
# Deserialize Response
|
554
|
+
if status_code == 200
|
555
|
+
begin
|
556
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
557
|
+
result_mapper = Azure::ResourceHealth::Mgmt::V2018_07_01::Models::AvailabilityStatusListResult.mapper()
|
558
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
559
|
+
rescue Exception => e
|
560
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
result
|
565
|
+
end
|
566
|
+
|
567
|
+
promise.execute
|
568
|
+
end
|
569
|
+
|
570
|
+
#
|
571
|
+
# Lists the current availability status for all the resources in the resource
|
572
|
+
# group.
|
573
|
+
#
|
574
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
575
|
+
# to List operation.
|
576
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
577
|
+
# will be added to the HTTP request.
|
578
|
+
#
|
579
|
+
# @return [AvailabilityStatusListResult] operation results.
|
580
|
+
#
|
581
|
+
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
582
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
583
|
+
response.body unless response.nil?
|
584
|
+
end
|
585
|
+
|
586
|
+
#
|
587
|
+
# Lists the current availability status for all the resources in the resource
|
588
|
+
# group.
|
589
|
+
#
|
590
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
591
|
+
# to List operation.
|
592
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
593
|
+
# will be added to the HTTP request.
|
594
|
+
#
|
595
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
596
|
+
#
|
597
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
598
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
599
|
+
end
|
600
|
+
|
601
|
+
#
|
602
|
+
# Lists the current availability status for all the resources in the resource
|
603
|
+
# group.
|
604
|
+
#
|
605
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
606
|
+
# to List operation.
|
607
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
608
|
+
# to the HTTP request.
|
609
|
+
#
|
610
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
611
|
+
#
|
612
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
613
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
614
|
+
|
615
|
+
|
616
|
+
request_headers = {}
|
617
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
618
|
+
|
619
|
+
# Set Headers
|
620
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
621
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
622
|
+
path_template = '{nextLink}'
|
623
|
+
|
624
|
+
request_url = @base_url || @client.base_url
|
625
|
+
|
626
|
+
options = {
|
627
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
628
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
629
|
+
headers: request_headers.merge(custom_headers || {}),
|
630
|
+
base_url: request_url
|
631
|
+
}
|
632
|
+
promise = @client.make_request_async(:get, path_template, options)
|
633
|
+
|
634
|
+
promise = promise.then do |result|
|
635
|
+
http_response = result.response
|
636
|
+
status_code = http_response.status
|
637
|
+
response_content = http_response.body
|
638
|
+
unless status_code == 200
|
639
|
+
error_model = JSON.load(response_content)
|
640
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
641
|
+
end
|
642
|
+
|
643
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
644
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
645
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
646
|
+
# Deserialize Response
|
647
|
+
if status_code == 200
|
648
|
+
begin
|
649
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
650
|
+
result_mapper = Azure::ResourceHealth::Mgmt::V2018_07_01::Models::AvailabilityStatusListResult.mapper()
|
651
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
652
|
+
rescue Exception => e
|
653
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
result
|
658
|
+
end
|
659
|
+
|
660
|
+
promise.execute
|
661
|
+
end
|
662
|
+
|
663
|
+
#
|
664
|
+
# Lists all historical availability transitions and impacting events for a
|
665
|
+
# single resource.
|
666
|
+
#
|
667
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
668
|
+
# to List operation.
|
669
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
670
|
+
# will be added to the HTTP request.
|
671
|
+
#
|
672
|
+
# @return [AvailabilityStatusListResult] operation results.
|
673
|
+
#
|
674
|
+
def list_next(next_page_link, custom_headers:nil)
|
675
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
676
|
+
response.body unless response.nil?
|
677
|
+
end
|
678
|
+
|
679
|
+
#
|
680
|
+
# Lists all historical availability transitions and impacting events for a
|
681
|
+
# single resource.
|
682
|
+
#
|
683
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
684
|
+
# to List operation.
|
685
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
686
|
+
# will be added to the HTTP request.
|
687
|
+
#
|
688
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
689
|
+
#
|
690
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
691
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
692
|
+
end
|
693
|
+
|
694
|
+
#
|
695
|
+
# Lists all historical availability transitions and impacting events for a
|
696
|
+
# single resource.
|
697
|
+
#
|
698
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
699
|
+
# to List operation.
|
700
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
701
|
+
# to the HTTP request.
|
702
|
+
#
|
703
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
704
|
+
#
|
705
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
706
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
707
|
+
|
708
|
+
|
709
|
+
request_headers = {}
|
710
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
711
|
+
|
712
|
+
# Set Headers
|
713
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
714
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
715
|
+
path_template = '{nextLink}'
|
716
|
+
|
717
|
+
request_url = @base_url || @client.base_url
|
718
|
+
|
719
|
+
options = {
|
720
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
721
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
722
|
+
headers: request_headers.merge(custom_headers || {}),
|
723
|
+
base_url: request_url
|
724
|
+
}
|
725
|
+
promise = @client.make_request_async(:get, path_template, options)
|
726
|
+
|
727
|
+
promise = promise.then do |result|
|
728
|
+
http_response = result.response
|
729
|
+
status_code = http_response.status
|
730
|
+
response_content = http_response.body
|
731
|
+
unless status_code == 200
|
732
|
+
error_model = JSON.load(response_content)
|
733
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
734
|
+
end
|
735
|
+
|
736
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
737
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
738
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
739
|
+
# Deserialize Response
|
740
|
+
if status_code == 200
|
741
|
+
begin
|
742
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
743
|
+
result_mapper = Azure::ResourceHealth::Mgmt::V2018_07_01::Models::AvailabilityStatusListResult.mapper()
|
744
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
745
|
+
rescue Exception => e
|
746
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
747
|
+
end
|
748
|
+
end
|
749
|
+
|
750
|
+
result
|
751
|
+
end
|
752
|
+
|
753
|
+
promise.execute
|
754
|
+
end
|
755
|
+
|
756
|
+
#
|
757
|
+
# Lists the current availability status for all the resources in the
|
758
|
+
# subscription.
|
759
|
+
#
|
760
|
+
# @param filter [String] The filter to apply on the operation. For more
|
761
|
+
# information please see
|
762
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
763
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
764
|
+
# expands the recommendedactions in the response.
|
765
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
766
|
+
# will be added to the HTTP request.
|
767
|
+
#
|
768
|
+
# @return [AvailabilityStatusListResult] which provide lazy access to pages of
|
769
|
+
# the response.
|
770
|
+
#
|
771
|
+
def list_by_subscription_id_as_lazy(filter:nil, expand:nil, custom_headers:nil)
|
772
|
+
response = list_by_subscription_id_async(filter:filter, expand:expand, custom_headers:custom_headers).value!
|
773
|
+
unless response.nil?
|
774
|
+
page = response.body
|
775
|
+
page.next_method = Proc.new do |next_page_link|
|
776
|
+
list_by_subscription_id_next_async(next_page_link, custom_headers:custom_headers)
|
777
|
+
end
|
778
|
+
page
|
779
|
+
end
|
780
|
+
end
|
781
|
+
|
782
|
+
#
|
783
|
+
# Lists the current availability status for all the resources in the resource
|
784
|
+
# group.
|
785
|
+
#
|
786
|
+
# @param resource_group_name [String] The name of the resource group.
|
787
|
+
# @param filter [String] The filter to apply on the operation. For more
|
788
|
+
# information please see
|
789
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
790
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
791
|
+
# expands the recommendedactions in the response.
|
792
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
793
|
+
# will be added to the HTTP request.
|
794
|
+
#
|
795
|
+
# @return [AvailabilityStatusListResult] which provide lazy access to pages of
|
796
|
+
# the response.
|
797
|
+
#
|
798
|
+
def list_by_resource_group_as_lazy(resource_group_name, filter:nil, expand:nil, custom_headers:nil)
|
799
|
+
response = list_by_resource_group_async(resource_group_name, filter:filter, expand:expand, custom_headers:custom_headers).value!
|
800
|
+
unless response.nil?
|
801
|
+
page = response.body
|
802
|
+
page.next_method = Proc.new do |next_page_link|
|
803
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
804
|
+
end
|
805
|
+
page
|
806
|
+
end
|
807
|
+
end
|
808
|
+
|
809
|
+
#
|
810
|
+
# Lists all historical availability transitions and impacting events for a
|
811
|
+
# single resource.
|
812
|
+
#
|
813
|
+
# @param resource_uri [String] The fully qualified ID of the resource,
|
814
|
+
# including the resource name and resource type. Currently the API support not
|
815
|
+
# nested and one nesting level resource types :
|
816
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
|
817
|
+
# and
|
818
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
|
819
|
+
# @param filter [String] The filter to apply on the operation. For more
|
820
|
+
# information please see
|
821
|
+
# https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
|
822
|
+
# @param expand [String] Setting $expand=recommendedactions in url query
|
823
|
+
# expands the recommendedactions in the response.
|
824
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
825
|
+
# will be added to the HTTP request.
|
826
|
+
#
|
827
|
+
# @return [AvailabilityStatusListResult] which provide lazy access to pages of
|
828
|
+
# the response.
|
829
|
+
#
|
830
|
+
def list_as_lazy(resource_uri, filter:nil, expand:nil, custom_headers:nil)
|
831
|
+
response = list_async(resource_uri, filter:filter, expand:expand, custom_headers:custom_headers).value!
|
832
|
+
unless response.nil?
|
833
|
+
page = response.body
|
834
|
+
page.next_method = Proc.new do |next_page_link|
|
835
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
836
|
+
end
|
837
|
+
page
|
838
|
+
end
|
839
|
+
end
|
840
|
+
|
841
|
+
end
|
842
|
+
end
|