azure_mgmt_adhybridhealth_service 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/2014-01-01/generated/azure_mgmt_adhybridhealth_service.rb +143 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/ad_domain_service_members.rb +259 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/adds_service.rb +131 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/adds_service_members_operations.rb +535 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/adds_services.rb +2287 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/adds_services_replication_status.rb +117 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/adds_services_service_members.rb +356 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/adds_services_user_preference.rb +293 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/adhybrid_health_service.rb +185 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/alerts_operations.rb +240 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/configuration.rb +500 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/dimensions_operations.rb +229 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/additional_information.rb +80 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/adds_configuration.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/adds_service_member.rb +499 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/adds_service_members.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/agent.rb +113 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/alert.rb +290 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/alert_feedback.rb +127 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/alert_feedbacks.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/alerts.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/algorithm_step_type.rb +27 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/associated_object.rb +167 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/attribute_delta.rb +103 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/attribute_delta_operation_type.rb +19 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/attribute_mapping.rb +81 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/attribute_mapping_type.rb +18 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/attribute_mpping_source.rb +87 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/change_not_reimported.rb +61 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/change_not_reimported_delta.rb +100 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/change_not_reimported_entry.rb +139 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/connector.rb +236 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/connector_connection_error.rb +123 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/connector_connection_errors.rb +56 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/connector_metadata.rb +74 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/connector_metadata_details.rb +57 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/connector_object_error.rb +197 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/connector_object_errors.rb +56 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/connectors.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/credential.rb +76 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/credentials.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/data_freshness_details.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/delta_operation_type.rb +22 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/dimension.rb +142 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/dimensions.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/display.rb +69 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/error_count.rb +68 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/error_counts.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/error_detail.rb +93 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/error_report_users_entries.rb +56 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/error_report_users_entry.rb +91 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/export_error.rb +444 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/export_errors.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/export_status.rb +80 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/export_statuses.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/extension_error_info.rb +68 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/forest_summary.rb +129 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/global_configuration.rb +99 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/global_configurations.rb +56 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/health_status.rb +19 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/help_link.rb +57 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/hotfix.rb +69 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/hotfixes.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/import_error.rb +186 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/import_errors.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/inbound_replication_neighbor.rb +179 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/inbound_replication_neighbors.rb +57 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/item.rb +57 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/items.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/level.rb +17 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/merged_export_error.rb +280 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/merged_export_errors.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/metric_group.rb +69 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/metric_metadata.rb +169 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/metric_metadata_list.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/metric_set.rb +66 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/metric_sets.rb +75 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/metrics.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/module_configuration.rb +78 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/module_configurations.rb +56 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/monitoring_level.rb +17 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/object_with_sync_error.rb +211 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/operation.rb +57 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/operation_list_response.rb +125 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/partition.rb +136 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/partition_scope.rb +103 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/password_hash_sync_configuration.rb +58 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/password_management_settings.rb +148 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/password_operation_types.rb +17 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/replication_details_list.rb +89 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/replication_status.rb +70 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/replication_summary.rb +124 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/replication_summary_list.rb +56 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/result.rb +46 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/risky_ipblob_uri.rb +102 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/risky_ipblob_uris.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/rule_error_info.rb +91 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/run_profile.rb +77 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/run_profiles.rb +55 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/run_step.rb +113 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/service_configuration.rb +134 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/service_member.rb +336 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/service_members.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/service_properties.rb +331 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/services.rb +120 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/state.rb +19 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/tabular_export_error.rb +79 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/tenant.rb +292 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/tenant_onboarding_details.rb +60 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/user_preference.rb +54 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/value_delta.rb +58 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/value_delta_operation_type.rb +18 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/models/value_type.rb +20 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/module_definition.rb +9 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/operations.rb +219 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/reports.rb +109 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service.rb +131 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/service_members_operations.rb +1736 -0
- data/lib/2014-01-01/generated/azure_mgmt_adhybridhealth_service/services_operations.rb +3162 -0
- data/lib/azure_mgmt_adhybridhealth_service.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/adhybridhealthservice_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/adhybridhealthservice_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/adhybridhealthservice_profile_module.rb +493 -0
- data/lib/version.rb +7 -0
- metadata +243 -0
@@ -0,0 +1,240 @@
|
|
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::ADHybridHealthService::Mgmt::V2014_01_01
|
7
|
+
#
|
8
|
+
# REST APIs for Azure Active Directory Connect Health
|
9
|
+
#
|
10
|
+
class AlertsOperations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the AlertsOperations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ADHybridHealthService] reference to the ADHybridHealthService
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets the alerts for a given Active Directory Domain Service.
|
26
|
+
#
|
27
|
+
# @param service_name [String] The name of the service.
|
28
|
+
# @param filter [String] The alert property filter to apply.
|
29
|
+
# @param state [String] The alert state to query for.
|
30
|
+
# @param from [DateTime] The start date to query for.
|
31
|
+
# @param to [DateTime] The end date till when to query for.
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [Array<Alert>] operation results.
|
36
|
+
#
|
37
|
+
def list_adds_alerts(service_name, filter:nil, state:nil, from:nil, to:nil, custom_headers:nil)
|
38
|
+
first_page = list_adds_alerts_as_lazy(service_name, filter:filter, state:state, from:from, to:to, custom_headers:custom_headers)
|
39
|
+
first_page.get_all_items
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Gets the alerts for a given Active Directory Domain Service.
|
44
|
+
#
|
45
|
+
# @param service_name [String] The name of the service.
|
46
|
+
# @param filter [String] The alert property filter to apply.
|
47
|
+
# @param state [String] The alert state to query for.
|
48
|
+
# @param from [DateTime] The start date to query for.
|
49
|
+
# @param to [DateTime] The end date till when to query for.
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
54
|
+
#
|
55
|
+
def list_adds_alerts_with_http_info(service_name, filter:nil, state:nil, from:nil, to:nil, custom_headers:nil)
|
56
|
+
list_adds_alerts_async(service_name, filter:filter, state:state, from:from, to:to, custom_headers:custom_headers).value!
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Gets the alerts for a given Active Directory Domain Service.
|
61
|
+
#
|
62
|
+
# @param service_name [String] The name of the service.
|
63
|
+
# @param filter [String] The alert property filter to apply.
|
64
|
+
# @param state [String] The alert state to query for.
|
65
|
+
# @param from [DateTime] The start date to query for.
|
66
|
+
# @param to [DateTime] The end date till when to query for.
|
67
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
68
|
+
# to the HTTP request.
|
69
|
+
#
|
70
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
|
+
#
|
72
|
+
def list_adds_alerts_async(service_name, filter:nil, state:nil, from:nil, to:nil, custom_headers:nil)
|
73
|
+
fail ArgumentError, 'service_name is nil' if service_name.nil?
|
74
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
75
|
+
|
76
|
+
|
77
|
+
request_headers = {}
|
78
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
79
|
+
|
80
|
+
# Set Headers
|
81
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
82
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
83
|
+
path_template = 'providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/alerts'
|
84
|
+
|
85
|
+
request_url = @base_url || @client.base_url
|
86
|
+
|
87
|
+
options = {
|
88
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
89
|
+
path_params: {'serviceName' => service_name},
|
90
|
+
query_params: {'$filter' => filter,'state' => state,'from' => from,'to' => to,'api-version' => @client.api_version},
|
91
|
+
headers: request_headers.merge(custom_headers || {}),
|
92
|
+
base_url: request_url
|
93
|
+
}
|
94
|
+
promise = @client.make_request_async(:get, path_template, options)
|
95
|
+
|
96
|
+
promise = promise.then do |result|
|
97
|
+
http_response = result.response
|
98
|
+
status_code = http_response.status
|
99
|
+
response_content = http_response.body
|
100
|
+
unless status_code == 200
|
101
|
+
error_model = JSON.load(response_content)
|
102
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
103
|
+
end
|
104
|
+
|
105
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
106
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
107
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
108
|
+
# Deserialize Response
|
109
|
+
if status_code == 200
|
110
|
+
begin
|
111
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
112
|
+
result_mapper = Azure::ADHybridHealthService::Mgmt::V2014_01_01::Models::Alerts.mapper()
|
113
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
114
|
+
rescue Exception => e
|
115
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
result
|
120
|
+
end
|
121
|
+
|
122
|
+
promise.execute
|
123
|
+
end
|
124
|
+
|
125
|
+
#
|
126
|
+
# Gets the alerts for a given Active Directory Domain Service.
|
127
|
+
#
|
128
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
129
|
+
# to List operation.
|
130
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
131
|
+
# will be added to the HTTP request.
|
132
|
+
#
|
133
|
+
# @return [Alerts] operation results.
|
134
|
+
#
|
135
|
+
def list_adds_alerts_next(next_page_link, custom_headers:nil)
|
136
|
+
response = list_adds_alerts_next_async(next_page_link, custom_headers:custom_headers).value!
|
137
|
+
response.body unless response.nil?
|
138
|
+
end
|
139
|
+
|
140
|
+
#
|
141
|
+
# Gets the alerts for a given Active Directory Domain Service.
|
142
|
+
#
|
143
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
144
|
+
# to List operation.
|
145
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
146
|
+
# will be added to the HTTP request.
|
147
|
+
#
|
148
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
149
|
+
#
|
150
|
+
def list_adds_alerts_next_with_http_info(next_page_link, custom_headers:nil)
|
151
|
+
list_adds_alerts_next_async(next_page_link, custom_headers:custom_headers).value!
|
152
|
+
end
|
153
|
+
|
154
|
+
#
|
155
|
+
# Gets the alerts for a given Active Directory Domain Service.
|
156
|
+
#
|
157
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
158
|
+
# to List operation.
|
159
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
160
|
+
# to the HTTP request.
|
161
|
+
#
|
162
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
163
|
+
#
|
164
|
+
def list_adds_alerts_next_async(next_page_link, custom_headers:nil)
|
165
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
166
|
+
|
167
|
+
|
168
|
+
request_headers = {}
|
169
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
170
|
+
|
171
|
+
# Set Headers
|
172
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
173
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
174
|
+
path_template = '{nextLink}'
|
175
|
+
|
176
|
+
request_url = @base_url || @client.base_url
|
177
|
+
|
178
|
+
options = {
|
179
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
180
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
181
|
+
headers: request_headers.merge(custom_headers || {}),
|
182
|
+
base_url: request_url
|
183
|
+
}
|
184
|
+
promise = @client.make_request_async(:get, path_template, options)
|
185
|
+
|
186
|
+
promise = promise.then do |result|
|
187
|
+
http_response = result.response
|
188
|
+
status_code = http_response.status
|
189
|
+
response_content = http_response.body
|
190
|
+
unless status_code == 200
|
191
|
+
error_model = JSON.load(response_content)
|
192
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
193
|
+
end
|
194
|
+
|
195
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
196
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
197
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
198
|
+
# Deserialize Response
|
199
|
+
if status_code == 200
|
200
|
+
begin
|
201
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
202
|
+
result_mapper = Azure::ADHybridHealthService::Mgmt::V2014_01_01::Models::Alerts.mapper()
|
203
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
204
|
+
rescue Exception => e
|
205
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
result
|
210
|
+
end
|
211
|
+
|
212
|
+
promise.execute
|
213
|
+
end
|
214
|
+
|
215
|
+
#
|
216
|
+
# Gets the alerts for a given Active Directory Domain Service.
|
217
|
+
#
|
218
|
+
# @param service_name [String] The name of the service.
|
219
|
+
# @param filter [String] The alert property filter to apply.
|
220
|
+
# @param state [String] The alert state to query for.
|
221
|
+
# @param from [DateTime] The start date to query for.
|
222
|
+
# @param to [DateTime] The end date till when to query for.
|
223
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
224
|
+
# will be added to the HTTP request.
|
225
|
+
#
|
226
|
+
# @return [Alerts] which provide lazy access to pages of the response.
|
227
|
+
#
|
228
|
+
def list_adds_alerts_as_lazy(service_name, filter:nil, state:nil, from:nil, to:nil, custom_headers:nil)
|
229
|
+
response = list_adds_alerts_async(service_name, filter:filter, state:state, from:from, to:to, custom_headers:custom_headers).value!
|
230
|
+
unless response.nil?
|
231
|
+
page = response.body
|
232
|
+
page.next_method = Proc.new do |next_page_link|
|
233
|
+
list_adds_alerts_next_async(next_page_link, custom_headers:custom_headers)
|
234
|
+
end
|
235
|
+
page
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
240
|
+
end
|
@@ -0,0 +1,500 @@
|
|
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::ADHybridHealthService::Mgmt::V2014_01_01
|
7
|
+
#
|
8
|
+
# REST APIs for Azure Active Directory Connect Health
|
9
|
+
#
|
10
|
+
class Configuration
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Configuration class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ADHybridHealthService] reference to the ADHybridHealthService
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets the service configurations.
|
26
|
+
#
|
27
|
+
# @param service_name [String] The name of the service.
|
28
|
+
# @param grouping [String] The grouping for configurations.
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [Array<Item>] operation results.
|
33
|
+
#
|
34
|
+
def list_adds_configurations(service_name, grouping:nil, custom_headers:nil)
|
35
|
+
first_page = list_adds_configurations_as_lazy(service_name, grouping:grouping, custom_headers:custom_headers)
|
36
|
+
first_page.get_all_items
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Gets the service configurations.
|
41
|
+
#
|
42
|
+
# @param service_name [String] The name of the service.
|
43
|
+
# @param grouping [String] The grouping for configurations.
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def list_adds_configurations_with_http_info(service_name, grouping:nil, custom_headers:nil)
|
50
|
+
list_adds_configurations_async(service_name, grouping:grouping, custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Gets the service configurations.
|
55
|
+
#
|
56
|
+
# @param service_name [String] The name of the service.
|
57
|
+
# @param grouping [String] The grouping for configurations.
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def list_adds_configurations_async(service_name, grouping:nil, custom_headers:nil)
|
64
|
+
fail ArgumentError, 'service_name is nil' if service_name.nil?
|
65
|
+
|
66
|
+
|
67
|
+
request_headers = {}
|
68
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
69
|
+
|
70
|
+
# Set Headers
|
71
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
72
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
73
|
+
path_template = 'providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/configuration'
|
74
|
+
|
75
|
+
request_url = @base_url || @client.base_url
|
76
|
+
|
77
|
+
options = {
|
78
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
79
|
+
path_params: {'serviceName' => service_name},
|
80
|
+
query_params: {'grouping' => grouping},
|
81
|
+
headers: request_headers.merge(custom_headers || {}),
|
82
|
+
base_url: request_url
|
83
|
+
}
|
84
|
+
promise = @client.make_request_async(:get, path_template, options)
|
85
|
+
|
86
|
+
promise = promise.then do |result|
|
87
|
+
http_response = result.response
|
88
|
+
status_code = http_response.status
|
89
|
+
response_content = http_response.body
|
90
|
+
unless status_code == 200
|
91
|
+
error_model = JSON.load(response_content)
|
92
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
93
|
+
end
|
94
|
+
|
95
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
96
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
97
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
98
|
+
# Deserialize Response
|
99
|
+
if status_code == 200
|
100
|
+
begin
|
101
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
102
|
+
result_mapper = Azure::ADHybridHealthService::Mgmt::V2014_01_01::Models::AddsConfiguration.mapper()
|
103
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
104
|
+
rescue Exception => e
|
105
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
result
|
110
|
+
end
|
111
|
+
|
112
|
+
promise.execute
|
113
|
+
end
|
114
|
+
|
115
|
+
#
|
116
|
+
# Onboards a tenant in Azure Active Directory Connect Health.
|
117
|
+
#
|
118
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
119
|
+
# will be added to the HTTP request.
|
120
|
+
#
|
121
|
+
# @return [Tenant] operation results.
|
122
|
+
#
|
123
|
+
def add(custom_headers:nil)
|
124
|
+
response = add_async(custom_headers:custom_headers).value!
|
125
|
+
response.body unless response.nil?
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# Onboards a tenant in Azure Active Directory Connect Health.
|
130
|
+
#
|
131
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
132
|
+
# will be added to the HTTP request.
|
133
|
+
#
|
134
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
135
|
+
#
|
136
|
+
def add_with_http_info(custom_headers:nil)
|
137
|
+
add_async(custom_headers:custom_headers).value!
|
138
|
+
end
|
139
|
+
|
140
|
+
#
|
141
|
+
# Onboards a tenant in Azure Active Directory Connect Health.
|
142
|
+
#
|
143
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
144
|
+
# to the HTTP request.
|
145
|
+
#
|
146
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
147
|
+
#
|
148
|
+
def add_async(custom_headers:nil)
|
149
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
150
|
+
|
151
|
+
|
152
|
+
request_headers = {}
|
153
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
154
|
+
|
155
|
+
# Set Headers
|
156
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
157
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
158
|
+
path_template = 'providers/Microsoft.ADHybridHealthService/configuration'
|
159
|
+
|
160
|
+
request_url = @base_url || @client.base_url
|
161
|
+
|
162
|
+
options = {
|
163
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
164
|
+
query_params: {'api-version' => @client.api_version},
|
165
|
+
headers: request_headers.merge(custom_headers || {}),
|
166
|
+
base_url: request_url
|
167
|
+
}
|
168
|
+
promise = @client.make_request_async(:post, path_template, options)
|
169
|
+
|
170
|
+
promise = promise.then do |result|
|
171
|
+
http_response = result.response
|
172
|
+
status_code = http_response.status
|
173
|
+
response_content = http_response.body
|
174
|
+
unless status_code == 200
|
175
|
+
error_model = JSON.load(response_content)
|
176
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
177
|
+
end
|
178
|
+
|
179
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
180
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
181
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
182
|
+
# Deserialize Response
|
183
|
+
if status_code == 200
|
184
|
+
begin
|
185
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
186
|
+
result_mapper = Azure::ADHybridHealthService::Mgmt::V2014_01_01::Models::Tenant.mapper()
|
187
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
188
|
+
rescue Exception => e
|
189
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
result
|
194
|
+
end
|
195
|
+
|
196
|
+
promise.execute
|
197
|
+
end
|
198
|
+
|
199
|
+
#
|
200
|
+
# Gets the details of a tenant onboarded to Azure Active Directory Connect
|
201
|
+
# Health.
|
202
|
+
#
|
203
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
204
|
+
# will be added to the HTTP request.
|
205
|
+
#
|
206
|
+
# @return [Tenant] operation results.
|
207
|
+
#
|
208
|
+
def get(custom_headers:nil)
|
209
|
+
response = get_async(custom_headers:custom_headers).value!
|
210
|
+
response.body unless response.nil?
|
211
|
+
end
|
212
|
+
|
213
|
+
#
|
214
|
+
# Gets the details of a tenant onboarded to Azure Active Directory Connect
|
215
|
+
# Health.
|
216
|
+
#
|
217
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
218
|
+
# will be added to the HTTP request.
|
219
|
+
#
|
220
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
221
|
+
#
|
222
|
+
def get_with_http_info(custom_headers:nil)
|
223
|
+
get_async(custom_headers:custom_headers).value!
|
224
|
+
end
|
225
|
+
|
226
|
+
#
|
227
|
+
# Gets the details of a tenant onboarded to Azure Active Directory Connect
|
228
|
+
# Health.
|
229
|
+
#
|
230
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
231
|
+
# to the HTTP request.
|
232
|
+
#
|
233
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
234
|
+
#
|
235
|
+
def get_async(custom_headers:nil)
|
236
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
237
|
+
|
238
|
+
|
239
|
+
request_headers = {}
|
240
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
241
|
+
|
242
|
+
# Set Headers
|
243
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
244
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
245
|
+
path_template = 'providers/Microsoft.ADHybridHealthService/configuration'
|
246
|
+
|
247
|
+
request_url = @base_url || @client.base_url
|
248
|
+
|
249
|
+
options = {
|
250
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
251
|
+
query_params: {'api-version' => @client.api_version},
|
252
|
+
headers: request_headers.merge(custom_headers || {}),
|
253
|
+
base_url: request_url
|
254
|
+
}
|
255
|
+
promise = @client.make_request_async(:get, path_template, options)
|
256
|
+
|
257
|
+
promise = promise.then do |result|
|
258
|
+
http_response = result.response
|
259
|
+
status_code = http_response.status
|
260
|
+
response_content = http_response.body
|
261
|
+
unless status_code == 200
|
262
|
+
error_model = JSON.load(response_content)
|
263
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
264
|
+
end
|
265
|
+
|
266
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
267
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
268
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
269
|
+
# Deserialize Response
|
270
|
+
if status_code == 200
|
271
|
+
begin
|
272
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
273
|
+
result_mapper = Azure::ADHybridHealthService::Mgmt::V2014_01_01::Models::Tenant.mapper()
|
274
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
275
|
+
rescue Exception => e
|
276
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
result
|
281
|
+
end
|
282
|
+
|
283
|
+
promise.execute
|
284
|
+
end
|
285
|
+
|
286
|
+
#
|
287
|
+
# Updates tenant properties for tenants onboarded to Azure Active Directory
|
288
|
+
# Connect Health.
|
289
|
+
#
|
290
|
+
# @param tenant [Tenant] The tenant object with the properties set to the
|
291
|
+
# updated value.
|
292
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
293
|
+
# will be added to the HTTP request.
|
294
|
+
#
|
295
|
+
# @return [Tenant] operation results.
|
296
|
+
#
|
297
|
+
def update(tenant, custom_headers:nil)
|
298
|
+
response = update_async(tenant, custom_headers:custom_headers).value!
|
299
|
+
response.body unless response.nil?
|
300
|
+
end
|
301
|
+
|
302
|
+
#
|
303
|
+
# Updates tenant properties for tenants onboarded to Azure Active Directory
|
304
|
+
# Connect Health.
|
305
|
+
#
|
306
|
+
# @param tenant [Tenant] The tenant object with the properties set to the
|
307
|
+
# updated value.
|
308
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
309
|
+
# will be added to the HTTP request.
|
310
|
+
#
|
311
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
312
|
+
#
|
313
|
+
def update_with_http_info(tenant, custom_headers:nil)
|
314
|
+
update_async(tenant, custom_headers:custom_headers).value!
|
315
|
+
end
|
316
|
+
|
317
|
+
#
|
318
|
+
# Updates tenant properties for tenants onboarded to Azure Active Directory
|
319
|
+
# Connect Health.
|
320
|
+
#
|
321
|
+
# @param tenant [Tenant] The tenant object with the properties set to the
|
322
|
+
# updated value.
|
323
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
324
|
+
# to the HTTP request.
|
325
|
+
#
|
326
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
327
|
+
#
|
328
|
+
def update_async(tenant, custom_headers:nil)
|
329
|
+
fail ArgumentError, 'tenant is nil' if tenant.nil?
|
330
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
331
|
+
|
332
|
+
|
333
|
+
request_headers = {}
|
334
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
335
|
+
|
336
|
+
# Set Headers
|
337
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
338
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
339
|
+
|
340
|
+
# Serialize Request
|
341
|
+
request_mapper = Azure::ADHybridHealthService::Mgmt::V2014_01_01::Models::Tenant.mapper()
|
342
|
+
request_content = @client.serialize(request_mapper, tenant)
|
343
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
344
|
+
|
345
|
+
path_template = 'providers/Microsoft.ADHybridHealthService/configuration'
|
346
|
+
|
347
|
+
request_url = @base_url || @client.base_url
|
348
|
+
|
349
|
+
options = {
|
350
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
351
|
+
query_params: {'api-version' => @client.api_version},
|
352
|
+
body: request_content,
|
353
|
+
headers: request_headers.merge(custom_headers || {}),
|
354
|
+
base_url: request_url
|
355
|
+
}
|
356
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
357
|
+
|
358
|
+
promise = promise.then do |result|
|
359
|
+
http_response = result.response
|
360
|
+
status_code = http_response.status
|
361
|
+
response_content = http_response.body
|
362
|
+
unless status_code == 200
|
363
|
+
error_model = JSON.load(response_content)
|
364
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
365
|
+
end
|
366
|
+
|
367
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
368
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
369
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
370
|
+
# Deserialize Response
|
371
|
+
if status_code == 200
|
372
|
+
begin
|
373
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
374
|
+
result_mapper = Azure::ADHybridHealthService::Mgmt::V2014_01_01::Models::Tenant.mapper()
|
375
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
376
|
+
rescue Exception => e
|
377
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
378
|
+
end
|
379
|
+
end
|
380
|
+
|
381
|
+
result
|
382
|
+
end
|
383
|
+
|
384
|
+
promise.execute
|
385
|
+
end
|
386
|
+
|
387
|
+
#
|
388
|
+
# Gets the service configurations.
|
389
|
+
#
|
390
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
391
|
+
# to List operation.
|
392
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
393
|
+
# will be added to the HTTP request.
|
394
|
+
#
|
395
|
+
# @return [AddsConfiguration] operation results.
|
396
|
+
#
|
397
|
+
def list_adds_configurations_next(next_page_link, custom_headers:nil)
|
398
|
+
response = list_adds_configurations_next_async(next_page_link, custom_headers:custom_headers).value!
|
399
|
+
response.body unless response.nil?
|
400
|
+
end
|
401
|
+
|
402
|
+
#
|
403
|
+
# Gets the service configurations.
|
404
|
+
#
|
405
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
406
|
+
# to List operation.
|
407
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
408
|
+
# will be added to the HTTP request.
|
409
|
+
#
|
410
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
411
|
+
#
|
412
|
+
def list_adds_configurations_next_with_http_info(next_page_link, custom_headers:nil)
|
413
|
+
list_adds_configurations_next_async(next_page_link, custom_headers:custom_headers).value!
|
414
|
+
end
|
415
|
+
|
416
|
+
#
|
417
|
+
# Gets the service configurations.
|
418
|
+
#
|
419
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
420
|
+
# to List operation.
|
421
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
422
|
+
# to the HTTP request.
|
423
|
+
#
|
424
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
425
|
+
#
|
426
|
+
def list_adds_configurations_next_async(next_page_link, custom_headers:nil)
|
427
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
428
|
+
|
429
|
+
|
430
|
+
request_headers = {}
|
431
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
432
|
+
|
433
|
+
# Set Headers
|
434
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
435
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
436
|
+
path_template = '{nextLink}'
|
437
|
+
|
438
|
+
request_url = @base_url || @client.base_url
|
439
|
+
|
440
|
+
options = {
|
441
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
442
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
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 MsRestAzure::AzureOperationError.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::ADHybridHealthService::Mgmt::V2014_01_01::Models::AddsConfiguration.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
|
+
# Gets the service configurations.
|
479
|
+
#
|
480
|
+
# @param service_name [String] The name of the service.
|
481
|
+
# @param grouping [String] The grouping for configurations.
|
482
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
483
|
+
# will be added to the HTTP request.
|
484
|
+
#
|
485
|
+
# @return [AddsConfiguration] which provide lazy access to pages of the
|
486
|
+
# response.
|
487
|
+
#
|
488
|
+
def list_adds_configurations_as_lazy(service_name, grouping:nil, custom_headers:nil)
|
489
|
+
response = list_adds_configurations_async(service_name, grouping:grouping, custom_headers:custom_headers).value!
|
490
|
+
unless response.nil?
|
491
|
+
page = response.body
|
492
|
+
page.next_method = Proc.new do |next_page_link|
|
493
|
+
list_adds_configurations_next_async(next_page_link, custom_headers:custom_headers)
|
494
|
+
end
|
495
|
+
page
|
496
|
+
end
|
497
|
+
end
|
498
|
+
|
499
|
+
end
|
500
|
+
end
|