Class: IbmCloudPower::PCloudVPNPoliciesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PCloudVPNPoliciesApi

Returns a new instance of PCloudVPNPoliciesApi.



19
20
21
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#pcloud_ikepolicies_delete(cloud_instance_id, ike_policy_id, opts = {}) ⇒ Object

Delete IKE Policy Delete an IKE Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ike_policy_id (String)

    ID of a IKE Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


28
29
30
31
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 28

def pcloud_ikepolicies_delete(cloud_instance_id, ike_policy_id, opts = {})
  data, _status_code, _headers = pcloud_ikepolicies_delete_with_http_info(cloud_instance_id, ike_policy_id, opts)
  data
end

#pcloud_ikepolicies_delete_with_http_info(cloud_instance_id, ike_policy_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete IKE Policy Delete an IKE Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ike_policy_id (String)

    ID of a IKE Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 39

def pcloud_ikepolicies_delete_with_http_info(cloud_instance_id, ike_policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ikepolicies_delete ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_delete"
  end
  # verify the required parameter 'ike_policy_id' is set
  if @api_client.config.client_side_validation && ike_policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'ike_policy_id' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_delete"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'ike_policy_id' + '}', CGI.escape(ike_policy_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ikepolicies_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ikepolicies_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ikepolicies_get(cloud_instance_id, ike_policy_id, opts = {}) ⇒ IKEPolicy

Get the specified IKE Policy Get an IKE Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ike_policy_id (String)

    ID of a IKE Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



97
98
99
100
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 97

def pcloud_ikepolicies_get(cloud_instance_id, ike_policy_id, opts = {})
  data, _status_code, _headers = pcloud_ikepolicies_get_with_http_info(cloud_instance_id, ike_policy_id, opts)
  data
end

#pcloud_ikepolicies_get_with_http_info(cloud_instance_id, ike_policy_id, opts = {}) ⇒ Array<(IKEPolicy, Integer, Hash)>

Get the specified IKE Policy Get an IKE Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ike_policy_id (String)

    ID of a IKE Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IKEPolicy, Integer, Hash)>)

    IKEPolicy data, response status code and response headers



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 108

def pcloud_ikepolicies_get_with_http_info(cloud_instance_id, ike_policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ikepolicies_get ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_get"
  end
  # verify the required parameter 'ike_policy_id' is set
  if @api_client.config.client_side_validation && ike_policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'ike_policy_id' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_get"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'ike_policy_id' + '}', CGI.escape(ike_policy_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IKEPolicy'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ikepolicies_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ikepolicies_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ikepolicies_getall(cloud_instance_id, opts = {}) ⇒ IKEPolicies

Get all IKE Policies List all IKE Policies with all attributes

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



165
166
167
168
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 165

def pcloud_ikepolicies_getall(cloud_instance_id, opts = {})
  data, _status_code, _headers = pcloud_ikepolicies_getall_with_http_info(cloud_instance_id, opts)
  data
end

#pcloud_ikepolicies_getall_with_http_info(cloud_instance_id, opts = {}) ⇒ Array<(IKEPolicies, Integer, Hash)>

Get all IKE Policies List all IKE Policies with all attributes

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IKEPolicies, Integer, Hash)>)

    IKEPolicies data, response status code and response headers



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 175

def pcloud_ikepolicies_getall_with_http_info(cloud_instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ikepolicies_getall ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_getall"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IKEPolicies'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ikepolicies_getall",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ikepolicies_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ikepolicies_post(cloud_instance_id, body, opts = {}) ⇒ IKEPolicy

Add IKE Policy Add a new IKE Policy

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • body (IKEPolicyCreate)

    Parameters for the creation of a new IKE Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



229
230
231
232
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 229

def pcloud_ikepolicies_post(cloud_instance_id, body, opts = {})
  data, _status_code, _headers = pcloud_ikepolicies_post_with_http_info(cloud_instance_id, body, opts)
  data
end

#pcloud_ikepolicies_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(IKEPolicy, Integer, Hash)>

Add IKE Policy Add a new IKE Policy

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • body (IKEPolicyCreate)

    Parameters for the creation of a new IKE Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IKEPolicy, Integer, Hash)>)

    IKEPolicy data, response status code and response headers



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 240

