azure_mgmt_healthcare_apis 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/2020-03-30/generated/azure_mgmt_healthcare_apis.rb +69 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/healthcare_apis_management_client.rb +147 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/azure_entity_resource.rb +77 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/check_name_availability_parameters.rb +58 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/error_details.rb +47 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/error_details_internal.rb +71 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/kind.rb +17 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/managed_service_identity_type.rb +16 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/operation.rb +73 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/operation_display.rb +83 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/operation_list_result.rb +102 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/operation_result_status.rb +19 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/operation_results_description.rb +97 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/private_endpoint.rb +47 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/private_endpoint_connection.rb +101 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/private_endpoint_connection_list_result.rb +57 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/private_endpoint_connection_provisioning_state.rb +18 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/private_endpoint_service_connection_status.rb +17 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/private_link_resource.rb +115 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/private_link_resource_list_result.rb +55 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/private_link_service_connection_state.rb +72 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/provisioning_state.rb +23 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/proxy_resource.rb +65 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/public_network_access.rb +16 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/resource.rb +86 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/service_access_policy_entry.rb +50 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/service_authentication_configuration_info.rb +68 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/service_cors_configuration_info.rb +118 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/service_cosmos_db_configuration_info.rb +62 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/service_export_configuration_info.rb +46 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/service_name_unavailability_reason.rb +16 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/services_description.rb +127 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/services_description_list_result.rb +100 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/services_name_availability_info.rb +73 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/services_patch_description.rb +67 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/services_properties.rb +156 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/services_resource.rb +142 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/services_resource_identity.rb +73 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/models/tracked_resource.rb +95 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/module_definition.rb +9 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/operation_results.rb +129 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/operations.rb +219 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/private_endpoint_connections.rb +557 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/private_link_resources.rb +233 -0
- data/lib/2020-03-30/generated/azure_mgmt_healthcare_apis/services.rb +1103 -0
- data/lib/azure_mgmt_healthcare_apis.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/healthcareapis_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/healthcareapis_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/healthcareapis_profile_module.rb +217 -0
- data/lib/version.rb +7 -0
- metadata +169 -0
@@ -0,0 +1,219 @@
|
|
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::HealthcareApis::Mgmt::V2020_03_30
|
7
|
+
#
|
8
|
+
# Azure Healthcare APIs Client
|
9
|
+
#
|
10
|
+
class Operations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Operations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [HealthcareApisManagementClient] reference to the HealthcareApisManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists all of the available Healthcare service REST API operations.
|
26
|
+
#
|
27
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
28
|
+
# will be added to the HTTP request.
|
29
|
+
#
|
30
|
+
# @return [Array<Operation>] operation results.
|
31
|
+
#
|
32
|
+
def list(custom_headers:nil)
|
33
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
34
|
+
first_page.get_all_items
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Lists all of the available Healthcare service REST API operations.
|
39
|
+
#
|
40
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
41
|
+
# will be added to the HTTP request.
|
42
|
+
#
|
43
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
44
|
+
#
|
45
|
+
def list_with_http_info(custom_headers:nil)
|
46
|
+
list_async(custom_headers:custom_headers).value!
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# Lists all of the available Healthcare service REST API operations.
|
51
|
+
#
|
52
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
53
|
+
# to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
56
|
+
#
|
57
|
+
def list_async(custom_headers:nil)
|
58
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
59
|
+
|
60
|
+
|
61
|
+
request_headers = {}
|
62
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
63
|
+
|
64
|
+
# Set Headers
|
65
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
66
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
67
|
+
path_template = 'providers/Microsoft.HealthcareApis/operations'
|
68
|
+
|
69
|
+
request_url = @base_url || @client.base_url
|
70
|
+
|
71
|
+
options = {
|
72
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
73
|
+
query_params: {'api-version' => @client.api_version},
|
74
|
+
headers: request_headers.merge(custom_headers || {}),
|
75
|
+
base_url: request_url
|
76
|
+
}
|
77
|
+
promise = @client.make_request_async(:get, path_template, options)
|
78
|
+
|
79
|
+
promise = promise.then do |result|
|
80
|
+
http_response = result.response
|
81
|
+
status_code = http_response.status
|
82
|
+
response_content = http_response.body
|
83
|
+
unless status_code == 200
|
84
|
+
error_model = JSON.load(response_content)
|
85
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
86
|
+
end
|
87
|
+
|
88
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
89
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
90
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
91
|
+
# Deserialize Response
|
92
|
+
if status_code == 200
|
93
|
+
begin
|
94
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
95
|
+
result_mapper = Azure::HealthcareApis::Mgmt::V2020_03_30::Models::OperationListResult.mapper()
|
96
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
97
|
+
rescue Exception => e
|
98
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
result
|
103
|
+
end
|
104
|
+
|
105
|
+
promise.execute
|
106
|
+
end
|
107
|
+
|
108
|
+
#
|
109
|
+
# Lists all of the available Healthcare service REST API operations.
|
110
|
+
#
|
111
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
112
|
+
# to List operation.
|
113
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
114
|
+
# will be added to the HTTP request.
|
115
|
+
#
|
116
|
+
# @return [OperationListResult] operation results.
|
117
|
+
#
|
118
|
+
def list_next(next_page_link, custom_headers:nil)
|
119
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
120
|
+
response.body unless response.nil?
|
121
|
+
end
|
122
|
+
|
123
|
+
#
|
124
|
+
# Lists all of the available Healthcare service REST API operations.
|
125
|
+
#
|
126
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
127
|
+
# to List operation.
|
128
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
129
|
+
# will be added to the HTTP request.
|
130
|
+
#
|
131
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
132
|
+
#
|
133
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
134
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# Lists all of the available Healthcare service REST API operations.
|
139
|
+
#
|
140
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
141
|
+
# to List operation.
|
142
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
143
|
+
# to the HTTP request.
|
144
|
+
#
|
145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
146
|
+
#
|
147
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
148
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
149
|
+
|
150
|
+
|
151
|
+
request_headers = {}
|
152
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
153
|
+
|
154
|
+
# Set Headers
|
155
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
156
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
157
|
+
path_template = '{nextLink}'
|
158
|
+
|
159
|
+
request_url = @base_url || @client.base_url
|
160
|
+
|
161
|
+
options = {
|
162
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
163
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
164
|
+
headers: request_headers.merge(custom_headers || {}),
|
165
|
+
base_url: request_url
|
166
|
+
}
|
167
|
+
promise = @client.make_request_async(:get, path_template, options)
|
168
|
+
|
169
|
+
promise = promise.then do |result|
|
170
|
+
http_response = result.response
|
171
|
+
status_code = http_response.status
|
172
|
+
response_content = http_response.body
|
173
|
+
unless status_code == 200
|
174
|
+
error_model = JSON.load(response_content)
|
175
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
176
|
+
end
|
177
|
+
|
178
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
179
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
180
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
181
|
+
# Deserialize Response
|
182
|
+
if status_code == 200
|
183
|
+
begin
|
184
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
185
|
+
result_mapper = Azure::HealthcareApis::Mgmt::V2020_03_30::Models::OperationListResult.mapper()
|
186
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
187
|
+
rescue Exception => e
|
188
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
195
|
+
promise.execute
|
196
|
+
end
|
197
|
+
|
198
|
+
#
|
199
|
+
# Lists all of the available Healthcare service REST API operations.
|
200
|
+
#
|
201
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
202
|
+
# will be added to the HTTP request.
|
203
|
+
#
|
204
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
205
|
+
# response.
|
206
|
+
#
|
207
|
+
def list_as_lazy(custom_headers:nil)
|
208
|
+
response = list_async(custom_headers:custom_headers).value!
|
209
|
+
unless response.nil?
|
210
|
+
page = response.body
|
211
|
+
page.next_method = Proc.new do |next_page_link|
|
212
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
213
|
+
end
|
214
|
+
page
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
end
|
@@ -0,0 +1,557 @@
|
|
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::HealthcareApis::Mgmt::V2020_03_30
|
7
|
+
#
|
8
|
+
# Azure Healthcare APIs Client
|
9
|
+
#
|
10
|
+
class PrivateEndpointConnections
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the PrivateEndpointConnections class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [HealthcareApisManagementClient] reference to the HealthcareApisManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists all private endpoint connections for a service.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group that
|
28
|
+
# contains the service instance.
|
29
|
+
# @param resource_name [String] The name of the service instance.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [PrivateEndpointConnectionListResult] operation results.
|
34
|
+
#
|
35
|
+
def list_by_service(resource_group_name, resource_name, custom_headers:nil)
|
36
|
+
response = list_by_service_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
|
37
|
+
response.body unless response.nil?
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Lists all private endpoint connections for a service.
|
42
|
+
#
|
43
|
+
# @param resource_group_name [String] The name of the resource group that
|
44
|
+
# contains the service instance.
|
45
|
+
# @param resource_name [String] The name of the service instance.
|
46
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
47
|
+
# will be added to the HTTP request.
|
48
|
+
#
|
49
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
|
+
#
|
51
|
+
def list_by_service_with_http_info(resource_group_name, resource_name, custom_headers:nil)
|
52
|
+
list_by_service_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Lists all private endpoint connections for a service.
|
57
|
+
#
|
58
|
+
# @param resource_group_name [String] The name of the resource group that
|
59
|
+
# contains the service instance.
|
60
|
+
# @param resource_name [String] The name of the service instance.
|
61
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
62
|
+
# to the HTTP request.
|
63
|
+
#
|
64
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
|
+
#
|
66
|
+
def list_by_service_async(resource_group_name, resource_name, custom_headers:nil)
|
67
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
68
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
69
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
70
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
71
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
72
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
73
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '24'" if !resource_name.nil? && resource_name.length > 24
|
74
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '3'" if !resource_name.nil? && resource_name.length < 3
|
75
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
76
|
+
|
77
|
+
|
78
|
+
request_headers = {}
|
79
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
80
|
+
|
81
|
+
# Set Headers
|
82
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
83
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
84
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections'
|
85
|
+
|
86
|
+
request_url = @base_url || @client.base_url
|
87
|
+
|
88
|
+
options = {
|
89
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
90
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
|
91
|
+
query_params: {'api-version' => @client.api_version},
|
92
|
+
headers: request_headers.merge(custom_headers || {}),
|
93
|
+
base_url: request_url
|
94
|
+
}
|
95
|
+
promise = @client.make_request_async(:get, path_template, options)
|
96
|
+
|
97
|
+
promise = promise.then do |result|
|
98
|
+
http_response = result.response
|
99
|
+
status_code = http_response.status
|
100
|
+
response_content = http_response.body
|
101
|
+
unless status_code == 200
|
102
|
+
error_model = JSON.load(response_content)
|
103
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
104
|
+
end
|
105
|
+
|
106
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
107
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
108
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
109
|
+
# Deserialize Response
|
110
|
+
if status_code == 200
|
111
|
+
begin
|
112
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
113
|
+
result_mapper = Azure::HealthcareApis::Mgmt::V2020_03_30::Models::PrivateEndpointConnectionListResult.mapper()
|
114
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
115
|
+
rescue Exception => e
|
116
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
result
|
121
|
+
end
|
122
|
+
|
123
|
+
promise.execute
|
124
|
+
end
|
125
|
+
|
126
|
+
#
|
127
|
+
# Gets the specified private endpoint connection associated with the service.
|
128
|
+
#
|
129
|
+
# @param resource_group_name [String] The name of the resource group that
|
130
|
+
# contains the service instance.
|
131
|
+
# @param resource_name [String] The name of the service instance.
|
132
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
133
|
+
# endpoint connection associated with the Azure resource
|
134
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
135
|
+
# will be added to the HTTP request.
|
136
|
+
#
|
137
|
+
# @return [PrivateEndpointConnection] operation results.
|
138
|
+
#
|
139
|
+
def get(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
|
140
|
+
response = get_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
141
|
+
response.body unless response.nil?
|
142
|
+
end
|
143
|
+
|
144
|
+
#
|
145
|
+
# Gets the specified private endpoint connection associated with the service.
|
146
|
+
#
|
147
|
+
# @param resource_group_name [String] The name of the resource group that
|
148
|
+
# contains the service instance.
|
149
|
+
# @param resource_name [String] The name of the service instance.
|
150
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
151
|
+
# endpoint connection associated with the Azure resource
|
152
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
153
|
+
# will be added to the HTTP request.
|
154
|
+
#
|
155
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
156
|
+
#
|
157
|
+
def get_with_http_info(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
|
158
|
+
get_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
159
|
+
end
|
160
|
+
|
161
|
+
#
|
162
|
+
# Gets the specified private endpoint connection associated with the service.
|
163
|
+
#
|
164
|
+
# @param resource_group_name [String] The name of the resource group that
|
165
|
+
# contains the service instance.
|
166
|
+
# @param resource_name [String] The name of the service instance.
|
167
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
168
|
+
# endpoint connection associated with the Azure resource
|
169
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
170
|
+
# to the HTTP request.
|
171
|
+
#
|
172
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
173
|
+
#
|
174
|
+
def get_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
|
175
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
176
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
177
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
178
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
179
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
180
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
181
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '24'" if !resource_name.nil? && resource_name.length > 24
|
182
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '3'" if !resource_name.nil? && resource_name.length < 3
|
183
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
184
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
185
|
+
|
186
|
+
|
187
|
+
request_headers = {}
|
188
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
189
|
+
|
190
|
+
# Set Headers
|
191
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
192
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
193
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
194
|
+
|
195
|
+
request_url = @base_url || @client.base_url
|
196
|
+
|
197
|
+
options = {
|
198
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
199
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
|
200
|
+
query_params: {'api-version' => @client.api_version},
|
201
|
+
headers: request_headers.merge(custom_headers || {}),
|
202
|
+
base_url: request_url
|
203
|
+
}
|
204
|
+
promise = @client.make_request_async(:get, path_template, options)
|
205
|
+
|
206
|
+
promise = promise.then do |result|
|
207
|
+
http_response = result.response
|
208
|
+
status_code = http_response.status
|
209
|
+
response_content = http_response.body
|
210
|
+
unless status_code == 200
|
211
|
+
error_model = JSON.load(response_content)
|
212
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
213
|
+
end
|
214
|
+
|
215
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
216
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
217
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
218
|
+
# Deserialize Response
|
219
|
+
if status_code == 200
|
220
|
+
begin
|
221
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
222
|
+
result_mapper = Azure::HealthcareApis::Mgmt::V2020_03_30::Models::PrivateEndpointConnection.mapper()
|
223
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
224
|
+
rescue Exception => e
|
225
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
result
|
230
|
+
end
|
231
|
+
|
232
|
+
promise.execute
|
233
|
+
end
|
234
|
+
|
235
|
+
#
|
236
|
+
# Update the state of the specified private endpoint connection associated with
|
237
|
+
# the service.
|
238
|
+
#
|
239
|
+
# @param resource_group_name [String] The name of the resource group that
|
240
|
+
# contains the service instance.
|
241
|
+
# @param resource_name [String] The name of the service instance.
|
242
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
243
|
+
# endpoint connection associated with the Azure resource
|
244
|
+
# @param properties [PrivateEndpointConnection] The private endpoint connection
|
245
|
+
# properties.
|
246
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
247
|
+
# will be added to the HTTP request.
|
248
|
+
#
|
249
|
+
# @return [PrivateEndpointConnection] operation results.
|
250
|
+
#
|
251
|
+
def create_or_update(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:nil)
|
252
|
+
response = create_or_update_async(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:custom_headers).value!
|
253
|
+
response.body unless response.nil?
|
254
|
+
end
|
255
|
+
|
256
|
+
#
|
257
|
+
# @param resource_group_name [String] The name of the resource group that
|
258
|
+
# contains the service instance.
|
259
|
+
# @param resource_name [String] The name of the service instance.
|
260
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
261
|
+
# endpoint connection associated with the Azure resource
|
262
|
+
# @param properties [PrivateEndpointConnection] The private endpoint connection
|
263
|
+
# properties.
|
264
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
265
|
+
# will be added to the HTTP request.
|
266
|
+
#
|
267
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
268
|
+
# response.
|
269
|
+
#
|
270
|
+
def create_or_update_async(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:nil)
|
271
|
+
# Send request
|
272
|
+
promise = begin_create_or_update_async(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:custom_headers)
|
273
|
+
|
274
|
+
promise = promise.then do |response|
|
275
|
+
# Defining deserialization method.
|
276
|
+
deserialize_method = lambda do |parsed_response|
|
277
|
+
result_mapper = Azure::HealthcareApis::Mgmt::V2020_03_30::Models::PrivateEndpointConnection.mapper()
|
278
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
279
|
+
end
|
280
|
+
|
281
|
+
# Waiting for response.
|
282
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
283
|
+
end
|
284
|
+
|
285
|
+
promise
|
286
|
+
end
|
287
|
+
|
288
|
+
#
|
289
|
+
# Deletes a private endpoint connection.
|
290
|
+
#
|
291
|
+
# @param resource_group_name [String] The name of the resource group that
|
292
|
+
# contains the service instance.
|
293
|
+
# @param resource_name [String] The name of the service instance.
|
294
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
295
|
+
# endpoint connection associated with the Azure resource
|
296
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
297
|
+
# will be added to the HTTP request.
|
298
|
+
#
|
299
|
+
def delete(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
|
300
|
+
response = delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
301
|
+
nil
|
302
|
+
end
|
303
|
+
|
304
|
+
#
|
305
|
+
# @param resource_group_name [String] The name of the resource group that
|
306
|
+
# contains the service instance.
|
307
|
+
# @param resource_name [String] The name of the service instance.
|
308
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
309
|
+
# endpoint connection associated with the Azure resource
|
310
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
311
|
+
# will be added to the HTTP request.
|
312
|
+
#
|
313
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
314
|
+
# response.
|
315
|
+
#
|
316
|
+
def delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
|
317
|
+
# Send request
|
318
|
+
promise = begin_delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers)
|
319
|
+
|
320
|
+
promise = promise.then do |response|
|
321
|
+
# Defining deserialization method.
|
322
|
+
deserialize_method = lambda do |parsed_response|
|
323
|
+
end
|
324
|
+
|
325
|
+
# Waiting for response.
|
326
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
327
|
+
end
|
328
|
+
|
329
|
+
promise
|
330
|
+
end
|
331
|
+
|
332
|
+
#
|
333
|
+
# Update the state of the specified private endpoint connection associated with
|
334
|
+
# the service.
|
335
|
+
#
|
336
|
+
# @param resource_group_name [String] The name of the resource group that
|
337
|
+
# contains the service instance.
|
338
|
+
# @param resource_name [String] The name of the service instance.
|
339
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
340
|
+
# endpoint connection associated with the Azure resource
|
341
|
+
# @param properties [PrivateEndpointConnection] The private endpoint connection
|
342
|
+
# properties.
|
343
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
344
|
+
# will be added to the HTTP request.
|
345
|
+
#
|
346
|
+
# @return [PrivateEndpointConnection] operation results.
|
347
|
+
#
|
348
|
+
def begin_create_or_update(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:nil)
|
349
|
+
response = begin_create_or_update_async(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:custom_headers).value!
|
350
|
+
response.body unless response.nil?
|
351
|
+
end
|
352
|
+
|
353
|
+
#
|
354
|
+
# Update the state of the specified private endpoint connection associated with
|
355
|
+
# the service.
|
356
|
+
#
|
357
|
+
# @param resource_group_name [String] The name of the resource group that
|
358
|
+
# contains the service instance.
|
359
|
+
# @param resource_name [String] The name of the service instance.
|
360
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
361
|
+
# endpoint connection associated with the Azure resource
|
362
|
+
# @param properties [PrivateEndpointConnection] The private endpoint connection
|
363
|
+
# properties.
|
364
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
365
|
+
# will be added to the HTTP request.
|
366
|
+
#
|
367
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
368
|
+
#
|
369
|
+
def begin_create_or_update_with_http_info(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:nil)
|
370
|
+
begin_create_or_update_async(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:custom_headers).value!
|
371
|
+
end
|
372
|
+
|
373
|
+
#
|
374
|
+
# Update the state of the specified private endpoint connection associated with
|
375
|
+
# the service.
|
376
|
+
#
|
377
|
+
# @param resource_group_name [String] The name of the resource group that
|
378
|
+
# contains the service instance.
|
379
|
+
# @param resource_name [String] The name of the service instance.
|
380
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
381
|
+
# endpoint connection associated with the Azure resource
|
382
|
+
# @param properties [PrivateEndpointConnection] The private endpoint connection
|
383
|
+
# properties.
|
384
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
385
|
+
# to the HTTP request.
|
386
|
+
#
|
387
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
388
|
+
#
|
389
|
+
def begin_create_or_update_async(resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers:nil)
|
390
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
391
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
392
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
393
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
394
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
395
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
396
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '24'" if !resource_name.nil? && resource_name.length > 24
|
397
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '3'" if !resource_name.nil? && resource_name.length < 3
|
398
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
399
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
400
|
+
fail ArgumentError, 'properties is nil' if properties.nil?
|
401
|
+
|
402
|
+
|
403
|
+
request_headers = {}
|
404
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
405
|
+
|
406
|
+
# Set Headers
|
407
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
408
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
409
|
+
|
410
|
+
# Serialize Request
|
411
|
+
request_mapper = Azure::HealthcareApis::Mgmt::V2020_03_30::Models::PrivateEndpointConnection.mapper()
|
412
|
+
request_content = @client.serialize(request_mapper, properties)
|
413
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
414
|
+
|
415
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
416
|
+
|
417
|
+
request_url = @base_url || @client.base_url
|
418
|
+
|
419
|
+
options = {
|
420
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
421
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
|
422
|
+
query_params: {'api-version' => @client.api_version},
|
423
|
+
body: request_content,
|
424
|
+
headers: request_headers.merge(custom_headers || {}),
|
425
|
+
base_url: request_url
|
426
|
+
}
|
427
|
+
promise = @client.make_request_async(:put, path_template, options)
|
428
|
+
|
429
|
+
promise = promise.then do |result|
|
430
|
+
http_response = result.response
|
431
|
+
status_code = http_response.status
|
432
|
+
response_content = http_response.body
|
433
|
+
unless status_code == 200
|
434
|
+
error_model = JSON.load(response_content)
|
435
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
436
|
+
end
|
437
|
+
|
438
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
439
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
440
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
441
|
+
# Deserialize Response
|
442
|
+
if status_code == 200
|
443
|
+
begin
|
444
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
445
|
+
result_mapper = Azure::HealthcareApis::Mgmt::V2020_03_30::Models::PrivateEndpointConnection.mapper()
|
446
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
447
|
+
rescue Exception => e
|
448
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
449
|
+
end
|
450
|
+
end
|
451
|
+
|
452
|
+
result
|
453
|
+
end
|
454
|
+
|
455
|
+
promise.execute
|
456
|
+
end
|
457
|
+
|
458
|
+
#
|
459
|
+
# Deletes a private endpoint connection.
|
460
|
+
#
|
461
|
+
# @param resource_group_name [String] The name of the resource group that
|
462
|
+
# contains the service instance.
|
463
|
+
# @param resource_name [String] The name of the service instance.
|
464
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
465
|
+
# endpoint connection associated with the Azure resource
|
466
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
467
|
+
# will be added to the HTTP request.
|
468
|
+
#
|
469
|
+
#
|
470
|
+
def begin_delete(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
|
471
|
+
response = begin_delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
472
|
+
nil
|
473
|
+
end
|
474
|
+
|
475
|
+
#
|
476
|
+
# Deletes a private endpoint connection.
|
477
|
+
#
|
478
|
+
# @param resource_group_name [String] The name of the resource group that
|
479
|
+
# contains the service instance.
|
480
|
+
# @param resource_name [String] The name of the service instance.
|
481
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
482
|
+
# endpoint connection associated with the Azure resource
|
483
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
484
|
+
# will be added to the HTTP request.
|
485
|
+
#
|
486
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
487
|
+
#
|
488
|
+
def begin_delete_with_http_info(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
|
489
|
+
begin_delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
|
490
|
+
end
|
491
|
+
|
492
|
+
#
|
493
|
+
# Deletes a private endpoint connection.
|
494
|
+
#
|
495
|
+
# @param resource_group_name [String] The name of the resource group that
|
496
|
+
# contains the service instance.
|
497
|
+
# @param resource_name [String] The name of the service instance.
|
498
|
+
# @param private_endpoint_connection_name [String] The name of the private
|
499
|
+
# endpoint connection associated with the Azure resource
|
500
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
501
|
+
# to the HTTP request.
|
502
|
+
#
|
503
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
504
|
+
#
|
505
|
+
def begin_delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
|
506
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
507
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
508
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
509
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
510
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
511
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
512
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '24'" if !resource_name.nil? && resource_name.length > 24
|
513
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '3'" if !resource_name.nil? && resource_name.length < 3
|
514
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
515
|
+
fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
|
516
|
+
|
517
|
+
|
518
|
+
request_headers = {}
|
519
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
520
|
+
|
521
|
+
# Set Headers
|
522
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
523
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
524
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
|
525
|
+
|
526
|
+
request_url = @base_url || @client.base_url
|
527
|
+
|
528
|
+
options = {
|
529
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
530
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
|
531
|
+
query_params: {'api-version' => @client.api_version},
|
532
|
+
headers: request_headers.merge(custom_headers || {}),
|
533
|
+
base_url: request_url
|
534
|
+
}
|
535
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
536
|
+
|
537
|
+
promise = promise.then do |result|
|
538
|
+
http_response = result.response
|
539
|
+
status_code = http_response.status
|
540
|
+
response_content = http_response.body
|
541
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
542
|
+
error_model = JSON.load(response_content)
|
543
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
544
|
+
end
|
545
|
+
|
546
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
547
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
548
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
549
|
+
|
550
|
+
result
|
551
|
+
end
|
552
|
+
|
553
|
+
promise.execute
|
554
|
+
end
|
555
|
+
|
556
|
+
end
|
557
|
+
end
|