azure_mgmt_logic 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_logic.rb +63 -55
- data/lib/generated/azure_mgmt_logic/{integration_account_agreements.rb → agreements.rb} +25 -25
- data/lib/generated/azure_mgmt_logic/{integration_account_certificates.rb → certificates.rb} +25 -25
- data/lib/generated/azure_mgmt_logic/integration_accounts.rb +28 -28
- data/lib/generated/azure_mgmt_logic/logic_management_client.rb +267 -16
- data/lib/generated/azure_mgmt_logic/{integration_account_maps.rb → maps.rb} +25 -25
- data/lib/generated/azure_mgmt_logic/models/agreement_content.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/agreement_type.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/as2acknowledgement_connection_settings.rb +6 -7
- data/lib/generated/azure_mgmt_logic/models/as2agreement_content.rb +4 -5
- data/lib/generated/azure_mgmt_logic/models/as2envelope_settings.rb +9 -10
- data/lib/generated/azure_mgmt_logic/models/as2error_settings.rb +6 -7
- data/lib/generated/azure_mgmt_logic/models/as2mdn_settings.rb +10 -10
- data/lib/generated/azure_mgmt_logic/models/as2message_connection_settings.rb +6 -7
- data/lib/generated/azure_mgmt_logic/models/as2one_way_agreement.rb +5 -6
- data/lib/generated/azure_mgmt_logic/models/as2protocol_settings.rb +9 -10
- data/lib/generated/azure_mgmt_logic/models/as2security_settings.rb +9 -10
- data/lib/generated/azure_mgmt_logic/models/as2validation_settings.rb +11 -12
- data/lib/generated/azure_mgmt_logic/models/b2bpartner_content.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/business_identity.rb +9 -9
- data/lib/generated/azure_mgmt_logic/models/callback_url.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/content_hash.rb +4 -5
- data/lib/generated/azure_mgmt_logic/models/content_link.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/correlation.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/day_of_week.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/days_of_week.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/edifact_acknowledgement_settings.rb +11 -12
- data/lib/generated/azure_mgmt_logic/models/edifact_agreement_content.rb +4 -5
- data/lib/generated/azure_mgmt_logic/models/edifact_character_set.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/edifact_decimal_indicator.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/edifact_delimiter_override.rb +9 -10
- data/lib/generated/azure_mgmt_logic/models/edifact_envelope_override.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/edifact_envelope_settings.rb +16 -17
- data/lib/generated/azure_mgmt_logic/models/edifact_framing_settings.rb +11 -12
- data/lib/generated/azure_mgmt_logic/models/edifact_message_filter.rb +3 -4
- data/lib/generated/azure_mgmt_logic/models/edifact_message_identifier.rb +3 -4
- data/lib/generated/azure_mgmt_logic/models/edifact_one_way_agreement.rb +5 -6
- data/lib/generated/azure_mgmt_logic/models/edifact_processing_settings.rb +7 -8
- data/lib/generated/azure_mgmt_logic/models/edifact_protocol_settings.rb +9 -10
- data/lib/generated/azure_mgmt_logic/models/edifact_schema_reference.rb +6 -7
- data/lib/generated/azure_mgmt_logic/models/edifact_validation_override.rb +9 -10
- data/lib/generated/azure_mgmt_logic/models/edifact_validation_settings.rb +12 -13
- data/lib/generated/azure_mgmt_logic/models/encryption_algorithm.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/{integration_account_content_hash.rb → error_properties.rb} +15 -15
- data/lib/generated/azure_mgmt_logic/models/error_response.rb +46 -0
- data/lib/generated/azure_mgmt_logic/models/generate_upgraded_definition_parameters.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/get_callback_url_parameters.rb +56 -0
- data/lib/generated/azure_mgmt_logic/models/hashing_algorithm.rb +3 -1
- data/lib/generated/azure_mgmt_logic/models/integration_account.rb +6 -4
- data/lib/generated/azure_mgmt_logic/models/integration_account_agreement.rb +18 -14
- data/lib/generated/azure_mgmt_logic/models/integration_account_agreement_filter.rb +3 -4
- data/lib/generated/azure_mgmt_logic/models/integration_account_agreement_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/integration_account_certificate.rb +6 -4
- data/lib/generated/azure_mgmt_logic/models/integration_account_certificate_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/integration_account_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/integration_account_map.rb +21 -7
- data/lib/generated/azure_mgmt_logic/models/integration_account_map_filter.rb +6 -7
- data/lib/generated/azure_mgmt_logic/models/integration_account_map_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/integration_account_map_properties_parameters_schema.rb +45 -0
- data/lib/generated/azure_mgmt_logic/models/integration_account_partner.rb +8 -6
- data/lib/generated/azure_mgmt_logic/models/integration_account_partner_filter.rb +3 -4
- data/lib/generated/azure_mgmt_logic/models/integration_account_partner_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/integration_account_schema.rb +40 -18
- data/lib/generated/azure_mgmt_logic/models/integration_account_schema_filter.rb +3 -4
- data/lib/generated/azure_mgmt_logic/models/integration_account_schema_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/{integration_account_resource.rb → integration_account_session.rb} +38 -19
- data/lib/generated/azure_mgmt_logic/models/{list_callback_url_parameters.rb → integration_account_session_filter.rb} +11 -12
- data/lib/generated/azure_mgmt_logic/models/integration_account_session_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_logic/models/integration_account_sku.rb +6 -7
- data/lib/generated/azure_mgmt_logic/models/integration_account_sku_name.rb +17 -0
- data/lib/generated/azure_mgmt_logic/models/key_type.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/key_vault_key_reference.rb +4 -5
- data/lib/generated/azure_mgmt_logic/models/key_vault_key_reference_key_vault.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/map_type.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/message_filter_type.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/operation.rb +55 -0
- data/lib/generated/azure_mgmt_logic/models/operation_display.rb +65 -0
- data/lib/generated/azure_mgmt_logic/models/operation_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_logic/models/parameter_type.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/partner_content.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/partner_type.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/recurrence_frequency.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/recurrence_schedule.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/recurrence_schedule_occurrence.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/resource_reference.rb +3 -3
- data/lib/generated/azure_mgmt_logic/models/schema_type.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/segment_terminator_suffix.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/sku.rb +3 -4
- data/lib/generated/azure_mgmt_logic/models/sku_name.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/trailing_separator_policy.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/usage_indicator.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/workflow.rb +5 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_filter.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/workflow_output_parameter.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_parameter.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_provisioning_state.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/workflow_run.rb +3 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_run_action.rb +3 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_run_action_filter.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_run_action_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/workflow_run_filter.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_run_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/workflow_run_trigger.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_state.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/workflow_status.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger.rb +3 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger_callback_url.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger_filter.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger_history.rb +3 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_filter.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger_history_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger_provisioning_state.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/workflow_trigger_recurrence.rb +2 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_version.rb +5 -3
- data/lib/generated/azure_mgmt_logic/models/workflow_version_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_logic/models/x12acknowledgement_settings.rb +13 -14
- data/lib/generated/azure_mgmt_logic/models/x12agreement_content.rb +4 -5
- data/lib/generated/azure_mgmt_logic/models/x12character_set.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/x12date_format.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/x12delimiter_overrides.rb +8 -9
- data/lib/generated/azure_mgmt_logic/models/x12envelope_override.rb +13 -14
- data/lib/generated/azure_mgmt_logic/models/x12envelope_settings.rb +23 -24
- data/lib/generated/azure_mgmt_logic/models/x12framing_settings.rb +9 -10
- data/lib/generated/azure_mgmt_logic/models/x12message_filter.rb +3 -4
- data/lib/generated/azure_mgmt_logic/models/x12message_identifier.rb +3 -4
- data/lib/generated/azure_mgmt_logic/models/x12one_way_agreement.rb +5 -6
- data/lib/generated/azure_mgmt_logic/models/x12processing_settings.rb +8 -9
- data/lib/generated/azure_mgmt_logic/models/x12protocol_settings.rb +10 -11
- data/lib/generated/azure_mgmt_logic/models/x12schema_reference.rb +5 -6
- data/lib/generated/azure_mgmt_logic/models/x12security_settings.rb +4 -5
- data/lib/generated/azure_mgmt_logic/models/x12time_format.rb +1 -1
- data/lib/generated/azure_mgmt_logic/models/x12validation_override.rb +9 -10
- data/lib/generated/azure_mgmt_logic/models/x12validation_settings.rb +12 -13
- data/lib/generated/azure_mgmt_logic/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_logic/{integration_account_partners.rb → partners.rb} +25 -25
- data/lib/generated/azure_mgmt_logic/{integration_account_schemas.rb → schemas.rb} +25 -25
- data/lib/generated/azure_mgmt_logic/sessions.rb +541 -0
- data/lib/generated/azure_mgmt_logic/version.rb +2 -2
- data/lib/generated/azure_mgmt_logic/workflow_run_actions.rb +6 -6
- data/lib/generated/azure_mgmt_logic/workflow_runs.rb +8 -8
- data/lib/generated/azure_mgmt_logic/workflow_trigger_histories.rb +6 -6
- data/lib/generated/azure_mgmt_logic/workflow_triggers.rb +10 -10
- data/lib/generated/azure_mgmt_logic/workflow_versions.rb +6 -6
- data/lib/generated/azure_mgmt_logic/workflows.rb +22 -22
- metadata +19 -11
- data/lib/generated/azure_mgmt_logic/models/integration_account_content_link.rb +0 -86
@@ -0,0 +1,541 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Logic
|
7
|
+
#
|
8
|
+
# REST API for Azure Logic Apps.
|
9
|
+
#
|
10
|
+
class Sessions
|
11
|
+
include Azure::ARM::Logic::Models
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the Sessions class.
|
16
|
+
# @param client service class for accessing basic functionality.
|
17
|
+
#
|
18
|
+
def initialize(client)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [LogicManagementClient] reference to the LogicManagementClient
|
23
|
+
attr_reader :client
|
24
|
+
|
25
|
+
#
|
26
|
+
# Gets a list of integration account sessions.
|
27
|
+
#
|
28
|
+
# @param resource_group_name [String] The resource group name.
|
29
|
+
# @param integration_account_name [String] The integration account name.
|
30
|
+
# @param top [Integer] The number of items to be included in the result.
|
31
|
+
# @param filter [String] The filter to apply on the operation.
|
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<IntegrationAccountSession>] operation results.
|
36
|
+
#
|
37
|
+
def list_by_integration_accounts(resource_group_name, integration_account_name, top = nil, filter = nil, custom_headers = nil)
|
38
|
+
first_page = list_by_integration_accounts_as_lazy(resource_group_name, integration_account_name, top, filter, custom_headers)
|
39
|
+
first_page.get_all_items
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Gets a list of integration account sessions.
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] The resource group name.
|
46
|
+
# @param integration_account_name [String] The integration account name.
|
47
|
+
# @param top [Integer] The number of items to be included in the result.
|
48
|
+
# @param filter [String] The filter to apply on the operation.
|
49
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
50
|
+
# will be added to the HTTP request.
|
51
|
+
#
|
52
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
53
|
+
#
|
54
|
+
def list_by_integration_accounts_with_http_info(resource_group_name, integration_account_name, top = nil, filter = nil, custom_headers = nil)
|
55
|
+
list_by_integration_accounts_async(resource_group_name, integration_account_name, top, filter, custom_headers).value!
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Gets a list of integration account sessions.
|
60
|
+
#
|
61
|
+
# @param resource_group_name [String] The resource group name.
|
62
|
+
# @param integration_account_name [String] The integration account name.
|
63
|
+
# @param top [Integer] The number of items to be included in the result.
|
64
|
+
# @param filter [String] The filter to apply on the operation.
|
65
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
66
|
+
# to the HTTP request.
|
67
|
+
#
|
68
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
69
|
+
#
|
70
|
+
def list_by_integration_accounts_async(resource_group_name, integration_account_name, top = nil, filter = nil, custom_headers = nil)
|
71
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
72
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
73
|
+
fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
|
74
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
75
|
+
|
76
|
+
|
77
|
+
request_headers = {}
|
78
|
+
|
79
|
+
# Set Headers
|
80
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
81
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
82
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'
|
83
|
+
|
84
|
+
request_url = @base_url || @client.base_url
|
85
|
+
|
86
|
+
options = {
|
87
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
88
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name},
|
89
|
+
query_params: {'api-version' => @client.api_version,'$top' => top,'$filter' => filter},
|
90
|
+
headers: request_headers.merge(custom_headers || {}),
|
91
|
+
base_url: request_url
|
92
|
+
}
|
93
|
+
promise = @client.make_request_async(:get, path_template, options)
|
94
|
+
|
95
|
+
promise = promise.then do |result|
|
96
|
+
http_response = result.response
|
97
|
+
status_code = http_response.status
|
98
|
+
response_content = http_response.body
|
99
|
+
unless status_code == 200
|
100
|
+
error_model = JSON.load(response_content)
|
101
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
102
|
+
end
|
103
|
+
|
104
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
105
|
+
# Deserialize Response
|
106
|
+
if status_code == 200
|
107
|
+
begin
|
108
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
109
|
+
result_mapper = IntegrationAccountSessionListResult.mapper()
|
110
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
111
|
+
rescue Exception => e
|
112
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
result
|
117
|
+
end
|
118
|
+
|
119
|
+
promise.execute
|
120
|
+
end
|
121
|
+
|
122
|
+
#
|
123
|
+
# Gets an integration account session.
|
124
|
+
#
|
125
|
+
# @param resource_group_name [String] The resource group name.
|
126
|
+
# @param integration_account_name [String] The integration account name.
|
127
|
+
# @param session_name [String] The integration account session name.
|
128
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
129
|
+
# will be added to the HTTP request.
|
130
|
+
#
|
131
|
+
# @return [Object] operation results.
|
132
|
+
#
|
133
|
+
def get(resource_group_name, integration_account_name, session_name, custom_headers = nil)
|
134
|
+
response = get_async(resource_group_name, integration_account_name, session_name, custom_headers).value!
|
135
|
+
response.body unless response.nil?
|
136
|
+
end
|
137
|
+
|
138
|
+
#
|
139
|
+
# Gets an integration account session.
|
140
|
+
#
|
141
|
+
# @param resource_group_name [String] The resource group name.
|
142
|
+
# @param integration_account_name [String] The integration account name.
|
143
|
+
# @param session_name [String] The integration account session name.
|
144
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
145
|
+
# will be added to the HTTP request.
|
146
|
+
#
|
147
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
148
|
+
#
|
149
|
+
def get_with_http_info(resource_group_name, integration_account_name, session_name, custom_headers = nil)
|
150
|
+
get_async(resource_group_name, integration_account_name, session_name, custom_headers).value!
|
151
|
+
end
|
152
|
+
|
153
|
+
#
|
154
|
+
# Gets an integration account session.
|
155
|
+
#
|
156
|
+
# @param resource_group_name [String] The resource group name.
|
157
|
+
# @param integration_account_name [String] The integration account name.
|
158
|
+
# @param session_name [String] The integration account session name.
|
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 get_async(resource_group_name, integration_account_name, session_name, custom_headers = nil)
|
165
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
166
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
167
|
+
fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
|
168
|
+
fail ArgumentError, 'session_name is nil' if session_name.nil?
|
169
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
170
|
+
|
171
|
+
|
172
|
+
request_headers = {}
|
173
|
+
|
174
|
+
# Set Headers
|
175
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
176
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
177
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'
|
178
|
+
|
179
|
+
request_url = @base_url || @client.base_url
|
180
|
+
|
181
|
+
options = {
|
182
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
183
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name,'sessionName' => session_name},
|
184
|
+
query_params: {'api-version' => @client.api_version},
|
185
|
+
headers: request_headers.merge(custom_headers || {}),
|
186
|
+
base_url: request_url
|
187
|
+
}
|
188
|
+
promise = @client.make_request_async(:get, path_template, options)
|
189
|
+
|
190
|
+
promise = promise.then do |result|
|
191
|
+
http_response = result.response
|
192
|
+
status_code = http_response.status
|
193
|
+
response_content = http_response.body
|
194
|
+
unless status_code == 200 || status_code == 404
|
195
|
+
error_model = JSON.load(response_content)
|
196
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
197
|
+
end
|
198
|
+
|
199
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
200
|
+
# Deserialize Response
|
201
|
+
if status_code == 200
|
202
|
+
begin
|
203
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
204
|
+
result_mapper = IntegrationAccountSession.mapper()
|
205
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
206
|
+
rescue Exception => e
|
207
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
# Deserialize Response
|
211
|
+
if status_code == 404
|
212
|
+
begin
|
213
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
214
|
+
result_mapper = ErrorResponse.mapper()
|
215
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
216
|
+
rescue Exception => e
|
217
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
result
|
222
|
+
end
|
223
|
+
|
224
|
+
promise.execute
|
225
|
+
end
|
226
|
+
|
227
|
+
#
|
228
|
+
# Creates or updates an integration account session.
|
229
|
+
#
|
230
|
+
# @param resource_group_name [String] The resource group name.
|
231
|
+
# @param integration_account_name [String] The integration account name.
|
232
|
+
# @param session_name [String] The integration account session name.
|
233
|
+
# @param session [IntegrationAccountSession] The integration account session.
|
234
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
235
|
+
# will be added to the HTTP request.
|
236
|
+
#
|
237
|
+
# @return [IntegrationAccountSession] operation results.
|
238
|
+
#
|
239
|
+
def create_or_update(resource_group_name, integration_account_name, session_name, session, custom_headers = nil)
|
240
|
+
response = create_or_update_async(resource_group_name, integration_account_name, session_name, session, custom_headers).value!
|
241
|
+
response.body unless response.nil?
|
242
|
+
end
|
243
|
+
|
244
|
+
#
|
245
|
+
# Creates or updates an integration account session.
|
246
|
+
#
|
247
|
+
# @param resource_group_name [String] The resource group name.
|
248
|
+
# @param integration_account_name [String] The integration account name.
|
249
|
+
# @param session_name [String] The integration account session name.
|
250
|
+
# @param session [IntegrationAccountSession] The integration account session.
|
251
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
252
|
+
# will be added to the HTTP request.
|
253
|
+
#
|
254
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
255
|
+
#
|
256
|
+
def create_or_update_with_http_info(resource_group_name, integration_account_name, session_name, session, custom_headers = nil)
|
257
|
+
create_or_update_async(resource_group_name, integration_account_name, session_name, session, custom_headers).value!
|
258
|
+
end
|
259
|
+
|
260
|
+
#
|
261
|
+
# Creates or updates an integration account session.
|
262
|
+
#
|
263
|
+
# @param resource_group_name [String] The resource group name.
|
264
|
+
# @param integration_account_name [String] The integration account name.
|
265
|
+
# @param session_name [String] The integration account session name.
|
266
|
+
# @param session [IntegrationAccountSession] The integration account session.
|
267
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
268
|
+
# to the HTTP request.
|
269
|
+
#
|
270
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
271
|
+
#
|
272
|
+
def create_or_update_async(resource_group_name, integration_account_name, session_name, session, custom_headers = nil)
|
273
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
274
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
275
|
+
fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
|
276
|
+
fail ArgumentError, 'session_name is nil' if session_name.nil?
|
277
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
278
|
+
fail ArgumentError, 'session is nil' if session.nil?
|
279
|
+
|
280
|
+
|
281
|
+
request_headers = {}
|
282
|
+
|
283
|
+
# Set Headers
|
284
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
285
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
286
|
+
|
287
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
288
|
+
|
289
|
+
# Serialize Request
|
290
|
+
request_mapper = IntegrationAccountSession.mapper()
|
291
|
+
request_content = @client.serialize(request_mapper, session, 'session')
|
292
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
293
|
+
|
294
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'
|
295
|
+
|
296
|
+
request_url = @base_url || @client.base_url
|
297
|
+
|
298
|
+
options = {
|
299
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
300
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name,'sessionName' => session_name},
|
301
|
+
query_params: {'api-version' => @client.api_version},
|
302
|
+
body: request_content,
|
303
|
+
headers: request_headers.merge(custom_headers || {}),
|
304
|
+
base_url: request_url
|
305
|
+
}
|
306
|
+
promise = @client.make_request_async(:put, path_template, options)
|
307
|
+
|
308
|
+
promise = promise.then do |result|
|
309
|
+
http_response = result.response
|
310
|
+
status_code = http_response.status
|
311
|
+
response_content = http_response.body
|
312
|
+
unless status_code == 200 || status_code == 201
|
313
|
+
error_model = JSON.load(response_content)
|
314
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
315
|
+
end
|
316
|
+
|
317
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
318
|
+
# Deserialize Response
|
319
|
+
if status_code == 200
|
320
|
+
begin
|
321
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
322
|
+
result_mapper = IntegrationAccountSession.mapper()
|
323
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
324
|
+
rescue Exception => e
|
325
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
326
|
+
end
|
327
|
+
end
|
328
|
+
# Deserialize Response
|
329
|
+
if status_code == 201
|
330
|
+
begin
|
331
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
332
|
+
result_mapper = IntegrationAccountSession.mapper()
|
333
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
334
|
+
rescue Exception => e
|
335
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
339
|
+
result
|
340
|
+
end
|
341
|
+
|
342
|
+
promise.execute
|
343
|
+
end
|
344
|
+
|
345
|
+
#
|
346
|
+
# Deletes an integration account session.
|
347
|
+
#
|
348
|
+
# @param resource_group_name [String] The resource group name.
|
349
|
+
# @param integration_account_name [String] The integration account name.
|
350
|
+
# @param session_name [String] The integration account session name.
|
351
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
352
|
+
# will be added to the HTTP request.
|
353
|
+
#
|
354
|
+
#
|
355
|
+
def delete(resource_group_name, integration_account_name, session_name, custom_headers = nil)
|
356
|
+
response = delete_async(resource_group_name, integration_account_name, session_name, custom_headers).value!
|
357
|
+
nil
|
358
|
+
end
|
359
|
+
|
360
|
+
#
|
361
|
+
# Deletes an integration account session.
|
362
|
+
#
|
363
|
+
# @param resource_group_name [String] The resource group name.
|
364
|
+
# @param integration_account_name [String] The integration account name.
|
365
|
+
# @param session_name [String] The integration account session name.
|
366
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
367
|
+
# will be added to the HTTP request.
|
368
|
+
#
|
369
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
370
|
+
#
|
371
|
+
def delete_with_http_info(resource_group_name, integration_account_name, session_name, custom_headers = nil)
|
372
|
+
delete_async(resource_group_name, integration_account_name, session_name, custom_headers).value!
|
373
|
+
end
|
374
|
+
|
375
|
+
#
|
376
|
+
# Deletes an integration account session.
|
377
|
+
#
|
378
|
+
# @param resource_group_name [String] The resource group name.
|
379
|
+
# @param integration_account_name [String] The integration account name.
|
380
|
+
# @param session_name [String] The integration account session name.
|
381
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
382
|
+
# to the HTTP request.
|
383
|
+
#
|
384
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
385
|
+
#
|
386
|
+
def delete_async(resource_group_name, integration_account_name, session_name, custom_headers = nil)
|
387
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
388
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
389
|
+
fail ArgumentError, 'integration_account_name is nil' if integration_account_name.nil?
|
390
|
+
fail ArgumentError, 'session_name is nil' if session_name.nil?
|
391
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
392
|
+
|
393
|
+
|
394
|
+
request_headers = {}
|
395
|
+
|
396
|
+
# Set Headers
|
397
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
398
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
399
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'
|
400
|
+
|
401
|
+
request_url = @base_url || @client.base_url
|
402
|
+
|
403
|
+
options = {
|
404
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
405
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'integrationAccountName' => integration_account_name,'sessionName' => session_name},
|
406
|
+
query_params: {'api-version' => @client.api_version},
|
407
|
+
headers: request_headers.merge(custom_headers || {}),
|
408
|
+
base_url: request_url
|
409
|
+
}
|
410
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
411
|
+
|
412
|
+
promise = promise.then do |result|
|
413
|
+
http_response = result.response
|
414
|
+
status_code = http_response.status
|
415
|
+
response_content = http_response.body
|
416
|
+
unless status_code == 200 || status_code == 204
|
417
|
+
error_model = JSON.load(response_content)
|
418
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
419
|
+
end
|
420
|
+
|
421
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
422
|
+
|
423
|
+
result
|
424
|
+
end
|
425
|
+
|
426
|
+
promise.execute
|
427
|
+
end
|
428
|
+
|
429
|
+
#
|
430
|
+
# Gets a list of integration account sessions.
|
431
|
+
#
|
432
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
433
|
+
# to List operation.
|
434
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
435
|
+
# will be added to the HTTP request.
|
436
|
+
#
|
437
|
+
# @return [IntegrationAccountSessionListResult] operation results.
|
438
|
+
#
|
439
|
+
def list_by_integration_accounts_next(next_page_link, custom_headers = nil)
|
440
|
+
response = list_by_integration_accounts_next_async(next_page_link, custom_headers).value!
|
441
|
+
response.body unless response.nil?
|
442
|
+
end
|
443
|
+
|
444
|
+
#
|
445
|
+
# Gets a list of integration account sessions.
|
446
|
+
#
|
447
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
448
|
+
# to List operation.
|
449
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
450
|
+
# will be added to the HTTP request.
|
451
|
+
#
|
452
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
453
|
+
#
|
454
|
+
def list_by_integration_accounts_next_with_http_info(next_page_link, custom_headers = nil)
|
455
|
+
list_by_integration_accounts_next_async(next_page_link, custom_headers).value!
|
456
|
+
end
|
457
|
+
|
458
|
+
#
|
459
|
+
# Gets a list of integration account sessions.
|
460
|
+
#
|
461
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
462
|
+
# to List operation.
|
463
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
464
|
+
# to the HTTP request.
|
465
|
+
#
|
466
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
467
|
+
#
|
468
|
+
def list_by_integration_accounts_next_async(next_page_link, custom_headers = nil)
|
469
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
470
|
+
|
471
|
+
|
472
|
+
request_headers = {}
|
473
|
+
|
474
|
+
# Set Headers
|
475
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
476
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
477
|
+
path_template = '{nextLink}'
|
478
|
+
|
479
|
+
request_url = @base_url || @client.base_url
|
480
|
+
|
481
|
+
options = {
|
482
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
483
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
484
|
+
headers: request_headers.merge(custom_headers || {}),
|
485
|
+
base_url: request_url
|
486
|
+
}
|
487
|
+
promise = @client.make_request_async(:get, path_template, options)
|
488
|
+
|
489
|
+
promise = promise.then do |result|
|
490
|
+
http_response = result.response
|
491
|
+
status_code = http_response.status
|
492
|
+
response_content = http_response.body
|
493
|
+
unless status_code == 200
|
494
|
+
error_model = JSON.load(response_content)
|
495
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
496
|
+
end
|
497
|
+
|
498
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
499
|
+
# Deserialize Response
|
500
|
+
if status_code == 200
|
501
|
+
begin
|
502
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
503
|
+
result_mapper = IntegrationAccountSessionListResult.mapper()
|
504
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
505
|
+
rescue Exception => e
|
506
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
507
|
+
end
|
508
|
+
end
|
509
|
+
|
510
|
+
result
|
511
|
+
end
|
512
|
+
|
513
|
+
promise.execute
|
514
|
+
end
|
515
|
+
|
516
|
+
#
|
517
|
+
# Gets a list of integration account sessions.
|
518
|
+
#
|
519
|
+
# @param resource_group_name [String] The resource group name.
|
520
|
+
# @param integration_account_name [String] The integration account name.
|
521
|
+
# @param top [Integer] The number of items to be included in the result.
|
522
|
+
# @param filter [String] The filter to apply on the operation.
|
523
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
524
|
+
# will be added to the HTTP request.
|
525
|
+
#
|
526
|
+
# @return [IntegrationAccountSessionListResult] which provide lazy access to
|
527
|
+
# pages of the response.
|
528
|
+
#
|
529
|
+
def list_by_integration_accounts_as_lazy(resource_group_name, integration_account_name, top = nil, filter = nil, custom_headers = nil)
|
530
|
+
response = list_by_integration_accounts_async(resource_group_name, integration_account_name, top, filter, custom_headers).value!
|
531
|
+
unless response.nil?
|
532
|
+
page = response.body
|
533
|
+
page.next_method = Proc.new do |next_page_link|
|
534
|
+
list_by_integration_accounts_next_async(next_page_link, custom_headers)
|
535
|
+
end
|
536
|
+
page
|
537
|
+
end
|
538
|
+
end
|
539
|
+
|
540
|
+
end
|
541
|
+
end
|