def pcloud_ikepolicies_post_with_http_info(cloud_instance_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ikepolicies_post ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_post"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_post"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'IKEPolicy'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ikepolicies_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ikepolicies_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ikepolicies_put(cloud_instance_id, ike_policy_id, body, opts = {}) ⇒ IKEPolicy

Update IKE Policy update an IKE Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ike_policy_id (String)

    ID of a IKE Policy

  • body (Hash<String, Object>)

    Parameters for updating IKE Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



304
305
306
307
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 304

def pcloud_ikepolicies_put(cloud_instance_id, ike_policy_id, body, opts = {})
  data, _status_code, _headers = pcloud_ikepolicies_put_with_http_info(cloud_instance_id, ike_policy_id, body, opts)
  data
end

#pcloud_ikepolicies_put_with_http_info(cloud_instance_id, ike_policy_id, body, opts = {}) ⇒ Array<(IKEPolicy, Integer, Hash)>

Update IKE Policy update an IKE Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ike_policy_id (String)

    ID of a IKE Policy

  • body (Hash<String, Object>)

    Parameters for updating IKE Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IKEPolicy, Integer, Hash)>)

    IKEPolicy data, response status code and response headers



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 316

def pcloud_ikepolicies_put_with_http_info(cloud_instance_id, ike_policy_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ikepolicies_put ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_put"
  end
  # verify the required parameter 'ike_policy_id' is set
  if @api_client.config.client_side_validation && ike_policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'ike_policy_id' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_put"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVPNPoliciesApi.pcloud_ikepolicies_put"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'ike_policy_id' + '}', CGI.escape(ike_policy_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'IKEPolicy'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ikepolicies_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ikepolicies_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ipsecpolicies_delete(cloud_instance_id, ipsec_policy_id, opts = {}) ⇒ Object

Delete IPSec Policy Delete an IPSec Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ipsec_policy_id (String)

    ID of a IPSec Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


383
384
385
386
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 383

def pcloud_ipsecpolicies_delete(cloud_instance_id, ipsec_policy_id, opts = {})
  data, _status_code, _headers = pcloud_ipsecpolicies_delete_with_http_info(cloud_instance_id, ipsec_policy_id, opts)
  data
end

#pcloud_ipsecpolicies_delete_with_http_info(cloud_instance_id, ipsec_policy_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete IPSec Policy Delete an IPSec Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ipsec_policy_id (String)

    ID of a IPSec Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 394

def pcloud_ipsecpolicies_delete_with_http_info(cloud_instance_id, ipsec_policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ipsecpolicies_delete ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_delete"
  end
  # verify the required parameter 'ipsec_policy_id' is set
  if @api_client.config.client_side_validation && ipsec_policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'ipsec_policy_id' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_delete"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'ipsec_policy_id' + '}', CGI.escape(ipsec_policy_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ipsecpolicies_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ipsecpolicies_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ipsecpolicies_get(cloud_instance_id, ipsec_policy_id, opts = {}) ⇒ IPSecPolicy

Get the specified IPSec Policy Get an IPSec Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ipsec_policy_id (String)

    ID of a IPSec Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



452
453
454
455
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 452

def pcloud_ipsecpolicies_get(cloud_instance_id, ipsec_policy_id, opts = {})
  data, _status_code, _headers = pcloud_ipsecpolicies_get_with_http_info(cloud_instance_id, ipsec_policy_id, opts)
  data
end

#pcloud_ipsecpolicies_get_with_http_info(cloud_instance_id, ipsec_policy_id, opts = {}) ⇒ Array<(IPSecPolicy, Integer, Hash)>

Get the specified IPSec Policy Get an IPSec Policy (by its unique identifier)

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ipsec_policy_id (String)

    ID of a IPSec Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IPSecPolicy, Integer, Hash)>)

    IPSecPolicy data, response status code and response headers



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 463

def pcloud_ipsecpolicies_get_with_http_info(cloud_instance_id, ipsec_policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ipsecpolicies_get ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_get"
  end
  # verify the required parameter 'ipsec_policy_id' is set
  if @api_client.config.client_side_validation && ipsec_policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'ipsec_policy_id' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_get"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'ipsec_policy_id' + '}', CGI.escape(ipsec_policy_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IPSecPolicy'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ipsecpolicies_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ipsecpolicies_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ipsecpolicies_getall(cloud_instance_id, opts = {}) ⇒ IPSecPolicies

Get all IPSec Policies Get all IPSec Policies with all their attributes

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



520
521
522
523
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 520

def pcloud_ipsecpolicies_getall(cloud_instance_id, opts = {})
  data, _status_code, _headers = pcloud_ipsecpolicies_getall_with_http_info(cloud_instance_id, opts)
  data
end

#pcloud_ipsecpolicies_getall_with_http_info(cloud_instance_id, opts = {}) ⇒ Array<(IPSecPolicies, Integer, Hash)>

Get all IPSec Policies Get all IPSec Policies with all their attributes

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IPSecPolicies, Integer, Hash)>)

    IPSecPolicies data, response status code and response headers



