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