azure_mgmt_data_factory 0.18.3 → 0.18.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2017-09-01-preview/generated/azure_mgmt_data_factory/data_factory_management_client.rb +1 -1
- data/lib/2018-06-01/generated/azure_mgmt_data_factory.rb +129 -115
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/data_factory_management_client.rb +9 -1
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/exposure_control.rb +114 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/managed_private_endpoints.rb +611 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/managed_virtual_networks.rb +486 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/az_power_shell_setup.rb +61 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_blob_fslinked_service.rb +14 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_blob_storage_linked_service.rb +14 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_data_lake_store_linked_service.rb +14 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_databricks_linked_service.rb +12 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_file_storage_linked_service.rb +12 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_file_storage_write_settings.rb +81 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_sql_database_linked_service.rb +14 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_sql_dwlinked_service.rb +14 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/azure_sql_milinked_service.rb +14 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/connection_state_properties.rb +71 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/copy_sink.rb +1 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/cosmos_db_sql_api_source.rb +12 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/custom_setup_base.rb +1 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/data_flow_staging_info.rb +3 -2
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/exposure_control_batch_request.rb +56 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/exposure_control_batch_response.rb +56 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/hdfs_read_settings.rb +13 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/managed_private_endpoint.rb +135 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/managed_private_endpoint_list_response.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/managed_private_endpoint_resource.rb +83 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/managed_virtual_network.rb +78 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/managed_virtual_network_list_response.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/managed_virtual_network_resource.rb +83 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/odata_linked_service.rb +14 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/quick_books_linked_service.rb +19 -6
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/rest_service_linked_service.rb +14 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/rest_sink.rb +180 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/salesforce_marketing_cloud_linked_service.rb +14 -1
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/sap_open_hub_linked_service.rb +51 -3
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/sap_open_hub_source.rb +26 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/sap_table_source.rb +13 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/square_linked_service.rb +15 -3
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/store_write_settings.rb +1 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/web_hook_activity.rb +3 -3
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/xero_linked_service.rb +13 -1
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/xml_read_settings.rb +24 -0
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/models/zoho_linked_service.rb +13 -1
- data/lib/2018-06-01/generated/azure_mgmt_data_factory/trigger_runs.rb +100 -0
- data/lib/profiles/latest/modules/datafactory_profile_module.rb +431 -379
- data/lib/version.rb +1 -1
- metadata +16 -2
@@ -0,0 +1,611 @@
|
|
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::DataFactory::Mgmt::V2018_06_01
|
7
|
+
#
|
8
|
+
# The Azure Data Factory V2 management API provides a RESTful set of web
|
9
|
+
# services that interact with Azure Data Factory V2 services.
|
10
|
+
#
|
11
|
+
class ManagedPrivateEndpoints
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the ManagedPrivateEndpoints class.
|
16
|
+
# @param client service class for accessing basic functionality.
|
17
|
+
#
|
18
|
+
def initialize(client)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [DataFactoryManagementClient] reference to the DataFactoryManagementClient
|
23
|
+
attr_reader :client
|
24
|
+
|
25
|
+
#
|
26
|
+
# Lists managed private endpoints.
|
27
|
+
#
|
28
|
+
# @param resource_group_name [String] The resource group name.
|
29
|
+
# @param factory_name [String] The factory name.
|
30
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
# @return [Array<ManagedPrivateEndpointResource>] operation results.
|
35
|
+
#
|
36
|
+
def list_by_factory(resource_group_name, factory_name, managed_virtual_network_name, custom_headers:nil)
|
37
|
+
first_page = list_by_factory_as_lazy(resource_group_name, factory_name, managed_virtual_network_name, custom_headers:custom_headers)
|
38
|
+
first_page.get_all_items
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Lists managed private endpoints.
|
43
|
+
#
|
44
|
+
# @param resource_group_name [String] The resource group name.
|
45
|
+
# @param factory_name [String] The factory name.
|
46
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
47
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
48
|
+
# will be added to the HTTP request.
|
49
|
+
#
|
50
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
51
|
+
#
|
52
|
+
def list_by_factory_with_http_info(resource_group_name, factory_name, managed_virtual_network_name, custom_headers:nil)
|
53
|
+
list_by_factory_async(resource_group_name, factory_name, managed_virtual_network_name, custom_headers:custom_headers).value!
|
54
|
+
end
|
55
|
+
|
56
|
+
#
|
57
|
+
# Lists managed private endpoints.
|
58
|
+
#
|
59
|
+
# @param resource_group_name [String] The resource group name.
|
60
|
+
# @param factory_name [String] The factory name.
|
61
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
62
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
63
|
+
# to the HTTP request.
|
64
|
+
#
|
65
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
66
|
+
#
|
67
|
+
def list_by_factory_async(resource_group_name, factory_name, managed_virtual_network_name, custom_headers:nil)
|
68
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
69
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
70
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
71
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
72
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
73
|
+
fail ArgumentError, 'factory_name is nil' if factory_name.nil?
|
74
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63
|
75
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3
|
76
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil?
|
77
|
+
fail ArgumentError, 'managed_virtual_network_name is nil' if managed_virtual_network_name.nil?
|
78
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'MaxLength': '127'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.length > 127
|
79
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'MinLength': '1'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.length < 1
|
80
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'Pattern': '^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.match(Regexp.new('^^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$$')).nil?
|
81
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
82
|
+
|
83
|
+
|
84
|
+
request_headers = {}
|
85
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
86
|
+
|
87
|
+
# Set Headers
|
88
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
89
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
90
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints'
|
91
|
+
|
92
|
+
request_url = @base_url || @client.base_url
|
93
|
+
|
94
|
+
options = {
|
95
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
96
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name,'managedVirtualNetworkName' => managed_virtual_network_name},
|
97
|
+
query_params: {'api-version' => @client.api_version},
|
98
|
+
headers: request_headers.merge(custom_headers || {}),
|
99
|
+
base_url: request_url
|
100
|
+
}
|
101
|
+
promise = @client.make_request_async(:get, path_template, options)
|
102
|
+
|
103
|
+
promise = promise.then do |result|
|
104
|
+
http_response = result.response
|
105
|
+
status_code = http_response.status
|
106
|
+
response_content = http_response.body
|
107
|
+
unless status_code == 200
|
108
|
+
error_model = JSON.load(response_content)
|
109
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
110
|
+
end
|
111
|
+
|
112
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
113
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
114
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
115
|
+
# Deserialize Response
|
116
|
+
if status_code == 200
|
117
|
+
begin
|
118
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
119
|
+
result_mapper = Azure::DataFactory::Mgmt::V2018_06_01::Models::ManagedPrivateEndpointListResponse.mapper()
|
120
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
121
|
+
rescue Exception => e
|
122
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
result
|
127
|
+
end
|
128
|
+
|
129
|
+
promise.execute
|
130
|
+
end
|
131
|
+
|
132
|
+
#
|
133
|
+
# Creates or updates a managed private endpoint.
|
134
|
+
#
|
135
|
+
# @param resource_group_name [String] The resource group name.
|
136
|
+
# @param factory_name [String] The factory name.
|
137
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
138
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
139
|
+
# @param managed_private_endpoint [ManagedPrivateEndpointResource] Managed
|
140
|
+
# private endpoint resource definition.
|
141
|
+
# @param if_match [String] ETag of the managed private endpoint entity. Should
|
142
|
+
# only be specified for update, for which it should match existing entity or
|
143
|
+
# can be * for unconditional update.
|
144
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
145
|
+
# will be added to the HTTP request.
|
146
|
+
#
|
147
|
+
# @return [ManagedPrivateEndpointResource] operation results.
|
148
|
+
#
|
149
|
+
def create_or_update(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, managed_private_endpoint, if_match:nil, custom_headers:nil)
|
150
|
+
response = create_or_update_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, managed_private_endpoint, if_match:if_match, custom_headers:custom_headers).value!
|
151
|
+
response.body unless response.nil?
|
152
|
+
end
|
153
|
+
|
154
|
+
#
|
155
|
+
# Creates or updates a managed private endpoint.
|
156
|
+
#
|
157
|
+
# @param resource_group_name [String] The resource group name.
|
158
|
+
# @param factory_name [String] The factory name.
|
159
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
160
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
161
|
+
# @param managed_private_endpoint [ManagedPrivateEndpointResource] Managed
|
162
|
+
# private endpoint resource definition.
|
163
|
+
# @param if_match [String] ETag of the managed private endpoint entity. Should
|
164
|
+
# only be specified for update, for which it should match existing entity or
|
165
|
+
# can be * for unconditional update.
|
166
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
167
|
+
# will be added to the HTTP request.
|
168
|
+
#
|
169
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
170
|
+
#
|
171
|
+
def create_or_update_with_http_info(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, managed_private_endpoint, if_match:nil, custom_headers:nil)
|
172
|
+
create_or_update_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, managed_private_endpoint, if_match:if_match, custom_headers:custom_headers).value!
|
173
|
+
end
|
174
|
+
|
175
|
+
#
|
176
|
+
# Creates or updates a managed private endpoint.
|
177
|
+
#
|
178
|
+
# @param resource_group_name [String] The resource group name.
|
179
|
+
# @param factory_name [String] The factory name.
|
180
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
181
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
182
|
+
# @param managed_private_endpoint [ManagedPrivateEndpointResource] Managed
|
183
|
+
# private endpoint resource definition.
|
184
|
+
# @param if_match [String] ETag of the managed private endpoint entity. Should
|
185
|
+
# only be specified for update, for which it should match existing entity or
|
186
|
+
# can be * for unconditional update.
|
187
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
188
|
+
# to the HTTP request.
|
189
|
+
#
|
190
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
191
|
+
#
|
192
|
+
def create_or_update_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, managed_private_endpoint, if_match:nil, custom_headers:nil)
|
193
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
194
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
195
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
196
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
197
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
198
|
+
fail ArgumentError, 'factory_name is nil' if factory_name.nil?
|
199
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63
|
200
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3
|
201
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil?
|
202
|
+
fail ArgumentError, 'managed_virtual_network_name is nil' if managed_virtual_network_name.nil?
|
203
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'MaxLength': '127'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.length > 127
|
204
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'MinLength': '1'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.length < 1
|
205
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'Pattern': '^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.match(Regexp.new('^^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$$')).nil?
|
206
|
+
fail ArgumentError, 'managed_private_endpoint_name is nil' if managed_private_endpoint_name.nil?
|
207
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'MaxLength': '127'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.length > 127
|
208
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.length < 1
|
209
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'Pattern': '^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.match(Regexp.new('^^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$$')).nil?
|
210
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
211
|
+
fail ArgumentError, 'managed_private_endpoint is nil' if managed_private_endpoint.nil?
|
212
|
+
|
213
|
+
|
214
|
+
request_headers = {}
|
215
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
216
|
+
|
217
|
+
# Set Headers
|
218
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
219
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
220
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
221
|
+
|
222
|
+
# Serialize Request
|
223
|
+
request_mapper = Azure::DataFactory::Mgmt::V2018_06_01::Models::ManagedPrivateEndpointResource.mapper()
|
224
|
+
request_content = @client.serialize(request_mapper, managed_private_endpoint)
|
225
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
226
|
+
|
227
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'
|
228
|
+
|
229
|
+
request_url = @base_url || @client.base_url
|
230
|
+
|
231
|
+
options = {
|
232
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
233
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name,'managedVirtualNetworkName' => managed_virtual_network_name,'managedPrivateEndpointName' => managed_private_endpoint_name},
|
234
|
+
query_params: {'api-version' => @client.api_version},
|
235
|
+
body: request_content,
|
236
|
+
headers: request_headers.merge(custom_headers || {}),
|
237
|
+
base_url: request_url
|
238
|
+
}
|
239
|
+
promise = @client.make_request_async(:put, path_template, options)
|
240
|
+
|
241
|
+
promise = promise.then do |result|
|
242
|
+
http_response = result.response
|
243
|
+
status_code = http_response.status
|
244
|
+
response_content = http_response.body
|
245
|
+
unless status_code == 200
|
246
|
+
error_model = JSON.load(response_content)
|
247
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
248
|
+
end
|
249
|
+
|
250
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
251
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
252
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
253
|
+
# Deserialize Response
|
254
|
+
if status_code == 200
|
255
|
+
begin
|
256
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
257
|
+
result_mapper = Azure::DataFactory::Mgmt::V2018_06_01::Models::ManagedPrivateEndpointResource.mapper()
|
258
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
259
|
+
rescue Exception => e
|
260
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
result
|
265
|
+
end
|
266
|
+
|
267
|
+
promise.execute
|
268
|
+
end
|
269
|
+
|
270
|
+
#
|
271
|
+
# Gets a managed private endpoint.
|
272
|
+
#
|
273
|
+
# @param resource_group_name [String] The resource group name.
|
274
|
+
# @param factory_name [String] The factory name.
|
275
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
276
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
277
|
+
# @param if_none_match [String] ETag of the managed private endpoint entity.
|
278
|
+
# Should only be specified for get. If the ETag matches the existing entity
|
279
|
+
# tag, or if * was provided, then no content will be returned.
|
280
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
281
|
+
# will be added to the HTTP request.
|
282
|
+
#
|
283
|
+
# @return [ManagedPrivateEndpointResource] operation results.
|
284
|
+
#
|
285
|
+
def get(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, if_none_match:nil, custom_headers:nil)
|
286
|
+
response = get_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, if_none_match:if_none_match, custom_headers:custom_headers).value!
|
287
|
+
response.body unless response.nil?
|
288
|
+
end
|
289
|
+
|
290
|
+
#
|
291
|
+
# Gets a managed private endpoint.
|
292
|
+
#
|
293
|
+
# @param resource_group_name [String] The resource group name.
|
294
|
+
# @param factory_name [String] The factory name.
|
295
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
296
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
297
|
+
# @param if_none_match [String] ETag of the managed private endpoint entity.
|
298
|
+
# Should only be specified for get. If the ETag matches the existing entity
|
299
|
+
# tag, or if * was provided, then no content will be returned.
|
300
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
301
|
+
# will be added to the HTTP request.
|
302
|
+
#
|
303
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
304
|
+
#
|
305
|
+
def get_with_http_info(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, if_none_match:nil, custom_headers:nil)
|
306
|
+
get_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, if_none_match:if_none_match, custom_headers:custom_headers).value!
|
307
|
+
end
|
308
|
+
|
309
|
+
#
|
310
|
+
# Gets a managed private endpoint.
|
311
|
+
#
|
312
|
+
# @param resource_group_name [String] The resource group name.
|
313
|
+
# @param factory_name [String] The factory name.
|
314
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
315
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
316
|
+
# @param if_none_match [String] ETag of the managed private endpoint entity.
|
317
|
+
# Should only be specified for get. If the ETag matches the existing entity
|
318
|
+
# tag, or if * was provided, then no content will be returned.
|
319
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
320
|
+
# to the HTTP request.
|
321
|
+
#
|
322
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
323
|
+
#
|
324
|
+
def get_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, if_none_match:nil, custom_headers:nil)
|
325
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
326
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
327
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
328
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
329
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
330
|
+
fail ArgumentError, 'factory_name is nil' if factory_name.nil?
|
331
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63
|
332
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3
|
333
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil?
|
334
|
+
fail ArgumentError, 'managed_virtual_network_name is nil' if managed_virtual_network_name.nil?
|
335
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'MaxLength': '127'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.length > 127
|
336
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'MinLength': '1'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.length < 1
|
337
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'Pattern': '^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.match(Regexp.new('^^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$$')).nil?
|
338
|
+
fail ArgumentError, 'managed_private_endpoint_name is nil' if managed_private_endpoint_name.nil?
|
339
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'MaxLength': '127'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.length > 127
|
340
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.length < 1
|
341
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'Pattern': '^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.match(Regexp.new('^^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$$')).nil?
|
342
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
343
|
+
|
344
|
+
|
345
|
+
request_headers = {}
|
346
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
347
|
+
|
348
|
+
# Set Headers
|
349
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
350
|
+
request_headers['If-None-Match'] = if_none_match unless if_none_match.nil?
|
351
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
352
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'
|
353
|
+
|
354
|
+
request_url = @base_url || @client.base_url
|
355
|
+
|
356
|
+
options = {
|
357
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
358
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name,'managedVirtualNetworkName' => managed_virtual_network_name,'managedPrivateEndpointName' => managed_private_endpoint_name},
|
359
|
+
query_params: {'api-version' => @client.api_version},
|
360
|
+
headers: request_headers.merge(custom_headers || {}),
|
361
|
+
base_url: request_url
|
362
|
+
}
|
363
|
+
promise = @client.make_request_async(:get, path_template, options)
|
364
|
+
|
365
|
+
promise = promise.then do |result|
|
366
|
+
http_response = result.response
|
367
|
+
status_code = http_response.status
|
368
|
+
response_content = http_response.body
|
369
|
+
unless status_code == 200
|
370
|
+
error_model = JSON.load(response_content)
|
371
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
372
|
+
end
|
373
|
+
|
374
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
375
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
376
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
377
|
+
# Deserialize Response
|
378
|
+
if status_code == 200
|
379
|
+
begin
|
380
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
381
|
+
result_mapper = Azure::DataFactory::Mgmt::V2018_06_01::Models::ManagedPrivateEndpointResource.mapper()
|
382
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
383
|
+
rescue Exception => e
|
384
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
385
|
+
end
|
386
|
+
end
|
387
|
+
|
388
|
+
result
|
389
|
+
end
|
390
|
+
|
391
|
+
promise.execute
|
392
|
+
end
|
393
|
+
|
394
|
+
#
|
395
|
+
# Deletes a managed private endpoint.
|
396
|
+
#
|
397
|
+
# @param resource_group_name [String] The resource group name.
|
398
|
+
# @param factory_name [String] The factory name.
|
399
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
400
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
401
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
402
|
+
# will be added to the HTTP request.
|
403
|
+
#
|
404
|
+
#
|
405
|
+
def delete(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, custom_headers:nil)
|
406
|
+
response = delete_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, custom_headers:custom_headers).value!
|
407
|
+
nil
|
408
|
+
end
|
409
|
+
|
410
|
+
#
|
411
|
+
# Deletes a managed private endpoint.
|
412
|
+
#
|
413
|
+
# @param resource_group_name [String] The resource group name.
|
414
|
+
# @param factory_name [String] The factory name.
|
415
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
416
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
417
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
418
|
+
# will be added to the HTTP request.
|
419
|
+
#
|
420
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
421
|
+
#
|
422
|
+
def delete_with_http_info(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, custom_headers:nil)
|
423
|
+
delete_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, custom_headers:custom_headers).value!
|
424
|
+
end
|
425
|
+
|
426
|
+
#
|
427
|
+
# Deletes a managed private endpoint.
|
428
|
+
#
|
429
|
+
# @param resource_group_name [String] The resource group name.
|
430
|
+
# @param factory_name [String] The factory name.
|
431
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
432
|
+
# @param managed_private_endpoint_name [String] Managed private endpoint name
|
433
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
434
|
+
# to the HTTP request.
|
435
|
+
#
|
436
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
437
|
+
#
|
438
|
+
def delete_async(resource_group_name, factory_name, managed_virtual_network_name, managed_private_endpoint_name, custom_headers:nil)
|
439
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
440
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
441
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
442
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
443
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
444
|
+
fail ArgumentError, 'factory_name is nil' if factory_name.nil?
|
445
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'MaxLength': '63'" if !factory_name.nil? && factory_name.length > 63
|
446
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'MinLength': '3'" if !factory_name.nil? && factory_name.length < 3
|
447
|
+
fail ArgumentError, "'factory_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$'" if !factory_name.nil? && factory_name.match(Regexp.new('^^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$$')).nil?
|
448
|
+
fail ArgumentError, 'managed_virtual_network_name is nil' if managed_virtual_network_name.nil?
|
449
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'MaxLength': '127'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.length > 127
|
450
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'MinLength': '1'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.length < 1
|
451
|
+
fail ArgumentError, "'managed_virtual_network_name' should satisfy the constraint - 'Pattern': '^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'" if !managed_virtual_network_name.nil? && managed_virtual_network_name.match(Regexp.new('^^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$$')).nil?
|
452
|
+
fail ArgumentError, 'managed_private_endpoint_name is nil' if managed_private_endpoint_name.nil?
|
453
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'MaxLength': '127'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.length > 127
|
454
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'MinLength': '1'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.length < 1
|
455
|
+
fail ArgumentError, "'managed_private_endpoint_name' should satisfy the constraint - 'Pattern': '^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$'" if !managed_private_endpoint_name.nil? && managed_private_endpoint_name.match(Regexp.new('^^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$$')).nil?
|
456
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
457
|
+
|
458
|
+
|
459
|
+
request_headers = {}
|
460
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
461
|
+
|
462
|
+
# Set Headers
|
463
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
464
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
465
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}'
|
466
|
+
|
467
|
+
request_url = @base_url || @client.base_url
|
468
|
+
|
469
|
+
options = {
|
470
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
471
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'factoryName' => factory_name,'managedVirtualNetworkName' => managed_virtual_network_name,'managedPrivateEndpointName' => managed_private_endpoint_name},
|
472
|
+
query_params: {'api-version' => @client.api_version},
|
473
|
+
headers: request_headers.merge(custom_headers || {}),
|
474
|
+
base_url: request_url
|
475
|
+
}
|
476
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
477
|
+
|
478
|
+
promise = promise.then do |result|
|
479
|
+
http_response = result.response
|
480
|
+
status_code = http_response.status
|
481
|
+
response_content = http_response.body
|
482
|
+
unless status_code == 200 || status_code == 204
|
483
|
+
error_model = JSON.load(response_content)
|
484
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
485
|
+
end
|
486
|
+
|
487
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
488
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
489
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
490
|
+
|
491
|
+
result
|
492
|
+
end
|
493
|
+
|
494
|
+
promise.execute
|
495
|
+
end
|
496
|
+
|
497
|
+
#
|
498
|
+
# Lists managed private endpoints.
|
499
|
+
#
|
500
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
501
|
+
# to List operation.
|
502
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
503
|
+
# will be added to the HTTP request.
|
504
|
+
#
|
505
|
+
# @return [ManagedPrivateEndpointListResponse] operation results.
|
506
|
+
#
|
507
|
+
def list_by_factory_next(next_page_link, custom_headers:nil)
|
508
|
+
response = list_by_factory_next_async(next_page_link, custom_headers:custom_headers).value!
|
509
|
+
response.body unless response.nil?
|
510
|
+
end
|
511
|
+
|
512
|
+
#
|
513
|
+
# Lists managed private endpoints.
|
514
|
+
#
|
515
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
516
|
+
# to List operation.
|
517
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
518
|
+
# will be added to the HTTP request.
|
519
|
+
#
|
520
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
521
|
+
#
|
522
|
+
def list_by_factory_next_with_http_info(next_page_link, custom_headers:nil)
|
523
|
+
list_by_factory_next_async(next_page_link, custom_headers:custom_headers).value!
|
524
|
+
end
|
525
|
+
|
526
|
+
#
|
527
|
+
# Lists managed private endpoints.
|
528
|
+
#
|
529
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
530
|
+
# to List operation.
|
531
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
532
|
+
# to the HTTP request.
|
533
|
+
#
|
534
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
535
|
+
#
|
536
|
+
def list_by_factory_next_async(next_page_link, custom_headers:nil)
|
537
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
538
|
+
|
539
|
+
|
540
|
+
request_headers = {}
|
541
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
542
|
+
|
543
|
+
# Set Headers
|
544
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
545
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
546
|
+
path_template = '{nextLink}'
|
547
|
+
|
548
|
+
request_url = @base_url || @client.base_url
|
549
|
+
|
550
|
+
options = {
|
551
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
552
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
553
|
+
headers: request_headers.merge(custom_headers || {}),
|
554
|
+
base_url: request_url
|
555
|
+
}
|
556
|
+
promise = @client.make_request_async(:get, path_template, options)
|
557
|
+
|
558
|
+
promise = promise.then do |result|
|
559
|
+
http_response = result.response
|
560
|
+
status_code = http_response.status
|
561
|
+
response_content = http_response.body
|
562
|
+
unless status_code == 200
|
563
|
+
error_model = JSON.load(response_content)
|
564
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
565
|
+
end
|
566
|
+
|
567
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
568
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
569
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
570
|
+
# Deserialize Response
|
571
|
+
if status_code == 200
|
572
|
+
begin
|
573
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
574
|
+
result_mapper = Azure::DataFactory::Mgmt::V2018_06_01::Models::ManagedPrivateEndpointListResponse.mapper()
|
575
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
576
|
+
rescue Exception => e
|
577
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
578
|
+
end
|
579
|
+
end
|
580
|
+
|
581
|
+
result
|
582
|
+
end
|
583
|
+
|
584
|
+
promise.execute
|
585
|
+
end
|
586
|
+
|
587
|
+
#
|
588
|
+
# Lists managed private endpoints.
|
589
|
+
#
|
590
|
+
# @param resource_group_name [String] The resource group name.
|
591
|
+
# @param factory_name [String] The factory name.
|
592
|
+
# @param managed_virtual_network_name [String] Managed virtual network name
|
593
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
594
|
+
# will be added to the HTTP request.
|
595
|
+
#
|
596
|
+
# @return [ManagedPrivateEndpointListResponse] which provide lazy access to
|
597
|
+
# pages of the response.
|
598
|
+
#
|
599
|
+
def list_by_factory_as_lazy(resource_group_name, factory_name, managed_virtual_network_name, custom_headers:nil)
|
600
|
+
response = list_by_factory_async(resource_group_name, factory_name, managed_virtual_network_name, custom_headers:custom_headers).value!
|
601
|
+
unless response.nil?
|
602
|
+
page = response.body
|
603
|
+
page.next_method = Proc.new do |next_page_link|
|
604
|
+
list_by_factory_next_async(next_page_link, custom_headers:custom_headers)
|
605
|
+
end
|
606
|
+
page
|
607
|
+
end
|
608
|
+
end
|
609
|
+
|
610
|
+
end
|
611
|
+
end
|