530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 530

def pcloud_ipsecpolicies_getall_with_http_info(cloud_instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ipsecpolicies_getall ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_getall"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IPSecPolicies'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ipsecpolicies_getall",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ipsecpolicies_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ipsecpolicies_post(cloud_instance_id, body, opts = {}) ⇒ IPSecPolicy

Add IPSec Policy Add a new IPSec Policy

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • body (IPSecPolicyCreate)

    Parameters for the creation of a new IPSec Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



584
585
586
587
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 584

def pcloud_ipsecpolicies_post(cloud_instance_id, body, opts = {})
  data, _status_code, _headers = pcloud_ipsecpolicies_post_with_http_info(cloud_instance_id, body, opts)
  data
end

#pcloud_ipsecpolicies_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(IPSecPolicy, Integer, Hash)>

Add IPSec Policy Add a new IPSec Policy

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • body (IPSecPolicyCreate)

    Parameters for the creation of a new IPSec Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IPSecPolicy, Integer, Hash)>)

    IPSecPolicy data, response status code and response headers



595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 595

def pcloud_ipsecpolicies_post_with_http_info(cloud_instance_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ipsecpolicies_post ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_post"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_post"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'IPSecPolicy'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ipsecpolicies_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ipsecpolicies_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pcloud_ipsecpolicies_put(cloud_instance_id, ipsec_policy_id, body, opts = {}) ⇒ IPSecPolicy

Update IPSec Policy update an IPSec Policy

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ipsec_policy_id (String)

    ID of a IPSec Policy

  • body (Hash<String, Object>)

    Parameters for the update of an IPSec Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



659
660
661
662
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 659

def pcloud_ipsecpolicies_put(cloud_instance_id, ipsec_policy_id, body, opts = {})
  data, _status_code, _headers = pcloud_ipsecpolicies_put_with_http_info(cloud_instance_id, ipsec_policy_id, body, opts)
  data
end

#pcloud_ipsecpolicies_put_with_http_info(cloud_instance_id, ipsec_policy_id, body, opts = {}) ⇒ Array<(IPSecPolicy, Integer, Hash)>

Update IPSec Policy update an IPSec Policy

Parameters:

  • cloud_instance_id (String)

    Cloud Instance ID of a PCloud Instance

  • ipsec_policy_id (String)

    ID of a IPSec Policy

  • body (Hash<String, Object>)

    Parameters for the update of an IPSec Policy

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IPSecPolicy, Integer, Hash)>)

    IPSecPolicy data, response status code and response headers



671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/ibm_cloud_power/api/p_cloud_vpn_policies_api.rb', line 671

def pcloud_ipsecpolicies_put_with_http_info(cloud_instance_id, ipsec_policy_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PCloudVPNPoliciesApi.pcloud_ipsecpolicies_put ...'
  end
  # verify the required parameter 'cloud_instance_id' is set
  if @api_client.config.client_side_validation && cloud_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_put"
  end
  # verify the required parameter 'ipsec_policy_id' is set
  if @api_client.config.client_side_validation && ipsec_policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'ipsec_policy_id' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_put"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PCloudVPNPoliciesApi.pcloud_ipsecpolicies_put"
  end
  # resource path
  local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'ipsec_policy_id' + '}', CGI.escape(ipsec_policy_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'IPSecPolicy'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"PCloudVPNPoliciesApi.pcloud_ipsecpolicies_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PCloudVPNPoliciesApi#pcloud_ipsecpolicies_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end