Class: OCI::Core::VirtualNetworkClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/core/virtual_network_client.rb

Overview

API covering the [Networking](/iaas/Content/Network/Concepts/overview.htm), [Compute](/iaas/Content/Compute/Concepts/computeoverview.htm), and [Block Volume](/iaas/Content/Block/Concepts/overview.htm) services. Use this API to manage resources such as virtual cloud networks (VCNs), compute instances, and block storage volumes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ VirtualNetworkClient

Creates a new VirtualNetworkClient. Notes:

If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified.  If an endpoint is specified, it will be used instead of the
  region. A region may be specified in the config or via or the region parameter. If specified in both, then the
  region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is ‘nil`, which means that an operation will not perform any retries



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
90
# File 'lib/oci/core/virtual_network_client.rb', line 56

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
  config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
  config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)

  if signer.nil?
    signer = OCI::Signer.new(
      config.user,
      config.fingerprint,
      config.tenancy,
      config.key_file,
      pass_phrase: config.pass_phrase,
      private_key_content: config.key_content
    )
  end

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20160918'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "VirtualNetworkClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



16
17
18
# File 'lib/oci/core/virtual_network_client.rb', line 16

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


20
21
22
# File 'lib/oci/core/virtual_network_client.rb', line 20

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


30
31
32
# File 'lib/oci/core/virtual_network_client.rb', line 30

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is ‘nil`, which means that an operation will not perform any retries



26
27
28
# File 'lib/oci/core/virtual_network_client.rb', line 26

def retry_config
  @retry_config
end

Instance Method Details

#add_network_security_group_security_rules(network_security_group_id, add_network_security_group_security_rules_details, opts = {}) ⇒ Response

Adds one or more security rules to the specified network security group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



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
159
160
# File 'lib/oci/core/virtual_network_client.rb', line 124

def add_network_security_group_security_rules(network_security_group_id, add_network_security_group_security_rules_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#add_network_security_group_security_rules.' if logger

  raise "Missing the required parameter 'network_security_group_id' when calling add_network_security_group_security_rules." if network_security_group_id.nil?
  raise "Missing the required parameter 'add_network_security_group_security_rules_details' when calling add_network_security_group_security_rules." if add_network_security_group_security_rules_details.nil?
  raise "Parameter value for 'network_security_group_id' must not be blank" if OCI::Internal::Util.blank_string?(network_security_group_id)

  path = '/networkSecurityGroups/{networkSecurityGroupId}/actions/addSecurityRules'.sub('{networkSecurityGroupId}', network_security_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(add_network_security_group_security_rules_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#add_network_security_group_security_rules') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::AddedNetworkSecurityGroupSecurityRules'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#attach_service_id(service_gateway_id, attach_service_details, opts = {}) ⇒ Response

Adds the specified Service to the list of enabled ‘Service` objects for the specified gateway. You must also set up a route rule with the `cidrBlock` of the `Service` as the rule’s destination and the service gateway as the rule’s target. See RouteTable.

Note: The ‘AttachServiceId` operation is an easy way to add an individual `Service` to the service gateway. Compare it with update_service_gateway, which replaces the entire existing list of enabled `Service` objects with the list that you provide in the `Update` call.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



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
222
223
224
225
226
227
228
229
# File 'lib/oci/core/virtual_network_client.rb', line 192

def attach_service_id(service_gateway_id, attach_service_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#attach_service_id.' if logger

  raise "Missing the required parameter 'service_gateway_id' when calling attach_service_id." if service_gateway_id.nil?
  raise "Missing the required parameter 'attach_service_details' when calling attach_service_id." if attach_service_details.nil?
  raise "Parameter value for 'service_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(service_gateway_id)

  path = '/serviceGateways/{serviceGatewayId}/actions/attachService'.sub('{serviceGatewayId}', service_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(attach_service_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#attach_service_id') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::ServiceGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#bulk_add_virtual_circuit_public_prefixes(virtual_circuit_id, bulk_add_virtual_circuit_public_prefixes_details, opts = {}) ⇒ Response

Adds one or more customer public IP prefixes to the specified public virtual circuit. Use this operation (and not update_virtual_circuit) to add prefixes to the virtual circuit. Oracle must verify the customer’s ownership of each prefix before traffic for that prefix will flow across the virtual circuit.

Parameters:

  • virtual_circuit_id (String)

    The OCID of the virtual circuit.

  • bulk_add_virtual_circuit_public_prefixes_details (OCI::Core::Models::BulkAddVirtualCircuitPublicPrefixesDetails)

    Request with publix prefixes to be added to the virtual circuit

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/core/virtual_network_client.rb', line 251

def bulk_add_virtual_circuit_public_prefixes(virtual_circuit_id, bulk_add_virtual_circuit_public_prefixes_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#bulk_add_virtual_circuit_public_prefixes.' if logger

  raise "Missing the required parameter 'virtual_circuit_id' when calling bulk_add_virtual_circuit_public_prefixes." if virtual_circuit_id.nil?
  raise "Missing the required parameter 'bulk_add_virtual_circuit_public_prefixes_details' when calling bulk_add_virtual_circuit_public_prefixes." if bulk_add_virtual_circuit_public_prefixes_details.nil?
  raise "Parameter value for 'virtual_circuit_id' must not be blank" if OCI::Internal::Util.blank_string?(virtual_circuit_id)

  path = '/virtualCircuits/{virtualCircuitId}/actions/bulkAddPublicPrefixes'.sub('{virtualCircuitId}', virtual_circuit_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(bulk_add_virtual_circuit_public_prefixes_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#bulk_add_virtual_circuit_public_prefixes') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#bulk_delete_virtual_circuit_public_prefixes(virtual_circuit_id, bulk_delete_virtual_circuit_public_prefixes_details, opts = {}) ⇒ Response

Removes one or more customer public IP prefixes from the specified public virtual circuit. Use this operation (and not update_virtual_circuit) to remove prefixes from the virtual circuit. When the virtual circuit’s state switches back to PROVISIONED, Oracle stops advertising the specified prefixes across the connection.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type nil



309
310
311
312
313
314
315
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
# File 'lib/oci/core/virtual_network_client.rb', line 309

def bulk_delete_virtual_circuit_public_prefixes(virtual_circuit_id, bulk_delete_virtual_circuit_public_prefixes_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#bulk_delete_virtual_circuit_public_prefixes.' if logger

  raise "Missing the required parameter 'virtual_circuit_id' when calling bulk_delete_virtual_circuit_public_prefixes." if virtual_circuit_id.nil?
  raise "Missing the required parameter 'bulk_delete_virtual_circuit_public_prefixes_details' when calling bulk_delete_virtual_circuit_public_prefixes." if bulk_delete_virtual_circuit_public_prefixes_details.nil?
  raise "Parameter value for 'virtual_circuit_id' must not be blank" if OCI::Internal::Util.blank_string?(virtual_circuit_id)

  path = '/virtualCircuits/{virtualCircuitId}/actions/bulkDeletePublicPrefixes'.sub('{virtualCircuitId}', virtual_circuit_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(bulk_delete_virtual_circuit_public_prefixes_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#bulk_delete_virtual_circuit_public_prefixes') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_cpe_compartment(cpe_id, change_cpe_compartment_details, opts = {}) ⇒ Response

Moves a CPE object into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# File 'lib/oci/core/virtual_network_client.rb', line 374

def change_cpe_compartment(cpe_id, change_cpe_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_cpe_compartment.' if logger

  raise "Missing the required parameter 'cpe_id' when calling change_cpe_compartment." if cpe_id.nil?
  raise "Missing the required parameter 'change_cpe_compartment_details' when calling change_cpe_compartment." if change_cpe_compartment_details.nil?
  raise "Parameter value for 'cpe_id' must not be blank" if OCI::Internal::Util.blank_string?(cpe_id)

  path = '/cpes/{cpeId}/actions/changeCompartment'.sub('{cpeId}', cpe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_cpe_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_cpe_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_cross_connect_compartment(cross_connect_id, change_cross_connect_compartment_details, opts = {}) ⇒ Response

Moves a cross-connect into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

  • cross_connect_id (String)

    The OCID of the cross-connect.

  • change_cross_connect_compartment_details (OCI::Core::Models::ChangeCrossConnectCompartmentDetails)

    Request to change the compartment of a Cross Connect.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/oci/core/virtual_network_client.rb', line 441

def change_cross_connect_compartment(cross_connect_id, change_cross_connect_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_cross_connect_compartment.' if logger

  raise "Missing the required parameter 'cross_connect_id' when calling change_cross_connect_compartment." if cross_connect_id.nil?
  raise "Missing the required parameter 'change_cross_connect_compartment_details' when calling change_cross_connect_compartment." if change_cross_connect_compartment_details.nil?
  raise "Parameter value for 'cross_connect_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_id)

  path = '/crossConnects/{crossConnectId}/actions/changeCompartment'.sub('{crossConnectId}', cross_connect_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_cross_connect_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_cross_connect_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_cross_connect_group_compartment(cross_connect_group_id, change_cross_connect_group_compartment_details, opts = {}) ⇒ Response

Moves a cross-connect group into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

  • cross_connect_group_id (String)

    The OCID of the cross-connect group.

  • change_cross_connect_group_compartment_details (OCI::Core::Models::ChangeCrossConnectGroupCompartmentDetails)

    Request to change the compartment of a Cross Connect Group.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
# File 'lib/oci/core/virtual_network_client.rb', line 508

def change_cross_connect_group_compartment(cross_connect_group_id, change_cross_connect_group_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_cross_connect_group_compartment.' if logger

  raise "Missing the required parameter 'cross_connect_group_id' when calling change_cross_connect_group_compartment." if cross_connect_group_id.nil?
  raise "Missing the required parameter 'change_cross_connect_group_compartment_details' when calling change_cross_connect_group_compartment." if change_cross_connect_group_compartment_details.nil?
  raise "Parameter value for 'cross_connect_group_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_group_id)

  path = '/crossConnectGroups/{crossConnectGroupId}/actions/changeCompartment'.sub('{crossConnectGroupId}', cross_connect_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_cross_connect_group_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_cross_connect_group_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_ip_sec_connection_compartment(ipsc_id, change_ip_sec_connection_compartment_details, opts = {}) ⇒ Response

Moves an IPSec connection into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/oci/core/virtual_network_client.rb', line 575

def change_ip_sec_connection_compartment(ipsc_id, change_ip_sec_connection_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_ip_sec_connection_compartment.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling change_ip_sec_connection_compartment." if ipsc_id.nil?
  raise "Missing the required parameter 'change_ip_sec_connection_compartment_details' when calling change_ip_sec_connection_compartment." if change_ip_sec_connection_compartment_details.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)

  path = '/ipsecConnections/{ipscId}/actions/changeCompartment'.sub('{ipscId}', ipsc_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_ip_sec_connection_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_ip_sec_connection_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_nat_gateway_compartment(nat_gateway_id, change_nat_gateway_compartment_details, opts = {}) ⇒ Response

Moves a NAT gateway into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/oci/core/virtual_network_client.rb', line 642

def change_nat_gateway_compartment(nat_gateway_id, change_nat_gateway_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_nat_gateway_compartment.' if logger

  raise "Missing the required parameter 'nat_gateway_id' when calling change_nat_gateway_compartment." if nat_gateway_id.nil?
  raise "Missing the required parameter 'change_nat_gateway_compartment_details' when calling change_nat_gateway_compartment." if change_nat_gateway_compartment_details.nil?
  raise "Parameter value for 'nat_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(nat_gateway_id)

  path = '/natGateways/{natGatewayId}/actions/changeCompartment'.sub('{natGatewayId}', nat_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_nat_gateway_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_nat_gateway_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_remote_peering_connection_compartment(remote_peering_connection_id, change_remote_peering_connection_compartment_details, opts = {}) ⇒ Response

Moves a remote peering connection (RPC) into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

  • remote_peering_connection_id (String)

    The OCID of the remote peering connection (RPC).

  • change_remote_peering_connection_compartment_details (OCI::Core::Models::ChangeRemotePeeringConnectionCompartmentDetails)

    Request to change the compartment of a Remote Peering Connection.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File 'lib/oci/core/virtual_network_client.rb', line 709

def change_remote_peering_connection_compartment(remote_peering_connection_id, change_remote_peering_connection_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_remote_peering_connection_compartment.' if logger

  raise "Missing the required parameter 'remote_peering_connection_id' when calling change_remote_peering_connection_compartment." if remote_peering_connection_id.nil?
  raise "Missing the required parameter 'change_remote_peering_connection_compartment_details' when calling change_remote_peering_connection_compartment." if change_remote_peering_connection_compartment_details.nil?
  raise "Parameter value for 'remote_peering_connection_id' must not be blank" if OCI::Internal::Util.blank_string?(remote_peering_connection_id)

  path = '/remotePeeringConnections/{remotePeeringConnectionId}/actions/changeCompartment'.sub('{remotePeeringConnectionId}', remote_peering_connection_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_remote_peering_connection_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_remote_peering_connection_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_route_table_compartment(rt_id, change_route_table_compartment_details, opts = {}) ⇒ Response

Moves a route table into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
# File 'lib/oci/core/virtual_network_client.rb', line 776

def change_route_table_compartment(rt_id, change_route_table_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_route_table_compartment.' if logger

  raise "Missing the required parameter 'rt_id' when calling change_route_table_compartment." if rt_id.nil?
  raise "Missing the required parameter 'change_route_table_compartment_details' when calling change_route_table_compartment." if change_route_table_compartment_details.nil?
  raise "Parameter value for 'rt_id' must not be blank" if OCI::Internal::Util.blank_string?(rt_id)

  path = '/routeTables/{rtId}/actions/changeCompartment'.sub('{rtId}', rt_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_route_table_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_route_table_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_security_list_compartment(security_list_id, change_security_list_compartment_details, opts = {}) ⇒ Response

Moves a security list into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

  • security_list_id (String)

    The OCID of the security list.

  • change_security_list_compartment_details (OCI::Core::Models::ChangeSecurityListCompartmentDetails)

    Request to change the compartment of a given security list.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
# File 'lib/oci/core/virtual_network_client.rb', line 843

def change_security_list_compartment(security_list_id, change_security_list_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_security_list_compartment.' if logger

  raise "Missing the required parameter 'security_list_id' when calling change_security_list_compartment." if security_list_id.nil?
  raise "Missing the required parameter 'change_security_list_compartment_details' when calling change_security_list_compartment." if change_security_list_compartment_details.nil?
  raise "Parameter value for 'security_list_id' must not be blank" if OCI::Internal::Util.blank_string?(security_list_id)

  path = '/securityLists/{securityListId}/actions/changeCompartment'.sub('{securityListId}', security_list_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_security_list_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_security_list_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_service_gateway_compartment(service_gateway_id, change_service_gateway_compartment_details, opts = {}) ⇒ Response

Moves a service gateway into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
# File 'lib/oci/core/virtual_network_client.rb', line 910

def change_service_gateway_compartment(service_gateway_id, change_service_gateway_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_service_gateway_compartment.' if logger

  raise "Missing the required parameter 'service_gateway_id' when calling change_service_gateway_compartment." if service_gateway_id.nil?
  raise "Missing the required parameter 'change_service_gateway_compartment_details' when calling change_service_gateway_compartment." if change_service_gateway_compartment_details.nil?
  raise "Parameter value for 'service_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(service_gateway_id)

  path = '/serviceGateways/{serviceGatewayId}/actions/changeCompartment'.sub('{serviceGatewayId}', service_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_service_gateway_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_service_gateway_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_subnet_compartment(subnet_id, change_subnet_compartment_details, opts = {}) ⇒ Response

Moves a subnet into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

  • subnet_id (String)

    The OCID of the subnet.

  • change_subnet_compartment_details (OCI::Core::Models::ChangeSubnetCompartmentDetails)

    Request to change the compartment of a given subnet.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
# File 'lib/oci/core/virtual_network_client.rb', line 977

def change_subnet_compartment(subnet_id, change_subnet_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_subnet_compartment.' if logger

  raise "Missing the required parameter 'subnet_id' when calling change_subnet_compartment." if subnet_id.nil?
  raise "Missing the required parameter 'change_subnet_compartment_details' when calling change_subnet_compartment." if change_subnet_compartment_details.nil?
  raise "Parameter value for 'subnet_id' must not be blank" if OCI::Internal::Util.blank_string?(subnet_id)

  path = '/subnets/{subnetId}/actions/changeCompartment'.sub('{subnetId}', subnet_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_subnet_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_subnet_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_vcn_compartment(vcn_id, change_vcn_compartment_details, opts = {}) ⇒ Response

Moves a VCN into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
# File 'lib/oci/core/virtual_network_client.rb', line 1044

def change_vcn_compartment(vcn_id, change_vcn_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_vcn_compartment.' if logger

  raise "Missing the required parameter 'vcn_id' when calling change_vcn_compartment." if vcn_id.nil?
  raise "Missing the required parameter 'change_vcn_compartment_details' when calling change_vcn_compartment." if change_vcn_compartment_details.nil?
  raise "Parameter value for 'vcn_id' must not be blank" if OCI::Internal::Util.blank_string?(vcn_id)

  path = '/vcns/{vcnId}/actions/changeCompartment'.sub('{vcnId}', vcn_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_vcn_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_vcn_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_virtual_circuit_compartment(virtual_circuit_id, change_virtual_circuit_compartment_details, opts = {}) ⇒ Response

Moves a virtual circuit into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).

Parameters:

  • virtual_circuit_id (String)

    The OCID of the virtual circuit.

  • change_virtual_circuit_compartment_details (OCI::Core::Models::ChangeVirtualCircuitCompartmentDetails)

    Request to change the compartment of a virtual circuit.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
# File 'lib/oci/core/virtual_network_client.rb', line 1111

def change_virtual_circuit_compartment(virtual_circuit_id, change_virtual_circuit_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_virtual_circuit_compartment.' if logger

  raise "Missing the required parameter 'virtual_circuit_id' when calling change_virtual_circuit_compartment." if virtual_circuit_id.nil?
  raise "Missing the required parameter 'change_virtual_circuit_compartment_details' when calling change_virtual_circuit_compartment." if change_virtual_circuit_compartment_details.nil?
  raise "Parameter value for 'virtual_circuit_id' must not be blank" if OCI::Internal::Util.blank_string?(virtual_circuit_id)

  path = '/virtualCircuits/{virtualCircuitId}/actions/changeCompartment'.sub('{virtualCircuitId}', virtual_circuit_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_virtual_circuit_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_virtual_circuit_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#connect_local_peering_gateways(local_peering_gateway_id, connect_local_peering_gateways_details, opts = {}) ⇒ Response

Connects this local peering gateway (LPG) to another one in the same region.

This operation must be called by the VCN administrator who is designated as the requestor in the peering relationship. The acceptor must implement an Identity and Access Management (IAM) policy that gives the requestor permission to connect to LPGs in the acceptor’s compartment. Without that permission, this operation will fail. For more information, see [VCN Peering](docs.cloud.oracle.com/Content/Network/Tasks/VCNpeering.htm).

Parameters:

  • local_peering_gateway_id (String)

    The OCID of the local peering gateway.

  • connect_local_peering_gateways_details (OCI::Core::Models::ConnectLocalPeeringGatewaysDetails)

    Details regarding the local peering gateway to connect.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type nil



1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
# File 'lib/oci/core/virtual_network_client.rb', line 1175

def connect_local_peering_gateways(local_peering_gateway_id, connect_local_peering_gateways_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#connect_local_peering_gateways.' if logger

  raise "Missing the required parameter 'local_peering_gateway_id' when calling connect_local_peering_gateways." if local_peering_gateway_id.nil?
  raise "Missing the required parameter 'connect_local_peering_gateways_details' when calling connect_local_peering_gateways." if connect_local_peering_gateways_details.nil?
  raise "Parameter value for 'local_peering_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(local_peering_gateway_id)

  path = '/localPeeringGateways/{localPeeringGatewayId}/actions/connect'.sub('{localPeeringGatewayId}', local_peering_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(connect_local_peering_gateways_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#connect_local_peering_gateways') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#connect_remote_peering_connections(remote_peering_connection_id, connect_remote_peering_connections_details, opts = {}) ⇒ Response

Connects this RPC to another one in a different region.

This operation must be called by the VCN administrator who is designated as the requestor in the peering relationship. The acceptor must implement an Identity and Access Management (IAM) policy that gives the requestor permission to connect to RPCs in the acceptor’s compartment. Without that permission, this operation will fail. For more information, see [VCN Peering](docs.cloud.oracle.com/Content/Network/Tasks/VCNpeering.htm).

Parameters:

  • remote_peering_connection_id (String)

    The OCID of the remote peering connection (RPC).

  • connect_remote_peering_connections_details (OCI::Core::Models::ConnectRemotePeeringConnectionsDetails)

    Details to connect peering connection with peering connection from remote region

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type nil



1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
# File 'lib/oci/core/virtual_network_client.rb', line 1237

def connect_remote_peering_connections(remote_peering_connection_id, connect_remote_peering_connections_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#connect_remote_peering_connections.' if logger

  raise "Missing the required parameter 'remote_peering_connection_id' when calling connect_remote_peering_connections." if remote_peering_connection_id.nil?
  raise "Missing the required parameter 'connect_remote_peering_connections_details' when calling connect_remote_peering_connections." if connect_remote_peering_connections_details.nil?
  raise "Parameter value for 'remote_peering_connection_id' must not be blank" if OCI::Internal::Util.blank_string?(remote_peering_connection_id)

  path = '/remotePeeringConnections/{remotePeeringConnectionId}/actions/connect'.sub('{remotePeeringConnectionId}', remote_peering_connection_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(connect_remote_peering_connections_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#connect_remote_peering_connections') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_cpe(create_cpe_details, opts = {}) ⇒ Response

Creates a new virtual customer-premises equipment (CPE) object in the specified compartment. For more information, see [IPSec VPNs](docs.cloud.oracle.com/Content/Network/Tasks/managingIPsec.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the CPE to reside. Notice that the CPE doesn’t have to be in the same compartment as the IPSec connection or other Networking Service components. If you’re not sure which compartment to use, put the CPE in the same compartment as the DRG. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You must provide the public IP address of your on-premises router. See [Configuring Your On-Premises Router for an IPSec VPN](docs.cloud.oracle.com/Content/Network/Tasks/configuringCPE.htm).

You may optionally specify a *display name* for the CPE, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type Cpe



1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
# File 'lib/oci/core/virtual_network_client.rb', line 1310

def create_cpe(create_cpe_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_cpe.' if logger

  raise "Missing the required parameter 'create_cpe_details' when calling create_cpe." if create_cpe_details.nil?

  path = '/cpes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_cpe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_cpe') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Cpe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_cross_connect(create_cross_connect_details, opts = {}) ⇒ Response

Creates a new cross-connect. Oracle recommends you create each cross-connect in a CrossConnectGroup so you can use link aggregation with the connection.

After creating the ‘CrossConnect` object, you need to go the FastConnect location and request to have the physical cable installed. For more information, see [FastConnect Overview](docs.cloud.oracle.com/Content/Network/Concepts/fastconnect.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the cross-connect to reside. If you’re not sure which compartment to use, put the cross-connect in the same compartment with your VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the cross-connect. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
# File 'lib/oci/core/virtual_network_client.rb', line 1387

def create_cross_connect(create_cross_connect_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_cross_connect.' if logger

  raise "Missing the required parameter 'create_cross_connect_details' when calling create_cross_connect." if create_cross_connect_details.nil?

  path = '/crossConnects'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_cross_connect_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_cross_connect') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::CrossConnect'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_cross_connect_group(create_cross_connect_group_details, opts = {}) ⇒ Response

Creates a new cross-connect group to use with Oracle Cloud Infrastructure FastConnect. For more information, see [FastConnect Overview](docs.cloud.oracle.com/Content/Network/Concepts/fastconnect.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the cross-connect group to reside. If you’re not sure which compartment to use, put the cross-connect group in the same compartment with your VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the cross-connect group. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
# File 'lib/oci/core/virtual_network_client.rb', line 1460

def create_cross_connect_group(create_cross_connect_group_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_cross_connect_group.' if logger

  raise "Missing the required parameter 'create_cross_connect_group_details' when calling create_cross_connect_group." if create_cross_connect_group_details.nil?

  path = '/crossConnectGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_cross_connect_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_cross_connect_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::CrossConnectGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_dhcp_options(create_dhcp_details, opts = {}) ⇒ Response

Creates a new set of DHCP options for the specified VCN. For more information, see DhcpOptions.

For the purposes of access control, you must provide the OCID of the compartment where you want the set of DHCP options to reside. Notice that the set of options doesn’t have to be in the same compartment as the VCN, subnets, or other Networking Service components. If you’re not sure which compartment to use, put the set of DHCP options in the same compartment as the VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the set of DHCP options, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
# File 'lib/oci/core/virtual_network_client.rb', line 1530

def create_dhcp_options(create_dhcp_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_dhcp_options.' if logger

  raise "Missing the required parameter 'create_dhcp_details' when calling create_dhcp_options." if create_dhcp_details.nil?

  path = '/dhcps'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_dhcp_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_dhcp_options') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::DhcpOptions'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_drg(create_drg_details, opts = {}) ⇒ Response

Creates a new dynamic routing gateway (DRG) in the specified compartment. For more information, see [Dynamic Routing Gateways (DRGs)](docs.cloud.oracle.com/Content/Network/Tasks/managingDRGs.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the DRG to reside. Notice that the DRG doesn’t have to be in the same compartment as the VCN, the DRG attachment, or other Networking Service components. If you’re not sure which compartment to use, put the DRG in the same compartment as the VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the DRG, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type Drg



1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
# File 'lib/oci/core/virtual_network_client.rb', line 1600

def create_drg(create_drg_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_drg.' if logger

  raise "Missing the required parameter 'create_drg_details' when calling create_drg." if create_drg_details.nil?

  path = '/drgs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_drg_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_drg') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Drg'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_drg_attachment(create_drg_attachment_details, opts = {}) ⇒ Response

Attaches the specified DRG to the specified VCN. A VCN can be attached to only one DRG at a time, and vice versa. The response includes a ‘DrgAttachment` object with its own OCID. For more information about DRGs, see [Dynamic Routing Gateways (DRGs)](docs.cloud.oracle.com/Content/Network/Tasks/managingDRGs.htm).

You may optionally specify a *display name* for the attachment, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

For the purposes of access control, the DRG attachment is automatically placed into the same compartment as the VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
# File 'lib/oci/core/virtual_network_client.rb', line 1669

def create_drg_attachment(create_drg_attachment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_drg_attachment.' if logger

  raise "Missing the required parameter 'create_drg_attachment_details' when calling create_drg_attachment." if create_drg_attachment_details.nil?

  path = '/drgAttachments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_drg_attachment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_drg_attachment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::DrgAttachment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_internet_gateway(create_internet_gateway_details, opts = {}) ⇒ Response

Creates a new internet gateway for the specified VCN. For more information, see [Access to the Internet](docs.cloud.oracle.com/Content/Network/Tasks/managingIGs.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the Internet Gateway to reside. Notice that the internet gateway doesn’t have to be in the same compartment as the VCN or other Networking Service components. If you’re not sure which compartment to use, put the Internet Gateway in the same compartment with the VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the internet gateway, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

For traffic to flow between a subnet and an internet gateway, you must create a route rule accordingly in the subnet’s route table (for example, 0.0.0.0/0 > internet gateway). See update_route_table.

You must specify whether the internet gateway is enabled when you create it. If it’s disabled, that means no traffic will flow to/from the internet even if there’s a route rule that enables that traffic. You can later use update_internet_gateway to easily disable/enable the gateway without changing the route rule.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
# File 'lib/oci/core/virtual_network_client.rb', line 1748

def create_internet_gateway(create_internet_gateway_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_internet_gateway.' if logger

  raise "Missing the required parameter 'create_internet_gateway_details' when calling create_internet_gateway." if create_internet_gateway_details.nil?

  path = '/internetGateways'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_internet_gateway_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_internet_gateway') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::InternetGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_ip_sec_connection(create_ip_sec_connection_details, opts = {}) ⇒ Response

Creates a new IPSec connection between the specified DRG and CPE. For more information, see [IPSec VPNs](docs.cloud.oracle.com/Content/Network/Tasks/managingIPsec.htm).

If you configure at least one tunnel to use static routing, then in the request you must provide at least one valid static route (you’re allowed a maximum of 10). For example: 10.0.0.0/16. If you configure both tunnels to use BGP dynamic routing, you can provide an empty list for the static routes. For more information, see the important note in IPSecConnection.

For the purposes of access control, you must provide the OCID of the compartment where you want the IPSec connection to reside. Notice that the IPSec connection doesn’t have to be in the same compartment as the DRG, CPE, or other Networking Service components. If you’re not sure which compartment to use, put the IPSec connection in the same compartment as the DRG. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the IPSec connection, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

After creating the IPSec connection, you need to configure your on-premises router with tunnel-specific information. For tunnel status and the required configuration information, see:

* {IPSecConnectionTunnel}
* {IPSecConnectionTunnelSharedSecret}

For each tunnel, you need the IP address of Oracle’s VPN headend and the shared secret (that is, the pre-shared key). For more information, see [Configuring Your On-Premises Router for an IPSec VPN](docs.cloud.oracle.com/Content/Network/Tasks/configuringCPE.htm).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
# File 'lib/oci/core/virtual_network_client.rb', line 1835

def create_ip_sec_connection(create_ip_sec_connection_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_ip_sec_connection.' if logger

  raise "Missing the required parameter 'create_ip_sec_connection_details' when calling create_ip_sec_connection." if create_ip_sec_connection_details.nil?

  path = '/ipsecConnections'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_ip_sec_connection_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_ip_sec_connection') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_ipv6(create_ipv6_details, opts = {}) ⇒ Response

Creates an IPv6 for the specified VNIC.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
# File 'lib/oci/core/virtual_network_client.rb', line 1897

def create_ipv6(create_ipv6_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_ipv6.' if logger

  raise "Missing the required parameter 'create_ipv6_details' when calling create_ipv6." if create_ipv6_details.nil?

  path = '/ipv6'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_ipv6_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_ipv6') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Ipv6'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_local_peering_gateway(create_local_peering_gateway_details, opts = {}) ⇒ Response

Creates a new local peering gateway (LPG) for the specified VCN.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
# File 'lib/oci/core/virtual_network_client.rb', line 1957

def create_local_peering_gateway(create_local_peering_gateway_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_local_peering_gateway.' if logger

  raise "Missing the required parameter 'create_local_peering_gateway_details' when calling create_local_peering_gateway." if create_local_peering_gateway_details.nil?

  path = '/localPeeringGateways'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_local_peering_gateway_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_local_peering_gateway') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::LocalPeeringGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_nat_gateway(create_nat_gateway_details, opts = {}) ⇒ Response

Creates a new NAT gateway for the specified VCN. You must also set up a route rule with the NAT gateway as the rule’s target. See RouteTable.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
# File 'lib/oci/core/virtual_network_client.rb', line 2017

def create_nat_gateway(create_nat_gateway_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_nat_gateway.' if logger

  raise "Missing the required parameter 'create_nat_gateway_details' when calling create_nat_gateway." if create_nat_gateway_details.nil?

  path = '/natGateways'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_nat_gateway_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_nat_gateway') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::NatGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_network_security_group(create_network_security_group_details, opts = {}) ⇒ Response

Creates a new network security group for the specified VCN.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
# File 'lib/oci/core/virtual_network_client.rb', line 2076

def create_network_security_group(create_network_security_group_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_network_security_group.' if logger

  raise "Missing the required parameter 'create_network_security_group_details' when calling create_network_security_group." if create_network_security_group_details.nil?

  path = '/networkSecurityGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_network_security_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_network_security_group') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::NetworkSecurityGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_private_ip(create_private_ip_details, opts = {}) ⇒ Response

Creates a secondary private IP for the specified VNIC. For more information about secondary private IPs, see [IP Addresses](docs.cloud.oracle.com/Content/Network/Tasks/managingIPaddresses.htm).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
# File 'lib/oci/core/virtual_network_client.rb', line 2137

def create_private_ip(create_private_ip_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_private_ip.' if logger

  raise "Missing the required parameter 'create_private_ip_details' when calling create_private_ip." if create_private_ip_details.nil?

  path = '/privateIps'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_private_ip_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_private_ip') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::PrivateIp'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_public_ip(create_public_ip_details, opts = {}) ⇒ Response

Creates a public IP. Use the ‘lifetime` property to specify whether it’s an ephemeral or reserved public IP. For information about limits on how many you can create, see [Public IP Addresses](docs.cloud.oracle.com/Content/Network/Tasks/managingpublicIPs.htm).

  • **For an ephemeral public IP assigned to a private IP:** You must also specify a ‘privateIpId`

with the OCID of the primary private IP you want to assign the public IP to. The public IP is created in the same availability domain as the private IP. An ephemeral public IP must always be assigned to a private IP, and only to the primary private IP on a VNIC, not a secondary private IP. Exception: If you create a NatGateway, Oracle automatically assigns the NAT gateway a regional ephemeral public IP that you cannot remove.

  • **For a reserved public IP:** You may also optionally assign the public IP to a private

IP by specifying ‘privateIpId`. Or you can later assign the public IP with update_public_ip.

Note: When assigning a public IP to a private IP, the private IP must not already have a public IP with ‘lifecycleState` = ASSIGNING or ASSIGNED. If it does, an error is returned.

Also, for reserved public IPs, the optional assignment part of this operation is asynchronous. Poll the public IP’s ‘lifecycleState` to determine if the assignment succeeded.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
# File 'lib/oci/core/virtual_network_client.rb', line 2216

def create_public_ip(create_public_ip_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_public_ip.' if logger

  raise "Missing the required parameter 'create_public_ip_details' when calling create_public_ip." if create_public_ip_details.nil?

  path = '/publicIps'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_public_ip_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_public_ip') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::PublicIp'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_remote_peering_connection(create_remote_peering_connection_details, opts = {}) ⇒ Response

Creates a new remote peering connection (RPC) for the specified DRG.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
# File 'lib/oci/core/virtual_network_client.rb', line 2275

def create_remote_peering_connection(create_remote_peering_connection_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_remote_peering_connection.' if logger

  raise "Missing the required parameter 'create_remote_peering_connection_details' when calling create_remote_peering_connection." if create_remote_peering_connection_details.nil?

  path = '/remotePeeringConnections'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_remote_peering_connection_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_remote_peering_connection') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::RemotePeeringConnection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_route_table(create_route_table_details, opts = {}) ⇒ Response

Creates a new route table for the specified VCN. In the request you must also include at least one route rule for the new route table. For information on the number of rules you can have in a route table, see [Service Limits](docs.cloud.oracle.com/Content/General/Concepts/servicelimits.htm). For general information about route tables in your VCN and the types of targets you can use in route rules, see [Route Tables](docs.cloud.oracle.com/Content/Network/Tasks/managingroutetables.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the route table to reside. Notice that the route table doesn’t have to be in the same compartment as the VCN, subnets, or other Networking Service components. If you’re not sure which compartment to use, put the route table in the same compartment as the VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the route table, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
# File 'lib/oci/core/virtual_network_client.rb', line 2348

def create_route_table(create_route_table_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_route_table.' if logger

  raise "Missing the required parameter 'create_route_table_details' when calling create_route_table." if create_route_table_details.nil?

  path = '/routeTables'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_route_table_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_route_table') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::RouteTable'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_security_list(create_security_list_details, opts = {}) ⇒ Response

Creates a new security list for the specified VCN. For more information about security lists, see [Security Lists](docs.cloud.oracle.com/Content/Network/Concepts/securitylists.htm). For information on the number of rules you can have in a security list, see [Service Limits](docs.cloud.oracle.com/Content/General/Concepts/servicelimits.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the security list to reside. Notice that the security list doesn’t have to be in the same compartment as the VCN, subnets, or other Networking Service components. If you’re not sure which compartment to use, put the security list in the same compartment as the VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the security list, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
# File 'lib/oci/core/virtual_network_client.rb', line 2420

def create_security_list(create_security_list_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_security_list.' if logger

  raise "Missing the required parameter 'create_security_list_details' when calling create_security_list." if create_security_list_details.nil?

  path = '/securityLists'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_security_list_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_security_list') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::SecurityList'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_service_gateway(create_service_gateway_details, opts = {}) ⇒ Response

Creates a new service gateway in the specified compartment.

For the purposes of access control, you must provide the OCID of the compartment where you want the service gateway to reside. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the service gateway, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
# File 'lib/oci/core/virtual_network_client.rb', line 2487

def create_service_gateway(create_service_gateway_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_service_gateway.' if logger

  raise "Missing the required parameter 'create_service_gateway_details' when calling create_service_gateway." if create_service_gateway_details.nil?

  path = '/serviceGateways'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_service_gateway_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_service_gateway') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::ServiceGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_subnet(create_subnet_details, opts = {}) ⇒ Response

Creates a new subnet in the specified VCN. You can’t change the size of the subnet after creation, so it’s important to think about the size of subnets you need before creating them. For more information, see [VCNs and Subnets](docs.cloud.oracle.com/Content/Network/Tasks/managingVCNs.htm). For information on the number of subnets you can have in a VCN, see [Service Limits](docs.cloud.oracle.com/Content/General/Concepts/servicelimits.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the subnet to reside. Notice that the subnet doesn’t have to be in the same compartment as the VCN, route tables, or other Networking Service components. If you’re not sure which compartment to use, put the subnet in the same compartment as the VCN. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally associate a route table with the subnet. If you don’t, the subnet will use the VCN’s default route table. For more information about route tables, see [Route Tables](docs.cloud.oracle.com/Content/Network/Tasks/managingroutetables.htm).

You may optionally associate a security list with the subnet. If you don’t, the subnet will use the VCN’s default security list. For more information about security lists, see [Security Lists](docs.cloud.oracle.com/Content/Network/Concepts/securitylists.htm).

You may optionally associate a set of DHCP options with the subnet. If you don’t, the subnet will use the VCN’s default set. For more information about DHCP options, see [DHCP Options](docs.cloud.oracle.com/Content/Network/Tasks/managingDHCP.htm).

You may optionally specify a *display name* for the subnet, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

You can also add a DNS label for the subnet, which is required if you want the Internet and VCN Resolver to resolve hostnames for instances in the subnet. For more information, see [DNS in Your Virtual Cloud Network](docs.cloud.oracle.com/Content/Network/Concepts/dns.htm).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
# File 'lib/oci/core/virtual_network_client.rb', line 2576

def create_subnet(create_subnet_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_subnet.' if logger

  raise "Missing the required parameter 'create_subnet_details' when calling create_subnet." if create_subnet_details.nil?

  path = '/subnets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_subnet_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_subnet') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Subnet'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_vcn(create_vcn_details, opts = {}) ⇒ Response

Creates a new virtual cloud network (VCN). For more information, see [VCNs and Subnets](docs.cloud.oracle.com/Content/Network/Tasks/managingVCNs.htm).

For the VCN you must specify a single, contiguous IPv4 CIDR block. Oracle recommends using one of the private IP address ranges specified in [RFC 1918](tools.ietf.org/html/rfc1918) (10.0.0.0/8, 172.16/12, and 192.168/16). Example: 172.16.0.0/16. The CIDR block can range from /16 to /30, and it must not overlap with your on-premises network. You can’t change the size of the VCN after creation.

For the purposes of access control, you must provide the OCID of the compartment where you want the VCN to reside. Consult an Oracle Cloud Infrastructure administrator in your organization if you’re not sure which compartment to use. Notice that the VCN doesn’t have to be in the same compartment as the subnets or other Networking Service components. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the VCN, otherwise a default is provided. It does not have to be unique, and you can change it. Avoid entering confidential information.

You can also add a DNS label for the VCN, which is required if you want the instances to use the Interent and VCN Resolver option for DNS in the VCN. For more information, see [DNS in Your Virtual Cloud Network](docs.cloud.oracle.com/Content/Network/Concepts/dns.htm).

The VCN automatically comes with a default route table, default security list, and default set of DHCP options. The OCID for each is returned in the response. You can’t delete these default objects, but you can change their contents (that is, change the route rules, security list rules, and so on).

The VCN and subnets you create are not accessible until you attach an internet gateway or set up an IPSec VPN or FastConnect. For more information, see [Overview of the Networking Service](docs.cloud.oracle.com/Content/Network/Concepts/overview.htm).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type Vcn



2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
# File 'lib/oci/core/virtual_network_client.rb', line 2663

def create_vcn(create_vcn_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_vcn.' if logger

  raise "Missing the required parameter 'create_vcn_details' when calling create_vcn." if create_vcn_details.nil?

  path = '/vcns'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_vcn_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_vcn') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Vcn'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_virtual_circuit(create_virtual_circuit_details, opts = {}) ⇒ Response

Creates a new virtual circuit to use with Oracle Cloud Infrastructure FastConnect. For more information, see [FastConnect Overview](docs.cloud.oracle.com/Content/Network/Concepts/fastconnect.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the virtual circuit to reside. If you’re not sure which compartment to use, put the virtual circuit in the same compartment with the DRG it’s using. For more information about compartments and access control, see [Overview of the IAM Service](docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

You may optionally specify a *display name* for the virtual circuit. It does not have to be unique, and you can change it. Avoid entering confidential information.

Important: When creating a virtual circuit, you specify a DRG for the traffic to flow through. Make sure you attach the DRG to your VCN and confirm the VCN’s routing sends traffic to the DRG. Otherwise traffic will not flow. For more information, see [Route Tables](docs.cloud.oracle.com/Content/Network/Tasks/managingroutetables.htm).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:



2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
# File 'lib/oci/core/virtual_network_client.rb', line 2742

def create_virtual_circuit(create_virtual_circuit_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#create_virtual_circuit.' if logger

  raise "Missing the required parameter 'create_virtual_circuit_details' when calling create_virtual_circuit." if create_virtual_circuit_details.nil?

  path = '/virtualCircuits'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_virtual_circuit_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_virtual_circuit') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::VirtualCircuit'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_cpe(cpe_id, opts = {}) ⇒ Response

Deletes the specified CPE object. The CPE must not be connected to a DRG. This is an asynchronous operation. The CPE’s ‘lifecycleState` will change to TERMINATING temporarily until the CPE is completely removed.

Parameters:

  • cpe_id (String)

    The OCID of the CPE.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
# File 'lib/oci/core/virtual_network_client.rb', line 2801

def delete_cpe(cpe_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_cpe.' if logger

  raise "Missing the required parameter 'cpe_id' when calling delete_cpe." if cpe_id.nil?
  raise "Parameter value for 'cpe_id' must not be blank" if OCI::Internal::Util.blank_string?(cpe_id)

  path = '/cpes/{cpeId}'.sub('{cpeId}', cpe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_cpe') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_cross_connect(cross_connect_id, opts = {}) ⇒ Response

Deletes the specified cross-connect. It must not be mapped to a VirtualCircuit.

Parameters:

  • cross_connect_id (String)

    The OCID of the cross-connect.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
# File 'lib/oci/core/virtual_network_client.rb', line 2858

def delete_cross_connect(cross_connect_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_cross_connect.' if logger

  raise "Missing the required parameter 'cross_connect_id' when calling delete_cross_connect." if cross_connect_id.nil?
  raise "Parameter value for 'cross_connect_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_id)

  path = '/crossConnects/{crossConnectId}'.sub('{crossConnectId}', cross_connect_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_cross_connect') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_cross_connect_group(cross_connect_group_id, opts = {}) ⇒ Response

Deletes the specified cross-connect group. It must not contain any cross-connects, and it cannot be mapped to a VirtualCircuit.

Parameters:

  • cross_connect_group_id (String)

    The OCID of the cross-connect group.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
# File 'lib/oci/core/virtual_network_client.rb', line 2916

def delete_cross_connect_group(cross_connect_group_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_cross_connect_group.' if logger

  raise "Missing the required parameter 'cross_connect_group_id' when calling delete_cross_connect_group." if cross_connect_group_id.nil?
  raise "Parameter value for 'cross_connect_group_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_group_id)

  path = '/crossConnectGroups/{crossConnectGroupId}'.sub('{crossConnectGroupId}', cross_connect_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_cross_connect_group') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_dhcp_options(dhcp_id, opts = {}) ⇒ Response

Deletes the specified set of DHCP options, but only if it’s not associated with a subnet. You can’t delete a VCN’s default set of DHCP options.

This is an asynchronous operation. The state of the set of options will switch to TERMINATING temporarily until the set is completely removed.

Parameters:

  • dhcp_id (String)

    The OCID for the set of DHCP options.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
# File 'lib/oci/core/virtual_network_client.rb', line 2976

def delete_dhcp_options(dhcp_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_dhcp_options.' if logger

  raise "Missing the required parameter 'dhcp_id' when calling delete_dhcp_options." if dhcp_id.nil?
  raise "Parameter value for 'dhcp_id' must not be blank" if OCI::Internal::Util.blank_string?(dhcp_id)

  path = '/dhcps/{dhcpId}'.sub('{dhcpId}', dhcp_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_dhcp_options') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_drg(drg_id, opts = {}) ⇒ Response

Deletes the specified DRG. The DRG must not be attached to a VCN or be connected to your on-premise network. Also, there must not be a route table that lists the DRG as a target. This is an asynchronous operation. The DRG’s ‘lifecycleState` will change to TERMINATING temporarily until the DRG is completely removed.

Parameters:

  • drg_id (String)

    The OCID of the DRG.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
# File 'lib/oci/core/virtual_network_client.rb', line 3035

def delete_drg(drg_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_drg.' if logger

  raise "Missing the required parameter 'drg_id' when calling delete_drg." if drg_id.nil?
  raise "Parameter value for 'drg_id' must not be blank" if OCI::Internal::Util.blank_string?(drg_id)

  path = '/drgs/{drgId}'.sub('{drgId}', drg_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_drg') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_drg_attachment(drg_attachment_id, opts = {}) ⇒ Response

Detaches a DRG from a VCN by deleting the corresponding ‘DrgAttachment`. This is an asynchronous operation. The attachment’s ‘lifecycleState` will change to DETACHING temporarily until the attachment is completely removed.

Parameters:

  • drg_attachment_id (String)

    The OCID of the DRG attachment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
# File 'lib/oci/core/virtual_network_client.rb', line 3093

def delete_drg_attachment(drg_attachment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_drg_attachment.' if logger

  raise "Missing the required parameter 'drg_attachment_id' when calling delete_drg_attachment." if drg_attachment_id.nil?
  raise "Parameter value for 'drg_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(drg_attachment_id)

  path = '/drgAttachments/{drgAttachmentId}'.sub('{drgAttachmentId}', drg_attachment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_drg_attachment') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_internet_gateway(ig_id, opts = {}) ⇒ Response

Deletes the specified internet gateway. The internet gateway does not have to be disabled, but there must not be a route table that lists it as a target.

This is an asynchronous operation. The gateway’s ‘lifecycleState` will change to TERMINATING temporarily until the gateway is completely removed.

Parameters:

  • ig_id (String)

    The OCID of the internet gateway.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
# File 'lib/oci/core/virtual_network_client.rb', line 3153

def delete_internet_gateway(ig_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_internet_gateway.' if logger

  raise "Missing the required parameter 'ig_id' when calling delete_internet_gateway." if ig_id.nil?
  raise "Parameter value for 'ig_id' must not be blank" if OCI::Internal::Util.blank_string?(ig_id)

  path = '/internetGateways/{igId}'.sub('{igId}', ig_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_internet_gateway') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_ip_sec_connection(ipsc_id, opts = {}) ⇒ Response

Deletes the specified IPSec connection. If your goal is to disable the IPSec VPN between your VCN and on-premises network, it’s easiest to simply detach the DRG but keep all the IPSec VPN components intact. If you were to delete all the components and then later need to create an IPSec VPN again, you would need to configure your on-premises router again with the new information returned from create_ip_sec_connection.

This is an asynchronous operation. The connection’s ‘lifecycleState` will change to TERMINATING temporarily until the connection is completely removed.

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
# File 'lib/oci/core/virtual_network_client.rb', line 3216

def delete_ip_sec_connection(ipsc_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_ip_sec_connection.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling delete_ip_sec_connection." if ipsc_id.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)

  path = '/ipsecConnections/{ipscId}'.sub('{ipscId}', ipsc_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_ip_sec_connection') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_ipv6(ipv6_id, opts = {}) ⇒ Response

Unassigns and deletes the specified IPv6. You must specify the object’s OCID. The IPv6 address is returned to the subnet’s pool of available addresses.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type nil



3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
# File 'lib/oci/core/virtual_network_client.rb', line 3276

def delete_ipv6(ipv6_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_ipv6.' if logger

  raise "Missing the required parameter 'ipv6_id' when calling delete_ipv6." if ipv6_id.nil?
  raise "Parameter value for 'ipv6_id' must not be blank" if OCI::Internal::Util.blank_string?(ipv6_id)

  path = '/ipv6/{ipv6Id}'.sub('{ipv6Id}', ipv6_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_ipv6') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_local_peering_gateway(local_peering_gateway_id, opts = {}) ⇒ Response

Deletes the specified local peering gateway (LPG).

This is an asynchronous operation; the local peering gateway’s ‘lifecycleState` changes to TERMINATING temporarily until the local peering gateway is completely removed.

Parameters:

  • local_peering_gateway_id (String)

    The OCID of the local peering gateway.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
# File 'lib/oci/core/virtual_network_client.rb', line 3336

def delete_local_peering_gateway(local_peering_gateway_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_local_peering_gateway.' if logger

  raise "Missing the required parameter 'local_peering_gateway_id' when calling delete_local_peering_gateway." if local_peering_gateway_id.nil?
  raise "Parameter value for 'local_peering_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(local_peering_gateway_id)

  path = '/localPeeringGateways/{localPeeringGatewayId}'.sub('{localPeeringGatewayId}', local_peering_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_local_peering_gateway') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_nat_gateway(nat_gateway_id, opts = {}) ⇒ Response

Deletes the specified NAT gateway. The NAT gateway does not have to be disabled, but there must not be a route rule that lists the NAT gateway as a target.

This is an asynchronous operation. The NAT gateway’s ‘lifecycleState` will change to TERMINATING temporarily until the NAT gateway is completely removed.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
# File 'lib/oci/core/virtual_network_client.rb', line 3396

def delete_nat_gateway(nat_gateway_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_nat_gateway.' if logger

  raise "Missing the required parameter 'nat_gateway_id' when calling delete_nat_gateway." if nat_gateway_id.nil?
  raise "Parameter value for 'nat_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(nat_gateway_id)

  path = '/natGateways/{natGatewayId}'.sub('{natGatewayId}', nat_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_nat_gateway') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_network_security_group(network_security_group_id, opts = {}) ⇒ Response

Deletes the specified network security group. The group must not contain any VNICs.

To get a list of the VNICs in a network security group, use list_network_security_group_vnics. Each returned NetworkSecurityGroupVnic object contains both the OCID of the VNIC and the OCID of the VNIC’s parent resource (for example, the Compute instance that the VNIC is attached to).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
# File 'lib/oci/core/virtual_network_client.rb', line 3458

def delete_network_security_group(network_security_group_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_network_security_group.' if logger

  raise "Missing the required parameter 'network_security_group_id' when calling delete_network_security_group." if network_security_group_id.nil?
  raise "Parameter value for 'network_security_group_id' must not be blank" if OCI::Internal::Util.blank_string?(network_security_group_id)

  path = '/networkSecurityGroups/{networkSecurityGroupId}'.sub('{networkSecurityGroupId}', network_security_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_network_security_group') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_private_ip(private_ip_id, opts = {}) ⇒ Response

Unassigns and deletes the specified private IP. You must specify the object’s OCID. The private IP address is returned to the subnet’s pool of available addresses.

This operation cannot be used with primary private IPs, which are automatically unassigned and deleted when the VNIC is terminated.

Important: If a secondary private IP is the [target of a route rule](docs.cloud.oracle.com/Content/Network/Tasks/managingroutetables.htm#privateip), unassigning it from the VNIC causes that route rule to blackhole and the traffic will be dropped.

Parameters:

  • private_ip_id (String)

    The OCID of the private IP.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
# File 'lib/oci/core/virtual_network_client.rb', line 3524

def delete_private_ip(private_ip_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_private_ip.' if logger

  raise "Missing the required parameter 'private_ip_id' when calling delete_private_ip." if private_ip_id.nil?
  raise "Parameter value for 'private_ip_id' must not be blank" if OCI::Internal::Util.blank_string?(private_ip_id)

  path = '/privateIps/{privateIpId}'.sub('{privateIpId}', private_ip_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_private_ip') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_public_ip(public_ip_id, opts = {}) ⇒ Response

Unassigns and deletes the specified public IP (either ephemeral or reserved). You must specify the object’s OCID. The public IP address is returned to the Oracle Cloud Infrastructure public IP pool.

Note: You cannot update, unassign, or delete the public IP that Oracle automatically assigned to an entity for you (such as a load balancer or NAT gateway). The public IP is automatically deleted if the assigned entity is terminated.

For an assigned reserved public IP, the initial unassignment portion of this operation is asynchronous. Poll the public IP’s ‘lifecycleState` to determine if the operation succeeded.

If you want to simply unassign a reserved public IP and return it to your pool of reserved public IPs, instead use update_public_ip.

Parameters:

  • public_ip_id (String)

    The OCID of the public IP.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
# File 'lib/oci/core/virtual_network_client.rb', line 3594

def delete_public_ip(public_ip_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_public_ip.' if logger

  raise "Missing the required parameter 'public_ip_id' when calling delete_public_ip." if public_ip_id.nil?
  raise "Parameter value for 'public_ip_id' must not be blank" if OCI::Internal::Util.blank_string?(public_ip_id)

  path = '/publicIps/{publicIpId}'.sub('{publicIpId}', public_ip_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_public_ip') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_remote_peering_connection(remote_peering_connection_id, opts = {}) ⇒ Response

Deletes the remote peering connection (RPC).

This is an asynchronous operation; the RPC’s ‘lifecycleState` changes to TERMINATING temporarily until the RPC is completely removed.

Parameters:

  • remote_peering_connection_id (String)

    The OCID of the remote peering connection (RPC).

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
# File 'lib/oci/core/virtual_network_client.rb', line 3653

def delete_remote_peering_connection(remote_peering_connection_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_remote_peering_connection.' if logger

  raise "Missing the required parameter 'remote_peering_connection_id' when calling delete_remote_peering_connection." if remote_peering_connection_id.nil?
  raise "Parameter value for 'remote_peering_connection_id' must not be blank" if OCI::Internal::Util.blank_string?(remote_peering_connection_id)

  path = '/remotePeeringConnections/{remotePeeringConnectionId}'.sub('{remotePeeringConnectionId}', remote_peering_connection_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_remote_peering_connection') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_route_table(rt_id, opts = {}) ⇒ Response

Deletes the specified route table, but only if it’s not associated with a subnet. You can’t delete a VCN’s default route table.

This is an asynchronous operation. The route table’s ‘lifecycleState` will change to TERMINATING temporarily until the route table is completely removed.

Parameters:

  • rt_id (String)

    The OCID of the route table.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
# File 'lib/oci/core/virtual_network_client.rb', line 3713

def delete_route_table(rt_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_route_table.' if logger

  raise "Missing the required parameter 'rt_id' when calling delete_route_table." if rt_id.nil?
  raise "Parameter value for 'rt_id' must not be blank" if OCI::Internal::Util.blank_string?(rt_id)

  path = '/routeTables/{rtId}'.sub('{rtId}', rt_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_route_table') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_security_list(security_list_id, opts = {}) ⇒ Response

Deletes the specified security list, but only if it’s not associated with a subnet. You can’t delete a VCN’s default security list.

This is an asynchronous operation. The security list’s ‘lifecycleState` will change to TERMINATING temporarily until the security list is completely removed.

Parameters:

  • security_list_id (String)

    The OCID of the security list.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
# File 'lib/oci/core/virtual_network_client.rb', line 3773

def delete_security_list(security_list_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_security_list.' if logger

  raise "Missing the required parameter 'security_list_id' when calling delete_security_list." if security_list_id.nil?
  raise "Parameter value for 'security_list_id' must not be blank" if OCI::Internal::Util.blank_string?(security_list_id)

  path = '/securityLists/{securityListId}'.sub('{securityListId}', security_list_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_security_list') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_service_gateway(service_gateway_id, opts = {}) ⇒ Response

Deletes the specified service gateway. There must not be a route table that lists the service gateway as a target.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
# File 'lib/oci/core/virtual_network_client.rb', line 3830

def delete_service_gateway(service_gateway_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_service_gateway.' if logger

  raise "Missing the required parameter 'service_gateway_id' when calling delete_service_gateway." if service_gateway_id.nil?
  raise "Parameter value for 'service_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(service_gateway_id)

  path = '/serviceGateways/{serviceGatewayId}'.sub('{serviceGatewayId}', service_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_service_gateway') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_subnet(subnet_id, opts = {}) ⇒ Response

Deletes the specified subnet, but only if there are no instances in the subnet. This is an asynchronous operation. The subnet’s ‘lifecycleState` will change to TERMINATING temporarily. If there are any instances in the subnet, the state will instead change back to AVAILABLE.

Parameters:

  • subnet_id (String)

    The OCID of the subnet.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
# File 'lib/oci/core/virtual_network_client.rb', line 3888

def delete_subnet(subnet_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_subnet.' if logger

  raise "Missing the required parameter 'subnet_id' when calling delete_subnet." if subnet_id.nil?
  raise "Parameter value for 'subnet_id' must not be blank" if OCI::Internal::Util.blank_string?(subnet_id)

  path = '/subnets/{subnetId}'.sub('{subnetId}', subnet_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_subnet') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_vcn(vcn_id, opts = {}) ⇒ Response

Deletes the specified VCN. The VCN must be empty and have no attached gateways. This is an asynchronous operation. The VCN’s ‘lifecycleState` will change to TERMINATING temporarily until the VCN is completely removed.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
# File 'lib/oci/core/virtual_network_client.rb', line 3946

def delete_vcn(vcn_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_vcn.' if logger

  raise "Missing the required parameter 'vcn_id' when calling delete_vcn." if vcn_id.nil?
  raise "Parameter value for 'vcn_id' must not be blank" if OCI::Internal::Util.blank_string?(vcn_id)

  path = '/vcns/{vcnId}'.sub('{vcnId}', vcn_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_vcn') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_virtual_circuit(virtual_circuit_id, opts = {}) ⇒ Response

Deletes the specified virtual circuit.

Important: If you’re using FastConnect via a provider, make sure to also terminate the connection with the provider, or else the provider may continue to bill you.

Parameters:

  • virtual_circuit_id (String)

    The OCID of the virtual circuit.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
# File 'lib/oci/core/virtual_network_client.rb', line 4006

def delete_virtual_circuit(virtual_circuit_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#delete_virtual_circuit.' if logger

  raise "Missing the required parameter 'virtual_circuit_id' when calling delete_virtual_circuit." if virtual_circuit_id.nil?
  raise "Parameter value for 'virtual_circuit_id' must not be blank" if OCI::Internal::Util.blank_string?(virtual_circuit_id)

  path = '/virtualCircuits/{virtualCircuitId}'.sub('{virtualCircuitId}', virtual_circuit_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#delete_virtual_circuit') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#detach_service_id(service_gateway_id, detach_service_details, opts = {}) ⇒ Response

Removes the specified Service from the list of enabled ‘Service` objects for the specified gateway. You do not need to remove any route rules that specify this `Service` object’s ‘cidrBlock` as the destination CIDR. However, consider removing the rules if your intent is to permanently disable use of the `Service` through this service gateway.

Note: The ‘DetachServiceId` operation is an easy way to remove an individual `Service` from the service gateway. Compare it with update_service_gateway, which replaces the entire existing list of enabled `Service` objects with the list that you provide in the `Update` call. `UpdateServiceGateway` also lets you block all traffic through the service gateway without having to remove each of the individual `Service` objects.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
# File 'lib/oci/core/virtual_network_client.rb', line 4074

def detach_service_id(service_gateway_id, detach_service_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#detach_service_id.' if logger

  raise "Missing the required parameter 'service_gateway_id' when calling detach_service_id." if service_gateway_id.nil?
  raise "Missing the required parameter 'detach_service_details' when calling detach_service_id." if detach_service_details.nil?
  raise "Parameter value for 'service_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(service_gateway_id)

  path = '/serviceGateways/{serviceGatewayId}/actions/detachService'.sub('{serviceGatewayId}', service_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(detach_service_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#detach_service_id') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::ServiceGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_cpe(cpe_id, opts = {}) ⇒ Response

Gets the specified CPE’s information.

Parameters:

  • cpe_id (String)

    The OCID of the CPE.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type Cpe



4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
# File 'lib/oci/core/virtual_network_client.rb', line 4128

def get_cpe(cpe_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_cpe.' if logger

  raise "Missing the required parameter 'cpe_id' when calling get_cpe." if cpe_id.nil?
  raise "Parameter value for 'cpe_id' must not be blank" if OCI::Internal::Util.blank_string?(cpe_id)

  path = '/cpes/{cpeId}'.sub('{cpeId}', cpe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_cpe') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Cpe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_cross_connect(cross_connect_id, opts = {}) ⇒ Response

Gets the specified cross-connect’s information.

Parameters:

  • cross_connect_id (String)

    The OCID of the cross-connect.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
# File 'lib/oci/core/virtual_network_client.rb', line 4181

def get_cross_connect(cross_connect_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_cross_connect.' if logger

  raise "Missing the required parameter 'cross_connect_id' when calling get_cross_connect." if cross_connect_id.nil?
  raise "Parameter value for 'cross_connect_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_id)

  path = '/crossConnects/{crossConnectId}'.sub('{crossConnectId}', cross_connect_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_cross_connect') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::CrossConnect'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_cross_connect_group(cross_connect_group_id, opts = {}) ⇒ Response

Gets the specified cross-connect group’s information.

Parameters:

  • cross_connect_group_id (String)

    The OCID of the cross-connect group.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
# File 'lib/oci/core/virtual_network_client.rb', line 4234

def get_cross_connect_group(cross_connect_group_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_cross_connect_group.' if logger

  raise "Missing the required parameter 'cross_connect_group_id' when calling get_cross_connect_group." if cross_connect_group_id.nil?
  raise "Parameter value for 'cross_connect_group_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_group_id)

  path = '/crossConnectGroups/{crossConnectGroupId}'.sub('{crossConnectGroupId}', cross_connect_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_cross_connect_group') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::CrossConnectGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_cross_connect_letter_of_authority(cross_connect_id, opts = {}) ⇒ Response

Gets the Letter of Authority for the specified cross-connect.

Parameters:

  • cross_connect_id (String)

    The OCID of the cross-connect.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
# File 'lib/oci/core/virtual_network_client.rb', line 4287

def get_cross_connect_letter_of_authority(cross_connect_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_cross_connect_letter_of_authority.' if logger

  raise "Missing the required parameter 'cross_connect_id' when calling get_cross_connect_letter_of_authority." if cross_connect_id.nil?
  raise "Parameter value for 'cross_connect_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_id)

  path = '/crossConnects/{crossConnectId}/letterOfAuthority'.sub('{crossConnectId}', cross_connect_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json, text/html'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_cross_connect_letter_of_authority') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::LetterOfAuthority'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_cross_connect_status(cross_connect_id, opts = {}) ⇒ Response

Gets the status of the specified cross-connect.

Parameters:

  • cross_connect_id (String)

    The OCID of the cross-connect.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
# File 'lib/oci/core/virtual_network_client.rb', line 4341

def get_cross_connect_status(cross_connect_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_cross_connect_status.' if logger

  raise "Missing the required parameter 'cross_connect_id' when calling get_cross_connect_status." if cross_connect_id.nil?
  raise "Parameter value for 'cross_connect_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_id)

  path = '/crossConnects/{crossConnectId}/status'.sub('{crossConnectId}', cross_connect_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_cross_connect_status') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::CrossConnectStatus'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_dhcp_options(dhcp_id, opts = {}) ⇒ Response

Gets the specified set of DHCP options.

Parameters:

  • dhcp_id (String)

    The OCID for the set of DHCP options.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
# File 'lib/oci/core/virtual_network_client.rb', line 4394

def get_dhcp_options(dhcp_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_dhcp_options.' if logger

  raise "Missing the required parameter 'dhcp_id' when calling get_dhcp_options." if dhcp_id.nil?
  raise "Parameter value for 'dhcp_id' must not be blank" if OCI::Internal::Util.blank_string?(dhcp_id)

  path = '/dhcps/{dhcpId}'.sub('{dhcpId}', dhcp_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_dhcp_options') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::DhcpOptions'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_drg(drg_id, opts = {}) ⇒ Response

Gets the specified DRG’s information.

Parameters:

  • drg_id (String)

    The OCID of the DRG.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type Drg



4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
# File 'lib/oci/core/virtual_network_client.rb', line 4447

def get_drg(drg_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_drg.' if logger

  raise "Missing the required parameter 'drg_id' when calling get_drg." if drg_id.nil?
  raise "Parameter value for 'drg_id' must not be blank" if OCI::Internal::Util.blank_string?(drg_id)

  path = '/drgs/{drgId}'.sub('{drgId}', drg_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_drg') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Drg'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_drg_attachment(drg_attachment_id, opts = {}) ⇒ Response

Gets the information for the specified ‘DrgAttachment`.

Parameters:

  • drg_attachment_id (String)

    The OCID of the DRG attachment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
# File 'lib/oci/core/virtual_network_client.rb', line 4500

def get_drg_attachment(drg_attachment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_drg_attachment.' if logger

  raise "Missing the required parameter 'drg_attachment_id' when calling get_drg_attachment." if drg_attachment_id.nil?
  raise "Parameter value for 'drg_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(drg_attachment_id)

  path = '/drgAttachments/{drgAttachmentId}'.sub('{drgAttachmentId}', drg_attachment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_drg_attachment') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::DrgAttachment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_fast_connect_provider_service(provider_service_id, opts = {}) ⇒ Response

Gets the specified provider service. For more information, see [FastConnect Overview](docs.cloud.oracle.com/Content/Network/Concepts/fastconnect.htm).

Parameters:

  • provider_service_id (String)

    The OCID of the provider service.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
# File 'lib/oci/core/virtual_network_client.rb', line 4555

def get_fast_connect_provider_service(provider_service_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_fast_connect_provider_service.' if logger

  raise "Missing the required parameter 'provider_service_id' when calling get_fast_connect_provider_service." if provider_service_id.nil?
  raise "Parameter value for 'provider_service_id' must not be blank" if OCI::Internal::Util.blank_string?(provider_service_id)

  path = '/fastConnectProviderServices/{providerServiceId}'.sub('{providerServiceId}', provider_service_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_fast_connect_provider_service') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::FastConnectProviderService'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_fast_connect_provider_service_key(provider_service_id, provider_service_key_name, opts = {}) ⇒ Response

Gets the specified provider service key’s information. Use this operation to validate a provider service key. An invalid key returns a 404 error.

Parameters:

  • provider_service_id (String)

    The OCID of the provider service.

  • provider_service_key_name (String)

    The provider service key that the provider gives you when you set up a virtual circuit connection from the provider to Oracle Cloud Infrastructure. You can set up that connection and get your provider service key at the provider’s website or portal. For the portal location, see the ‘description` attribute of the FastConnectProviderService.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
# File 'lib/oci/core/virtual_network_client.rb', line 4674

def get_fast_connect_provider_service_key(provider_service_id, provider_service_key_name, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_fast_connect_provider_service_key.' if logger

  raise "Missing the required parameter 'provider_service_id' when calling get_fast_connect_provider_service_key." if provider_service_id.nil?
  raise "Missing the required parameter 'provider_service_key_name' when calling get_fast_connect_provider_service_key." if provider_service_key_name.nil?
  raise "Parameter value for 'provider_service_id' must not be blank" if OCI::Internal::Util.blank_string?(provider_service_id)
  raise "Parameter value for 'provider_service_key_name' must not be blank" if OCI::Internal::Util.blank_string?(provider_service_key_name)

  path = '/fastConnectProviderServices/{providerServiceId}/providerServiceKeys/{providerServiceKeyName}'.sub('{providerServiceId}', provider_service_id.to_s).sub('{providerServiceKeyName}', provider_service_key_name.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_fast_connect_provider_service_key') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::FastConnectProviderServiceKey'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_internet_gateway(ig_id, opts = {}) ⇒ Response

Gets the specified internet gateway’s information.

Parameters:

  • ig_id (String)

    The OCID of the internet gateway.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
# File 'lib/oci/core/virtual_network_client.rb', line 4729

def get_internet_gateway(ig_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_internet_gateway.' if logger

  raise "Missing the required parameter 'ig_id' when calling get_internet_gateway." if ig_id.nil?
  raise "Parameter value for 'ig_id' must not be blank" if OCI::Internal::Util.blank_string?(ig_id)

  path = '/internetGateways/{igId}'.sub('{igId}', ig_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_internet_gateway') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::InternetGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_ip_sec_connection(ipsc_id, opts = {}) ⇒ Response

Gets the specified IPSec connection’s basic information, including the static routes for the on-premises router. If you want the status of the connection (whether it’s up or down), use get_ip_sec_connection_tunnel.

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
# File 'lib/oci/core/virtual_network_client.rb', line 4785

def get_ip_sec_connection(ipsc_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_ip_sec_connection.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling get_ip_sec_connection." if ipsc_id.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)

  path = '/ipsecConnections/{ipscId}'.sub('{ipscId}', ipsc_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_ip_sec_connection') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_ip_sec_connection_device_config(ipsc_id, opts = {}) ⇒ Response

Deprecated. To get tunnel information, instead use:

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
# File 'lib/oci/core/virtual_network_client.rb', line 4842

def get_ip_sec_connection_device_config(ipsc_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_ip_sec_connection_device_config.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling get_ip_sec_connection_device_config." if ipsc_id.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)

  path = '/ipsecConnections/{ipscId}/deviceConfig'.sub('{ipscId}', ipsc_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_ip_sec_connection_device_config') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnectionDeviceConfig'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_ip_sec_connection_device_status(ipsc_id, opts = {}) ⇒ Response

Deprecated. To get the tunnel status, instead use get_ip_sec_connection_tunnel.

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
# File 'lib/oci/core/virtual_network_client.rb', line 4897

def get_ip_sec_connection_device_status(ipsc_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_ip_sec_connection_device_status.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling get_ip_sec_connection_device_status." if ipsc_id.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)

  path = '/ipsecConnections/{ipscId}/deviceStatus'.sub('{ipscId}', ipsc_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_ip_sec_connection_device_status') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnectionDeviceStatus'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_ip_sec_connection_tunnel(ipsc_id, tunnel_id, opts = {}) ⇒ Response

Gets the specified tunnel’s information. The resulting object does not include the tunnel’s shared secret (pre-shared key). To retrieve that, use get_ip_sec_connection_tunnel_shared_secret.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
# File 'lib/oci/core/virtual_network_client.rb', line 4954

def get_ip_sec_connection_tunnel(ipsc_id, tunnel_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_ip_sec_connection_tunnel.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling get_ip_sec_connection_tunnel." if ipsc_id.nil?
  raise "Missing the required parameter 'tunnel_id' when calling get_ip_sec_connection_tunnel." if tunnel_id.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)
  raise "Parameter value for 'tunnel_id' must not be blank" if OCI::Internal::Util.blank_string?(tunnel_id)

  path = '/ipsecConnections/{ipscId}/tunnels/{tunnelId}'.sub('{ipscId}', ipsc_id.to_s).sub('{tunnelId}', tunnel_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_ip_sec_connection_tunnel') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnectionTunnel'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_ip_sec_connection_tunnel_shared_secret(ipsc_id, tunnel_id, opts = {}) ⇒ Response

Gets the specified tunnel’s shared secret (pre-shared key). To get other information about the tunnel, use get_ip_sec_connection_tunnel.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
# File 'lib/oci/core/virtual_network_client.rb', line 5012

def get_ip_sec_connection_tunnel_shared_secret(ipsc_id, tunnel_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_ip_sec_connection_tunnel_shared_secret.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling get_ip_sec_connection_tunnel_shared_secret." if ipsc_id.nil?
  raise "Missing the required parameter 'tunnel_id' when calling get_ip_sec_connection_tunnel_shared_secret." if tunnel_id.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)
  raise "Parameter value for 'tunnel_id' must not be blank" if OCI::Internal::Util.blank_string?(tunnel_id)

  path = '/ipsecConnections/{ipscId}/tunnels/{tunnelId}/sharedSecret'.sub('{ipscId}', ipsc_id.to_s).sub('{tunnelId}', tunnel_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_ip_sec_connection_tunnel_shared_secret') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnectionTunnelSharedSecret'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_ipv6(ipv6_id, opts = {}) ⇒ Response

Gets the specified IPv6. You must specify the object’s OCID. Alternatively, you can get the object by using list_ipv6s with the IPv6 address (for example, 2001:0db8:0123:1111:98fe:dcba:9876:4321) and subnet OCID.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
# File 'lib/oci/core/virtual_network_client.rb', line 4614

def get_ipv6(ipv6_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_ipv6.' if logger

  raise "Missing the required parameter 'ipv6_id' when calling get_ipv6." if ipv6_id.nil?
  raise "Parameter value for 'ipv6_id' must not be blank" if OCI::Internal::Util.blank_string?(ipv6_id)

  path = '/ipv6/{ipv6Id}'.sub('{ipv6Id}', ipv6_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_ipv6') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Ipv6'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_local_peering_gateway(local_peering_gateway_id, opts = {}) ⇒ Response

Gets the specified local peering gateway’s information.

Parameters:

  • local_peering_gateway_id (String)

    The OCID of the local peering gateway.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
# File 'lib/oci/core/virtual_network_client.rb', line 5067

def get_local_peering_gateway(local_peering_gateway_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_local_peering_gateway.' if logger

  raise "Missing the required parameter 'local_peering_gateway_id' when calling get_local_peering_gateway." if local_peering_gateway_id.nil?
  raise "Parameter value for 'local_peering_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(local_peering_gateway_id)

  path = '/localPeeringGateways/{localPeeringGatewayId}'.sub('{localPeeringGatewayId}', local_peering_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_local_peering_gateway') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::LocalPeeringGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_nat_gateway(nat_gateway_id, opts = {}) ⇒ Response

Gets the specified NAT gateway’s information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
# File 'lib/oci/core/virtual_network_client.rb', line 5120

def get_nat_gateway(nat_gateway_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_nat_gateway.' if logger

  raise "Missing the required parameter 'nat_gateway_id' when calling get_nat_gateway." if nat_gateway_id.nil?
  raise "Parameter value for 'nat_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(nat_gateway_id)

  path = '/natGateways/{natGatewayId}'.sub('{natGatewayId}', nat_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_nat_gateway') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::NatGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_network_security_group(network_security_group_id, opts = {}) ⇒ Response

Gets the specified network security group’s information.

To list the VNICs in an NSG, see list_network_security_group_vnics.

To list the security rules in an NSG, see list_network_security_group_security_rules.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
# File 'lib/oci/core/virtual_network_client.rb', line 5180

def get_network_security_group(network_security_group_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_network_security_group.' if logger

  raise "Missing the required parameter 'network_security_group_id' when calling get_network_security_group." if network_security_group_id.nil?
  raise "Parameter value for 'network_security_group_id' must not be blank" if OCI::Internal::Util.blank_string?(network_security_group_id)

  path = '/networkSecurityGroups/{networkSecurityGroupId}'.sub('{networkSecurityGroupId}', network_security_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_network_security_group') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::NetworkSecurityGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_private_ip(private_ip_id, opts = {}) ⇒ Response

Gets the specified private IP. You must specify the object’s OCID. Alternatively, you can get the object by using list_private_ips with the private IP address (for example, 10.0.3.3) and subnet OCID.

Parameters:

  • private_ip_id (String)

    The OCID of the private IP.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
# File 'lib/oci/core/virtual_network_client.rb', line 5237

def get_private_ip(private_ip_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_private_ip.' if logger

  raise "Missing the required parameter 'private_ip_id' when calling get_private_ip." if private_ip_id.nil?
  raise "Parameter value for 'private_ip_id' must not be blank" if OCI::Internal::Util.blank_string?(private_ip_id)

  path = '/privateIps/{privateIpId}'.sub('{privateIpId}', private_ip_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_private_ip') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::PrivateIp'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_public_ip(public_ip_id, opts = {}) ⇒ Response

Gets the specified public IP. You must specify the object’s OCID.

Alternatively, you can get the object by using get_public_ip_by_ip_address with the public IP address (for example, 129.146.2.1).

Or you can use get_public_ip_by_private_ip_id with the OCID of the private IP that the public IP is assigned to.

Note: If you’re fetching a reserved public IP that is in the process of being moved to a different private IP, the service returns the public IP object with ‘lifecycleState` = ASSIGNING and `assignedEntityId` = OCID of the target private IP.

Parameters:

  • public_ip_id (String)

    The OCID of the public IP.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
# File 'lib/oci/core/virtual_network_client.rb', line 5301

def get_public_ip(public_ip_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_public_ip.' if logger

  raise "Missing the required parameter 'public_ip_id' when calling get_public_ip." if public_ip_id.nil?
  raise "Parameter value for 'public_ip_id' must not be blank" if OCI::Internal::Util.blank_string?(public_ip_id)

  path = '/publicIps/{publicIpId}'.sub('{publicIpId}', public_ip_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_public_ip') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::PublicIp'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_public_ip_by_ip_address(get_public_ip_by_ip_address_details, opts = {}) ⇒ Response

Gets the public IP based on the public IP address (for example, 129.146.2.1).

Note: If you’re fetching a reserved public IP that is in the process of being moved to a different private IP, the service returns the public IP object with ‘lifecycleState` = ASSIGNING and `assignedEntityId` = OCID of the target private IP.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
# File 'lib/oci/core/virtual_network_client.rb', line 5359

def get_public_ip_by_ip_address(get_public_ip_by_ip_address_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_public_ip_by_ip_address.' if logger

  raise "Missing the required parameter 'get_public_ip_by_ip_address_details' when calling get_public_ip_by_ip_address." if get_public_ip_by_ip_address_details.nil?

  path = '/publicIps/actions/getByIpAddress'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(get_public_ip_by_ip_address_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_public_ip_by_ip_address') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::PublicIp'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_public_ip_by_private_ip_id(get_public_ip_by_private_ip_id_details, opts = {}) ⇒ Response

Gets the public IP assigned to the specified private IP. You must specify the OCID of the private IP. If no public IP is assigned, a 404 is returned.

Note: If you’re fetching a reserved public IP that is in the process of being moved to a different private IP, and you provide the OCID of the original private IP, this operation returns a 404. If you instead provide the OCID of the target private IP, or if you instead call get_public_ip or get_public_ip_by_ip_address, the service returns the public IP object with ‘lifecycleState` = ASSIGNING and `assignedEntityId` = OCID of the target private IP.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
# File 'lib/oci/core/virtual_network_client.rb', line 5422

def get_public_ip_by_private_ip_id(get_public_ip_by_private_ip_id_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_public_ip_by_private_ip_id.' if logger

  raise "Missing the required parameter 'get_public_ip_by_private_ip_id_details' when calling get_public_ip_by_private_ip_id." if get_public_ip_by_private_ip_id_details.nil?

  path = '/publicIps/actions/getByPrivateIpId'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(get_public_ip_by_private_ip_id_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_public_ip_by_private_ip_id') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::PublicIp'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_remote_peering_connection(remote_peering_connection_id, opts = {}) ⇒ Response

Get the specified remote peering connection’s information.

Parameters:

  • remote_peering_connection_id (String)

    The OCID of the remote peering connection (RPC).

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
# File 'lib/oci/core/virtual_network_client.rb', line 5475

def get_remote_peering_connection(remote_peering_connection_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_remote_peering_connection.' if logger

  raise "Missing the required parameter 'remote_peering_connection_id' when calling get_remote_peering_connection." if remote_peering_connection_id.nil?
  raise "Parameter value for 'remote_peering_connection_id' must not be blank" if OCI::Internal::Util.blank_string?(remote_peering_connection_id)

  path = '/remotePeeringConnections/{remotePeeringConnectionId}'.sub('{remotePeeringConnectionId}', remote_peering_connection_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_remote_peering_connection') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::RemotePeeringConnection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_route_table(rt_id, opts = {}) ⇒ Response

Gets the specified route table’s information.

Parameters:

  • rt_id (String)

    The OCID of the route table.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
# File 'lib/oci/core/virtual_network_client.rb', line 5528

def get_route_table(rt_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_route_table.' if logger

  raise "Missing the required parameter 'rt_id' when calling get_route_table." if rt_id.nil?
  raise "Parameter value for 'rt_id' must not be blank" if OCI::Internal::Util.blank_string?(rt_id)

  path = '/routeTables/{rtId}'.sub('{rtId}', rt_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_route_table') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::RouteTable'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_security_list(security_list_id, opts = {}) ⇒ Response

Gets the specified security list’s information.

Parameters:

  • security_list_id (String)

    The OCID of the security list.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
# File 'lib/oci/core/virtual_network_client.rb', line 5581

def get_security_list(security_list_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_security_list.' if logger

  raise "Missing the required parameter 'security_list_id' when calling get_security_list." if security_list_id.nil?
  raise "Parameter value for 'security_list_id' must not be blank" if OCI::Internal::Util.blank_string?(security_list_id)

  path = '/securityLists/{securityListId}'.sub('{securityListId}', security_list_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_security_list') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::SecurityList'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_service(service_id, opts = {}) ⇒ Response

Gets the specified Service object.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
# File 'lib/oci/core/virtual_network_client.rb', line 5635

def get_service(service_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_service.' if logger

  raise "Missing the required parameter 'service_id' when calling get_service." if service_id.nil?
  raise "Parameter value for 'service_id' must not be blank" if OCI::Internal::Util.blank_string?(service_id)

  path = '/services/{serviceId}'.sub('{serviceId}', service_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_service') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Service'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_service_gateway(service_gateway_id, opts = {}) ⇒ Response

Gets the specified service gateway’s information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
# File 'lib/oci/core/virtual_network_client.rb', line 5688

def get_service_gateway(service_gateway_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_service_gateway.' if logger

  raise "Missing the required parameter 'service_gateway_id' when calling get_service_gateway." if service_gateway_id.nil?
  raise "Parameter value for 'service_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(service_gateway_id)

  path = '/serviceGateways/{serviceGatewayId}'.sub('{serviceGatewayId}', service_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_service_gateway') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::ServiceGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_subnet(subnet_id, opts = {}) ⇒ Response

Gets the specified subnet’s information.

Parameters:

  • subnet_id (String)

    The OCID of the subnet.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
# File 'lib/oci/core/virtual_network_client.rb', line 5741

def get_subnet(subnet_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_subnet.' if logger

  raise "Missing the required parameter 'subnet_id' when calling get_subnet." if subnet_id.nil?
  raise "Parameter value for 'subnet_id' must not be blank" if OCI::Internal::Util.blank_string?(subnet_id)

  path = '/subnets/{subnetId}'.sub('{subnetId}', subnet_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_subnet') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Subnet'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_vcn(vcn_id, opts = {}) ⇒ Response

Gets the specified VCN’s information.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type Vcn



5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
# File 'lib/oci/core/virtual_network_client.rb', line 5794

def get_vcn(vcn_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_vcn.' if logger

  raise "Missing the required parameter 'vcn_id' when calling get_vcn." if vcn_id.nil?
  raise "Parameter value for 'vcn_id' must not be blank" if OCI::Internal::Util.blank_string?(vcn_id)

  path = '/vcns/{vcnId}'.sub('{vcnId}', vcn_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_vcn') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Vcn'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_virtual_circuit(virtual_circuit_id, opts = {}) ⇒ Response

Gets the specified virtual circuit’s information.

Parameters:

  • virtual_circuit_id (String)

    The OCID of the virtual circuit.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
# File 'lib/oci/core/virtual_network_client.rb', line 5847

def get_virtual_circuit(virtual_circuit_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_virtual_circuit.' if logger

  raise "Missing the required parameter 'virtual_circuit_id' when calling get_virtual_circuit." if virtual_circuit_id.nil?
  raise "Parameter value for 'virtual_circuit_id' must not be blank" if OCI::Internal::Util.blank_string?(virtual_circuit_id)

  path = '/virtualCircuits/{virtualCircuitId}'.sub('{virtualCircuitId}', virtual_circuit_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_virtual_circuit') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::VirtualCircuit'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_vnic(vnic_id, opts = {}) ⇒ Response

Gets the information for the specified virtual network interface card (VNIC). You can get the VNIC OCID from the list_vnic_attachments operation.

Parameters:

  • vnic_id (String)

    The OCID of the VNIC.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
# File 'lib/oci/core/virtual_network_client.rb', line 5904

def get_vnic(vnic_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#get_vnic.' if logger

  raise "Missing the required parameter 'vnic_id' when calling get_vnic." if vnic_id.nil?
  raise "Parameter value for 'vnic_id' must not be blank" if OCI::Internal::Util.blank_string?(vnic_id)

  path = '/vnics/{vnicId}'.sub('{vnicId}', vnic_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#get_vnic') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Vnic'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_allowed_peer_regions_for_remote_peering(opts = {}) ⇒ Response

Lists the regions that support remote VCN peering (which is peering across regions). For more information, see [VCN Peering](docs.cloud.oracle.com/Content/Network/Tasks/VCNpeering.htm).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
# File 'lib/oci/core/virtual_network_client.rb', line 5958

def list_allowed_peer_regions_for_remote_peering(opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_allowed_peer_regions_for_remote_peering.' if logger


  path = '/allowedPeerRegionsForRemotePeering'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_allowed_peer_regions_for_remote_peering') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::PeerRegionForRemotePeering>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_cpes(compartment_id, opts = {}) ⇒ Response

Lists the customer-premises equipment objects (CPEs) in the specified compartment.

Parameters:

Options Hash (opts):

Returns:

  • (Response)

    A Response object with data of type Array<Cpe>



6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
# File 'lib/oci/core/virtual_network_client.rb', line 6019

def list_cpes(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_cpes.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_cpes." if compartment_id.nil?

  path = '/cpes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_cpes') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::Cpe>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_cross_connect_groups(compartment_id, opts = {}) ⇒ Response

Lists the cross-connect groups in the specified compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to return only resources that match the specified lifecycle state. The value is case insensitive.

Returns:



6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
# File 'lib/oci/core/virtual_network_client.rb', line 6101

def list_cross_connect_groups(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_cross_connect_groups.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_cross_connect_groups." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::CrossConnectGroup::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::CrossConnectGroup::LIFECYCLE_STATE_ENUM.'
  end

  path = '/crossConnectGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_cross_connect_groups') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::CrossConnectGroup>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_cross_connect_locations(compartment_id, opts = {}) ⇒ Response

Lists the available FastConnect locations for cross-connect installation. You need this information so you can specify your desired location when you create a cross-connect.

Parameters:

Options Hash (opts):

Returns:



6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
# File 'lib/oci/core/virtual_network_client.rb', line 6182

def list_cross_connect_locations(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_cross_connect_locations.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_cross_connect_locations." if compartment_id.nil?

  path = '/crossConnectLocations'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_cross_connect_locations') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::CrossConnectLocation>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_cross_connects(compartment_id, opts = {}) ⇒ Response

Lists the cross-connects in the specified compartment. You can filter the list by specifying the OCID of a cross-connect group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :cross_connect_group_id (String)

    The OCID of the cross-connect group.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to return only resources that match the specified lifecycle state. The value is case insensitive.

Returns:



6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
# File 'lib/oci/core/virtual_network_client.rb', line 6266

def list_cross_connects(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_cross_connects.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_cross_connects." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::CrossConnect::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::CrossConnect::LIFECYCLE_STATE_ENUM.'
  end

  path = '/crossConnects'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:crossConnectGroupId] = opts[:cross_connect_group_id] if opts[:cross_connect_group_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_cross_connects') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::CrossConnect>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_crossconnect_port_speed_shapes(compartment_id, opts = {}) ⇒ Response

Lists the available port speeds for cross-connects. You need this information so you can specify your desired port speed (that is, shape) when you create a cross-connect.

Parameters:

Options Hash (opts):

Returns:



6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
# File 'lib/oci/core/virtual_network_client.rb', line 6349

def list_crossconnect_port_speed_shapes(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_crossconnect_port_speed_shapes.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_crossconnect_port_speed_shapes." if compartment_id.nil?

  path = '/crossConnectPortSpeedShapes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_crossconnect_port_speed_shapes') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::CrossConnectPortSpeedShape>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_dhcp_options(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the sets of DHCP options in the specified VCN and specified compartment. The response includes the default set of options that automatically comes with each VCN, plus any other sets you’ve created.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
# File 'lib/oci/core/virtual_network_client.rb', line 6434

def list_dhcp_options(compartment_id, vcn_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_dhcp_options.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_dhcp_options." if compartment_id.nil?
  raise "Missing the required parameter 'vcn_id' when calling list_dhcp_options." if vcn_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::DhcpOptions::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::DhcpOptions::LIFECYCLE_STATE_ENUM.'
  end

  path = '/dhcps'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = vcn_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_dhcp_options') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::DhcpOptions>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_drg_attachments(compartment_id, opts = {}) ⇒ Response

Lists the ‘DrgAttachment` objects for the specified compartment. You can filter the results by VCN or DRG.

Parameters:

Options Hash (opts):

Returns:



6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
# File 'lib/oci/core/virtual_network_client.rb', line 6519

def list_drg_attachments(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_drg_attachments.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_drg_attachments." if compartment_id.nil?

  path = '/drgAttachments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = opts[:vcn_id] if opts[:vcn_id]
  query_params[:drgId] = opts[:drg_id] if opts[:drg_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_drg_attachments') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::DrgAttachment>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_drgs(compartment_id, opts = {}) ⇒ Response

Lists the DRGs in the specified compartment.

Parameters:

Options Hash (opts):

Returns:

  • (Response)

    A Response object with data of type Array<Drg>



6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
# File 'lib/oci/core/virtual_network_client.rb', line 6585

def list_drgs(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_drgs.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_drgs." if compartment_id.nil?

  path = '/drgs'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_drgs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::Drg>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_fast_connect_provider_services(compartment_id, opts = {}) ⇒ Response

Lists the service offerings from supported providers. You need this information so you can specify your desired provider and service offering when you create a virtual circuit.

For the compartment ID, provide the OCID of your tenancy (the root compartment).

For more information, see [FastConnect Overview](docs.cloud.oracle.com/Content/Network/Concepts/fastconnect.htm).

Parameters:

Options Hash (opts):

Returns:



6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
# File 'lib/oci/core/virtual_network_client.rb', line 6655

def list_fast_connect_provider_services(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_fast_connect_provider_services.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_fast_connect_provider_services." if compartment_id.nil?

  path = '/fastConnectProviderServices'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_fast_connect_provider_services') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::FastConnectProviderService>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_fast_connect_provider_virtual_circuit_bandwidth_shapes(provider_service_id, opts = {}) ⇒ Response

Gets the list of available virtual circuit bandwidth levels for a provider. You need this information so you can specify your desired bandwidth level (shape) when you create a virtual circuit.

For more information about virtual circuits, see [FastConnect Overview](docs.cloud.oracle.com/Content/Network/Concepts/fastconnect.htm).

Parameters:

  • provider_service_id (String)

    The OCID of the provider service.

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

    the optional parameters

Options Hash (opts):

Returns:



6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
# File 'lib/oci/core/virtual_network_client.rb', line 6722

def list_fast_connect_provider_virtual_circuit_bandwidth_shapes(provider_service_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_fast_connect_provider_virtual_circuit_bandwidth_shapes.' if logger

  raise "Missing the required parameter 'provider_service_id' when calling list_fast_connect_provider_virtual_circuit_bandwidth_shapes." if provider_service_id.nil?
  raise "Parameter value for 'provider_service_id' must not be blank" if OCI::Internal::Util.blank_string?(provider_service_id)

  path = '/fastConnectProviderServices/{providerServiceId}/virtualCircuitBandwidthShapes'.sub('{providerServiceId}', provider_service_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_fast_connect_provider_virtual_circuit_bandwidth_shapes') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::VirtualCircuitBandwidthShape>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_internet_gateways(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the internet gateways in the specified VCN and the specified compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
# File 'lib/oci/core/virtual_network_client.rb', line 6805

def list_internet_gateways(compartment_id, vcn_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_internet_gateways.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_internet_gateways." if compartment_id.nil?
  raise "Missing the required parameter 'vcn_id' when calling list_internet_gateways." if vcn_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::InternetGateway::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::InternetGateway::LIFECYCLE_STATE_ENUM.'
  end

  path = '/internetGateways'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = vcn_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_internet_gateways') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::InternetGateway>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_ip_sec_connection_tunnels(ipsc_id, opts = {}) ⇒ Response

Lists the tunnel information for the specified IPSec connection.

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Options Hash (opts):

Returns:



6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
# File 'lib/oci/core/virtual_network_client.rb', line 6887

def list_ip_sec_connection_tunnels(ipsc_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_ip_sec_connection_tunnels.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling list_ip_sec_connection_tunnels." if ipsc_id.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)

  path = '/ipsecConnections/{ipscId}/tunnels'.sub('{ipscId}', ipsc_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_ip_sec_connection_tunnels') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::IPSecConnectionTunnel>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_ip_sec_connections(compartment_id, opts = {}) ⇒ Response

Lists the IPSec connections for the specified compartment. You can filter the results by DRG or CPE.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :drg_id (String)

    The OCID of the DRG.

  • :cpe_id (String)

    The OCID of the CPE.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Returns:



6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
# File 'lib/oci/core/virtual_network_client.rb', line 6954

def list_ip_sec_connections(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_ip_sec_connections.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_ip_sec_connections." if compartment_id.nil?

  path = '/ipsecConnections'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:drgId] = opts[:drg_id] if opts[:drg_id]
  query_params[:cpeId] = opts[:cpe_id] if opts[:cpe_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_ip_sec_connections') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::IPSecConnection>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_ipv6s(opts = {}) ⇒ Response

Lists the Ipv6 objects based on one of these filters:

* Subnet OCID.
* VNIC OCID.
* Both IPv6 address and subnet OCID: This lets you get an `Ipv6` object based on its private
IPv6 address (for example, 2001:0db8:0123:1111:abcd:ef01:2345:6789) and not its OCID. For comparison,
{#get_ipv6 get_ipv6} requires the OCID.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :ip_address (String)

    An IP address. This could be either IPv4 or IPv6, depending on the resource. Example: ‘10.0.3.3`

  • :subnet_id (String)

    The OCID of the subnet.

  • :vnic_id (String)

    The OCID of the VNIC.

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:

  • (Response)

    A Response object with data of type Array<Ipv6>



7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
# File 'lib/oci/core/virtual_network_client.rb', line 7034

def list_ipv6s(opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_ipv6s.' if logger


  path = '/ipv6'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:ipAddress] = opts[:ip_address] if opts[:ip_address]
  query_params[:subnetId] = opts[:subnet_id] if opts[:subnet_id]
  query_params[:vnicId] = opts[:vnic_id] if opts[:vnic_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_ipv6s') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::Ipv6>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_local_peering_gateways(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the local peering gateways (LPGs) for the specified VCN and compartment (the LPG’s compartment).

Parameters:

Options Hash (opts):

Returns:



7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
# File 'lib/oci/core/virtual_network_client.rb', line 7102

def list_local_peering_gateways(compartment_id, vcn_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_local_peering_gateways.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_local_peering_gateways." if compartment_id.nil?
  raise "Missing the required parameter 'vcn_id' when calling list_local_peering_gateways." if vcn_id.nil?

  path = '/localPeeringGateways'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = vcn_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_local_peering_gateways') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::LocalPeeringGateway>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_nat_gateways(compartment_id, opts = {}) ⇒ Response

Lists the NAT gateways in the specified compartment. You may optionally specify a VCN OCID to filter the results by VCN.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :vcn_id (String)
  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to return only resources that match the specified lifecycle state. The value is case insensitive.

Returns:



7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
# File 'lib/oci/core/virtual_network_client.rb', line 7188

def list_nat_gateways(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_nat_gateways.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_nat_gateways." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::NatGateway::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::NatGateway::LIFECYCLE_STATE_ENUM.'
  end

  path = '/natGateways'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = opts[:vcn_id] if opts[:vcn_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_nat_gateways') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::NatGateway>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_network_security_group_security_rules(network_security_group_id, opts = {}) ⇒ Response

Lists the security rules in the specified network security group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :direction (String)

    Direction of the security rule. Set to ‘EGRESS` for rules that allow outbound IP packets, or `INGRESS` for rules that allow inbound IP packets.

    Allowed values are: EGRESS, INGRESS

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :sort_by (String)

    The field to sort by. Allowed values are: TIMECREATED

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

Returns:



7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
# File 'lib/oci/core/virtual_network_client.rb', line 7279

def list_network_security_group_security_rules(network_security_group_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_network_security_group_security_rules.' if logger

  raise "Missing the required parameter 'network_security_group_id' when calling list_network_security_group_security_rules." if network_security_group_id.nil?

  if opts[:direction] && !%w[EGRESS INGRESS].include?(opts[:direction])
    raise 'Invalid value for "direction", must be one of EGRESS, INGRESS.'
  end

  if opts[:sort_by] && !%w[TIMECREATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'network_security_group_id' must not be blank" if OCI::Internal::Util.blank_string?(network_security_group_id)

  path = '/networkSecurityGroups/{networkSecurityGroupId}/securityRules'.sub('{networkSecurityGroupId}', network_security_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:direction] = opts[:direction] if opts[:direction]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_network_security_group_security_rules') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::SecurityRule>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_network_security_group_vnics(network_security_group_id, opts = {}) ⇒ Response

Lists the VNICs in the specified network security group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :sort_by (String)

    The field to sort by. Allowed values are: TIMEASSOCIATED

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

Returns:



7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
# File 'lib/oci/core/virtual_network_client.rb', line 7364

def list_network_security_group_vnics(network_security_group_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_network_security_group_vnics.' if logger

  raise "Missing the required parameter 'network_security_group_id' when calling list_network_security_group_vnics." if network_security_group_id.nil?

  if opts[:sort_by] && !%w[TIMEASSOCIATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMEASSOCIATED.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end
  raise "Parameter value for 'network_security_group_id' must not be blank" if OCI::Internal::Util.blank_string?(network_security_group_id)

  path = '/networkSecurityGroups/{networkSecurityGroupId}/vnics'.sub('{networkSecurityGroupId}', network_security_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_network_security_group_vnics') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::NetworkSecurityGroupVnic>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_network_security_groups(compartment_id, opts = {}) ⇒ Response

Lists the network security groups in the specified compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :vcn_id (String)
  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to return only resources that match the specified lifecycle state. The value is case insensitive.

Returns:



7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
# File 'lib/oci/core/virtual_network_client.rb', line 7457

def list_network_security_groups(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_network_security_groups.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_network_security_groups." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::NetworkSecurityGroup::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::NetworkSecurityGroup::LIFECYCLE_STATE_ENUM.'
  end

  path = '/networkSecurityGroups'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = opts[:vcn_id] if opts[:vcn_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_network_security_groups') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::NetworkSecurityGroup>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_private_ips(opts = {}) ⇒ Response

Lists the PrivateIp objects based on one of these filters:

- Subnet OCID.
- VNIC OCID.
- Both private IP address and subnet OCID: This lets
you get a `privateIP` object based on its private IP
address (for example, 10.0.3.3) and not its OCID. For comparison,
{#get_private_ip get_private_ip}
requires the OCID.

If you’re listing all the private IPs associated with a given subnet or VNIC, the response includes both primary and secondary private IPs.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :ip_address (String)

    An IP address. This could be either IPv4 or IPv6, depending on the resource. Example: ‘10.0.3.3`

  • :subnet_id (String)

    The OCID of the subnet.

  • :vnic_id (String)

    The OCID of the VNIC.

Returns:



7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
# File 'lib/oci/core/virtual_network_client.rb', line 7554

def list_private_ips(opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_private_ips.' if logger


  path = '/privateIps'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:ipAddress] = opts[:ip_address] if opts[:ip_address]
  query_params[:subnetId] = opts[:subnet_id] if opts[:subnet_id]
  query_params[:vnicId] = opts[:vnic_id] if opts[:vnic_id]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_private_ips') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::PrivateIp>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_public_ips(scope, compartment_id, opts = {}) ⇒ Response

Lists the PublicIp objects in the specified compartment. You can filter the list by using query parameters.

To list your reserved public IPs:

* Set `scope` = `REGION`  (required)
* Leave the `availabilityDomain` parameter empty
* Set `lifetime` = `RESERVED`

To list the ephemeral public IPs assigned to a regional entity such as a NAT gateway:

* Set `scope` = `REGION`  (required)
* Leave the `availabilityDomain` parameter empty
* Set `lifetime` = `EPHEMERAL`

To list the ephemeral public IPs assigned to private IPs:

* Set `scope` = `AVAILABILITY_DOMAIN` (required)
* Set the `availabilityDomain` parameter to the desired availability domain (required)
* Set `lifetime` = `EPHEMERAL`

Note: An ephemeral public IP assigned to a private IP is always in the same availability domain and compartment as the private IP.

Parameters:

  • scope (String)

    Whether the public IP is regional or specific to a particular availability domain.

    • ‘REGION`: The public IP exists within a region and is assigned to a regional entity

    (such as a NatGateway), or can be assigned to a private IP in any availability domain in the region. Reserved public IPs have ‘scope` = `REGION`, as do ephemeral public IPs assigned to a regional entity.

    • ‘AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity

    it’s assigned to, which is specified by the ‘availabilityDomain` property of the public IP object. Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`.

    Allowed values are: REGION, AVAILABILITY_DOMAIN

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :availability_domain (String)

    The name of the availability domain.

    Example: ‘Uocm:PHX-AD-1`

  • :lifetime (String)

    A filter to return only public IPs that match given lifetime.

    Allowed values are: EPHEMERAL, RESERVED

Returns:



7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
# File 'lib/oci/core/virtual_network_client.rb', line 7657

def list_public_ips(scope, compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_public_ips.' if logger

  raise "Missing the required parameter 'scope' when calling list_public_ips." if scope.nil?
  unless %w[REGION AVAILABILITY_DOMAIN].include?(scope)
    raise "Invalid value for 'scope', must be one of REGION, AVAILABILITY_DOMAIN."
  end
  raise "Missing the required parameter 'compartment_id' when calling list_public_ips." if compartment_id.nil?

  if opts[:lifetime] && !%w[EPHEMERAL RESERVED].include?(opts[:lifetime])
    raise 'Invalid value for "lifetime", must be one of EPHEMERAL, RESERVED.'
  end

  path = '/publicIps'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:scope] = scope
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain]
  query_params[:lifetime] = opts[:lifetime] if opts[:lifetime]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_public_ips') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::PublicIp>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_remote_peering_connections(compartment_id, opts = {}) ⇒ Response

Lists the remote peering connections (RPCs) for the specified DRG and compartment (the RPC’s compartment).

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :drg_id (String)

    The OCID of the DRG.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

Returns:



7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
# File 'lib/oci/core/virtual_network_client.rb', line 7734

def list_remote_peering_connections(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_remote_peering_connections.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_remote_peering_connections." if compartment_id.nil?

  path = '/remotePeeringConnections'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:drgId] = opts[:drg_id] if opts[:drg_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_remote_peering_connections') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::RemotePeeringConnection>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_route_tables(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the route tables in the specified VCN and specified compartment. The response includes the default route table that automatically comes with each VCN, plus any route tables you’ve created.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
# File 'lib/oci/core/virtual_network_client.rb', line 7820

def list_route_tables(compartment_id, vcn_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_route_tables.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_route_tables." if compartment_id.nil?
  raise "Missing the required parameter 'vcn_id' when calling list_route_tables." if vcn_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::RouteTable::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::RouteTable::LIFECYCLE_STATE_ENUM.'
  end

  path = '/routeTables'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = vcn_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_route_tables') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::RouteTable>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_security_lists(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the security lists in the specified VCN and compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
# File 'lib/oci/core/virtual_network_client.rb', line 7921

def list_security_lists(compartment_id, vcn_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_security_lists.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_security_lists." if compartment_id.nil?
  raise "Missing the required parameter 'vcn_id' when calling list_security_lists." if vcn_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::SecurityList::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::SecurityList::LIFECYCLE_STATE_ENUM.'
  end

  path = '/securityLists'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = vcn_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_security_lists') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::SecurityList>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_service_gateways(compartment_id, opts = {}) ⇒ Response

Lists the service gateways in the specified compartment. You may optionally specify a VCN OCID to filter the results by VCN.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :vcn_id (String)
  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
# File 'lib/oci/core/virtual_network_client.rb', line 8021

def list_service_gateways(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_service_gateways.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_service_gateways." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::ServiceGateway::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::ServiceGateway::LIFECYCLE_STATE_ENUM.'
  end

  path = '/serviceGateways'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = opts[:vcn_id] if opts[:vcn_id]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_service_gateways') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::ServiceGateway>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_services(opts = {}) ⇒ Response

Lists the available Service objects that you can enable for a service gateway in this region.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
# File 'lib/oci/core/virtual_network_client.rb', line 8101

def list_services(opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_services.' if logger


  path = '/services'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_services') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::Service>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_subnets(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the subnets in the specified VCN and the specified compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:



8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
# File 'lib/oci/core/virtual_network_client.rb', line 8182

def list_subnets(compartment_id, vcn_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_subnets.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_subnets." if compartment_id.nil?
  raise "Missing the required parameter 'vcn_id' when calling list_subnets." if vcn_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::Subnet::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Subnet::LIFECYCLE_STATE_ENUM.'
  end

  path = '/subnets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:vcnId] = vcn_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_subnets') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::Subnet>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_vcns(compartment_id, opts = {}) ⇒ Response

Lists the virtual cloud networks (VCNs) in the specified compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

Returns:

  • (Response)

    A Response object with data of type Array<Vcn>



8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
# File 'lib/oci/core/virtual_network_client.rb', line 8282

def list_vcns(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_vcns.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_vcns." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::Vcn::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Vcn::LIFECYCLE_STATE_ENUM.'
  end

  path = '/vcns'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_vcns') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::Vcn>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_virtual_circuit_bandwidth_shapes(compartment_id, opts = {}) ⇒ Response

The deprecated operation lists available bandwidth levels for virtual circuits. For the compartment ID, provide the OCID of your tenancy (the root compartment).

Parameters:

Options Hash (opts):

Returns:



8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
# File 'lib/oci/core/virtual_network_client.rb', line 8362

def list_virtual_circuit_bandwidth_shapes(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_virtual_circuit_bandwidth_shapes.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_virtual_circuit_bandwidth_shapes." if compartment_id.nil?

  path = '/virtualCircuitBandwidthShapes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_virtual_circuit_bandwidth_shapes') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::VirtualCircuitBandwidthShape>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_virtual_circuit_public_prefixes(virtual_circuit_id, opts = {}) ⇒ Response

Lists the public IP prefixes and their details for the specified public virtual circuit.

Parameters:

  • virtual_circuit_id (String)

    The OCID of the virtual circuit.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :verification_state (String)

    A filter to only return resources that match the given verification state. The state value is case-insensitive.

Returns:



8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
# File 'lib/oci/core/virtual_network_client.rb', line 8420

def list_virtual_circuit_public_prefixes(virtual_circuit_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_virtual_circuit_public_prefixes.' if logger

  raise "Missing the required parameter 'virtual_circuit_id' when calling list_virtual_circuit_public_prefixes." if virtual_circuit_id.nil?

  if opts[:verification_state] && !OCI::Core::Models::VirtualCircuitPublicPrefix::VERIFICATION_STATE_ENUM.include?(opts[:verification_state])
    raise 'Invalid value for "verification_state", must be one of the values in OCI::Core::Models::VirtualCircuitPublicPrefix::VERIFICATION_STATE_ENUM.'
  end
  raise "Parameter value for 'virtual_circuit_id' must not be blank" if OCI::Internal::Util.blank_string?(virtual_circuit_id)

  path = '/virtualCircuits/{virtualCircuitId}/publicPrefixes'.sub('{virtualCircuitId}', virtual_circuit_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:verificationState] = opts[:verification_state] if opts[:verification_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_virtual_circuit_public_prefixes') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::VirtualCircuitPublicPrefix>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_virtual_circuits(compartment_id, opts = {}) ⇒ Response

Lists the virtual circuits in the specified compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

    Example: ‘50`

  • :page (String)

    For list pagination. The value of the ‘opc-next-page` response header from the previous "List" call. For important details about how pagination works, see [List Pagination](docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

  • :display_name (String)

    A filter to return only resources that match the given display name exactly.

  • :sort_by (String)

    The field to sort by. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Note: In general, some "List" operations (for example, ‘ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :lifecycle_state (String)

    A filter to return only resources that match the specified lifecycle state. The value is case insensitive.

Returns:



8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
# File 'lib/oci/core/virtual_network_client.rb', line 8505

def list_virtual_circuits(compartment_id, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#list_virtual_circuits.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_virtual_circuits." if compartment_id.nil?

  if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:lifecycle_state] && !OCI::Core::Models::VirtualCircuit::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::VirtualCircuit::LIFECYCLE_STATE_ENUM.'
  end

  path = '/virtualCircuits'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#list_virtual_circuits') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Core::Models::VirtualCircuit>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



106
107
108
# File 'lib/oci/core/virtual_network_client.rb', line 106

def logger
  @api_client.config.logger
end

#remove_network_security_group_security_rules(network_security_group_id, remove_network_security_group_security_rules_details, opts = {}) ⇒ Response

Removes one or more security rules from the specified network security group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:

  • (Response)

    A Response object with data of type nil



8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
# File 'lib/oci/core/virtual_network_client.rb', line 8579

def remove_network_security_group_security_rules(network_security_group_id, remove_network_security_group_security_rules_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#remove_network_security_group_security_rules.' if logger

  raise "Missing the required parameter 'network_security_group_id' when calling remove_network_security_group_security_rules." if network_security_group_id.nil?
  raise "Missing the required parameter 'remove_network_security_group_security_rules_details' when calling remove_network_security_group_security_rules." if remove_network_security_group_security_rules_details.nil?
  raise "Parameter value for 'network_security_group_id' must not be blank" if OCI::Internal::Util.blank_string?(network_security_group_id)

  path = '/networkSecurityGroups/{networkSecurityGroupId}/actions/removeSecurityRules'.sub('{networkSecurityGroupId}', network_security_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(remove_network_security_group_security_rules_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#remove_network_security_group_security_rules') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_cpe(cpe_id, update_cpe_details, opts = {}) ⇒ Response

Updates the specified CPE’s display name or tags. Avoid entering confidential information.

Parameters:

  • cpe_id (String)

    The OCID of the CPE.

  • update_cpe_details (OCI::Core::Models::UpdateCpeDetails)

    Details object for updating a CPE.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type Cpe



8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
# File 'lib/oci/core/virtual_network_client.rb', line 8638

def update_cpe(cpe_id, update_cpe_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_cpe.' if logger

  raise "Missing the required parameter 'cpe_id' when calling update_cpe." if cpe_id.nil?
  raise "Missing the required parameter 'update_cpe_details' when calling update_cpe." if update_cpe_details.nil?
  raise "Parameter value for 'cpe_id' must not be blank" if OCI::Internal::Util.blank_string?(cpe_id)

  path = '/cpes/{cpeId}'.sub('{cpeId}', cpe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_cpe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_cpe') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Cpe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_cross_connect(cross_connect_id, update_cross_connect_details, opts = {}) ⇒ Response

Updates the specified cross-connect.

Parameters:

  • cross_connect_id (String)

    The OCID of the cross-connect.

  • update_cross_connect_details (OCI::Core::Models::UpdateCrossConnectDetails)

    Update CrossConnect fields.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
# File 'lib/oci/core/virtual_network_client.rb', line 8696

def update_cross_connect(cross_connect_id, update_cross_connect_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_cross_connect.' if logger

  raise "Missing the required parameter 'cross_connect_id' when calling update_cross_connect." if cross_connect_id.nil?
  raise "Missing the required parameter 'update_cross_connect_details' when calling update_cross_connect." if update_cross_connect_details.nil?
  raise "Parameter value for 'cross_connect_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_id)

  path = '/crossConnects/{crossConnectId}'.sub('{crossConnectId}', cross_connect_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_cross_connect_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_cross_connect') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::CrossConnect'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_cross_connect_group(cross_connect_group_id, update_cross_connect_group_details, opts = {}) ⇒ Response

Updates the specified cross-connect group’s display name. Avoid entering confidential information.

Parameters:

  • cross_connect_group_id (String)

    The OCID of the cross-connect group.

  • update_cross_connect_group_details (OCI::Core::Models::UpdateCrossConnectGroupDetails)

    Update CrossConnectGroup fields

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
# File 'lib/oci/core/virtual_network_client.rb', line 8756

def update_cross_connect_group(cross_connect_group_id, update_cross_connect_group_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_cross_connect_group.' if logger

  raise "Missing the required parameter 'cross_connect_group_id' when calling update_cross_connect_group." if cross_connect_group_id.nil?
  raise "Missing the required parameter 'update_cross_connect_group_details' when calling update_cross_connect_group." if update_cross_connect_group_details.nil?
  raise "Parameter value for 'cross_connect_group_id' must not be blank" if OCI::Internal::Util.blank_string?(cross_connect_group_id)

  path = '/crossConnectGroups/{crossConnectGroupId}'.sub('{crossConnectGroupId}', cross_connect_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_cross_connect_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_cross_connect_group') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::CrossConnectGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_dhcp_options(dhcp_id, update_dhcp_details, opts = {}) ⇒ Response

Updates the specified set of DHCP options. You can update the display name or the options themselves. Avoid entering confidential information.

Note that the ‘options` object you provide replaces the entire existing set of options.

Parameters:

  • dhcp_id (String)

    The OCID for the set of DHCP options.

  • update_dhcp_details (OCI::Core::Models::UpdateDhcpDetails)

    Request object for updating a set of DHCP options.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
# File 'lib/oci/core/virtual_network_client.rb', line 8818

def update_dhcp_options(dhcp_id, update_dhcp_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_dhcp_options.' if logger

  raise "Missing the required parameter 'dhcp_id' when calling update_dhcp_options." if dhcp_id.nil?
  raise "Missing the required parameter 'update_dhcp_details' when calling update_dhcp_options." if update_dhcp_details.nil?
  raise "Parameter value for 'dhcp_id' must not be blank" if OCI::Internal::Util.blank_string?(dhcp_id)

  path = '/dhcps/{dhcpId}'.sub('{dhcpId}', dhcp_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_dhcp_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_dhcp_options') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::DhcpOptions'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_drg(drg_id, update_drg_details, opts = {}) ⇒ Response

Updates the specified DRG’s display name or tags. Avoid entering confidential information.

Parameters:

  • drg_id (String)

    The OCID of the DRG.

  • update_drg_details (OCI::Core::Models::UpdateDrgDetails)

    Details object for updating a DRG.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type Drg



8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
# File 'lib/oci/core/virtual_network_client.rb', line 8877

def update_drg(drg_id, update_drg_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_drg.' if logger

  raise "Missing the required parameter 'drg_id' when calling update_drg." if drg_id.nil?
  raise "Missing the required parameter 'update_drg_details' when calling update_drg." if update_drg_details.nil?
  raise "Parameter value for 'drg_id' must not be blank" if OCI::Internal::Util.blank_string?(drg_id)

  path = '/drgs/{drgId}'.sub('{drgId}', drg_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_drg_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_drg') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Drg'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_drg_attachment(drg_attachment_id, update_drg_attachment_details, opts = {}) ⇒ Response

Updates the display name for the specified ‘DrgAttachment`. Avoid entering confidential information.

Parameters:

  • drg_attachment_id (String)

    The OCID of the DRG attachment.

  • update_drg_attachment_details (OCI::Core::Models::UpdateDrgAttachmentDetails)

    Details object for updating a ‘DrgAttachment`.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
# File 'lib/oci/core/virtual_network_client.rb', line 8937

def update_drg_attachment(drg_attachment_id, update_drg_attachment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_drg_attachment.' if logger

  raise "Missing the required parameter 'drg_attachment_id' when calling update_drg_attachment." if drg_attachment_id.nil?
  raise "Missing the required parameter 'update_drg_attachment_details' when calling update_drg_attachment." if update_drg_attachment_details.nil?
  raise "Parameter value for 'drg_attachment_id' must not be blank" if OCI::Internal::Util.blank_string?(drg_attachment_id)

  path = '/drgAttachments/{drgAttachmentId}'.sub('{drgAttachmentId}', drg_attachment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_drg_attachment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_drg_attachment') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::DrgAttachment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_internet_gateway(ig_id, update_internet_gateway_details, opts = {}) ⇒ Response

Updates the specified internet gateway. You can disable/enable it, or change its display name or tags. Avoid entering confidential information.

If the gateway is disabled, that means no traffic will flow to/from the internet even if there’s a route rule that enables that traffic.

Parameters:

  • ig_id (String)

    The OCID of the internet gateway.

  • update_internet_gateway_details (OCI::Core::Models::UpdateInternetGatewayDetails)

    Details for updating the internet gateway.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
# File 'lib/oci/core/virtual_network_client.rb', line 9000

def update_internet_gateway(ig_id, update_internet_gateway_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_internet_gateway.' if logger

  raise "Missing the required parameter 'ig_id' when calling update_internet_gateway." if ig_id.nil?
  raise "Missing the required parameter 'update_internet_gateway_details' when calling update_internet_gateway." if update_internet_gateway_details.nil?
  raise "Parameter value for 'ig_id' must not be blank" if OCI::Internal::Util.blank_string?(ig_id)

  path = '/internetGateways/{igId}'.sub('{igId}', ig_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_internet_gateway_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_internet_gateway') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::InternetGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_ip_sec_connection(ipsc_id, update_ip_sec_connection_details, opts = {}) ⇒ Response

Updates the specified IPSec connection.

To update an individual IPSec tunnel’s attributes, use update_ip_sec_connection_tunnel.

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

  • update_ip_sec_connection_details (OCI::Core::Models::UpdateIPSecConnectionDetails)

    Details object for updating a IPSec connection.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
# File 'lib/oci/core/virtual_network_client.rb', line 9062

def update_ip_sec_connection(ipsc_id, update_ip_sec_connection_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_ip_sec_connection.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling update_ip_sec_connection." if ipsc_id.nil?
  raise "Missing the required parameter 'update_ip_sec_connection_details' when calling update_ip_sec_connection." if update_ip_sec_connection_details.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)

  path = '/ipsecConnections/{ipscId}'.sub('{ipscId}', ipsc_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_ip_sec_connection_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_ip_sec_connection') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_ip_sec_connection_tunnel(ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_details, opts = {}) ⇒ Response

Updates the specified tunnel. This operation lets you change tunnel attributes such as the routing type (BGP dynamic routing or static routing). Here are some important notes:

* If you change the tunnel's routing type or BGP session configuration, the tunnel will go
  down while it's reprovisioned.

* If you want to switch the tunnel's `routing` from `STATIC` to `BGP`, make sure the tunnel's
  BGP session configuration attributes have been set ({#bgp_session_info bgp_session_info}).

* If you want to switch the tunnel's `routing` from `BGP` to `STATIC`, make sure the
  {IPSecConnection} already has at least one valid CIDR
  static route.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
# File 'lib/oci/core/virtual_network_client.rb', line 9136

def update_ip_sec_connection_tunnel(ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_ip_sec_connection_tunnel.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling update_ip_sec_connection_tunnel." if ipsc_id.nil?
  raise "Missing the required parameter 'tunnel_id' when calling update_ip_sec_connection_tunnel." if tunnel_id.nil?
  raise "Missing the required parameter 'update_ip_sec_connection_tunnel_details' when calling update_ip_sec_connection_tunnel." if update_ip_sec_connection_tunnel_details.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)
  raise "Parameter value for 'tunnel_id' must not be blank" if OCI::Internal::Util.blank_string?(tunnel_id)

  path = '/ipsecConnections/{ipscId}/tunnels/{tunnelId}'.sub('{ipscId}', ipsc_id.to_s).sub('{tunnelId}', tunnel_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_ip_sec_connection_tunnel_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_ip_sec_connection_tunnel') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnectionTunnel'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_ip_sec_connection_tunnel_shared_secret(ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_shared_secret_details, opts = {}) ⇒ Response

Updates the shared secret (pre-shared key) for the specified tunnel.

Important: If you change the shared secret, the tunnel will go down while it’s reprovisioned.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
# File 'lib/oci/core/virtual_network_client.rb', line 9201

def update_ip_sec_connection_tunnel_shared_secret(ipsc_id, tunnel_id, update_ip_sec_connection_tunnel_shared_secret_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_ip_sec_connection_tunnel_shared_secret.' if logger

  raise "Missing the required parameter 'ipsc_id' when calling update_ip_sec_connection_tunnel_shared_secret." if ipsc_id.nil?
  raise "Missing the required parameter 'tunnel_id' when calling update_ip_sec_connection_tunnel_shared_secret." if tunnel_id.nil?
  raise "Missing the required parameter 'update_ip_sec_connection_tunnel_shared_secret_details' when calling update_ip_sec_connection_tunnel_shared_secret." if update_ip_sec_connection_tunnel_shared_secret_details.nil?
  raise "Parameter value for 'ipsc_id' must not be blank" if OCI::Internal::Util.blank_string?(ipsc_id)
  raise "Parameter value for 'tunnel_id' must not be blank" if OCI::Internal::Util.blank_string?(tunnel_id)

  path = '/ipsecConnections/{ipscId}/tunnels/{tunnelId}/sharedSecret'.sub('{ipscId}', ipsc_id.to_s).sub('{tunnelId}', tunnel_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_ip_sec_connection_tunnel_shared_secret_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_ip_sec_connection_tunnel_shared_secret') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::IPSecConnectionTunnelSharedSecret'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_ipv6(ipv6_id, update_ipv6_details, opts = {}) ⇒ Response

Updates the specified IPv6. You must specify the object’s OCID. Use this operation if you want to:

* Move an IPv6 to a different VNIC in the same subnet.
* Enable/disable internet access for an IPv6.
* Change the display name for an IPv6.
* Update resource tags for an IPv6.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

    Unique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
# File 'lib/oci/core/virtual_network_client.rb', line 9271

def update_ipv6(ipv6_id, update_ipv6_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_ipv6.' if logger

  raise "Missing the required parameter 'ipv6_id' when calling update_ipv6." if ipv6_id.nil?
  raise "Missing the required parameter 'update_ipv6_details' when calling update_ipv6." if update_ipv6_details.nil?
  raise "Parameter value for 'ipv6_id' must not be blank" if OCI::Internal::Util.blank_string?(ipv6_id)

  path = '/ipv6/{ipv6Id}'.sub('{ipv6Id}', ipv6_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_ipv6_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_ipv6') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Ipv6'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_local_peering_gateway(local_peering_gateway_id, update_local_peering_gateway_details, opts = {}) ⇒ Response

Updates the specified local peering gateway (LPG).

Parameters:

  • local_peering_gateway_id (String)

    The OCID of the local peering gateway.

  • update_local_peering_gateway_details (OCI::Core::Models::UpdateLocalPeeringGatewayDetails)

    Details object for updating a local peering gateway.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
# File 'lib/oci/core/virtual_network_client.rb', line 9331

def update_local_peering_gateway(local_peering_gateway_id, update_local_peering_gateway_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_local_peering_gateway.' if logger

  raise "Missing the required parameter 'local_peering_gateway_id' when calling update_local_peering_gateway." if local_peering_gateway_id.nil?
  raise "Missing the required parameter 'update_local_peering_gateway_details' when calling update_local_peering_gateway." if update_local_peering_gateway_details.nil?
  raise "Parameter value for 'local_peering_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(local_peering_gateway_id)

  path = '/localPeeringGateways/{localPeeringGatewayId}'.sub('{localPeeringGatewayId}', local_peering_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_local_peering_gateway_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_local_peering_gateway') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::LocalPeeringGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_nat_gateway(nat_gateway_id, update_nat_gateway_details, opts = {}) ⇒ Response

Updates the specified NAT gateway.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
# File 'lib/oci/core/virtual_network_client.rb', line 9390

def update_nat_gateway(nat_gateway_id, update_nat_gateway_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_nat_gateway.' if logger

  raise "Missing the required parameter 'nat_gateway_id' when calling update_nat_gateway." if nat_gateway_id.nil?
  raise "Missing the required parameter 'update_nat_gateway_details' when calling update_nat_gateway." if update_nat_gateway_details.nil?
  raise "Parameter value for 'nat_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(nat_gateway_id)

  path = '/natGateways/{natGatewayId}'.sub('{natGatewayId}', nat_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_nat_gateway_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_nat_gateway') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::NatGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_network_security_group(network_security_group_id, update_network_security_group_details, opts = {}) ⇒ Response

Updates the specified network security group.

To add or remove an existing VNIC from the group, use update_vnic.

To add a VNIC to the group *when you create the VNIC*, specify the NSG’s OCID during creation. For example, see the ‘nsgIds` attribute in create_vnic_details.

To add or remove security rules from the group, use add_network_security_group_security_rules or remove_network_security_group_security_rules.

To edit the contents of existing security rules in the group, use update_network_security_group_security_rules.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
# File 'lib/oci/core/virtual_network_client.rb', line 9463

def update_network_security_group(network_security_group_id, update_network_security_group_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_network_security_group.' if logger

  raise "Missing the required parameter 'network_security_group_id' when calling update_network_security_group." if network_security_group_id.nil?
  raise "Missing the required parameter 'update_network_security_group_details' when calling update_network_security_group." if update_network_security_group_details.nil?
  raise "Parameter value for 'network_security_group_id' must not be blank" if OCI::Internal::Util.blank_string?(network_security_group_id)

  path = '/networkSecurityGroups/{networkSecurityGroupId}'.sub('{networkSecurityGroupId}', network_security_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_network_security_group_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_network_security_group') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::NetworkSecurityGroup'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_network_security_group_security_rules(network_security_group_id, update_network_security_group_security_rules_details, opts = {}) ⇒ Response

Updates one or more security rules in the specified network security group.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

Returns:



9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
# File 'lib/oci/core/virtual_network_client.rb', line 9521

def update_network_security_group_security_rules(network_security_group_id, update_network_security_group_security_rules_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_network_security_group_security_rules.' if logger

  raise "Missing the required parameter 'network_security_group_id' when calling update_network_security_group_security_rules." if network_security_group_id.nil?
  raise "Missing the required parameter 'update_network_security_group_security_rules_details' when calling update_network_security_group_security_rules." if update_network_security_group_security_rules_details.nil?
  raise "Parameter value for 'network_security_group_id' must not be blank" if OCI::Internal::Util.blank_string?(network_security_group_id)

  path = '/networkSecurityGroups/{networkSecurityGroupId}/actions/updateSecurityRules'.sub('{networkSecurityGroupId}', network_security_group_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_network_security_group_security_rules_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_network_security_group_security_rules') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::UpdatedNetworkSecurityGroupSecurityRules'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_private_ip(private_ip_id, update_private_ip_details, opts = {}) ⇒ Response

Updates the specified private IP. You must specify the object’s OCID. Use this operation if you want to:

- Move a secondary private IP to a different VNIC in the same subnet.
- Change the display name for a secondary private IP.
- Change the hostname for a secondary private IP.

This operation cannot be used with primary private IPs. To update the hostname for the primary IP on a VNIC, use update_vnic.

Parameters:

  • private_ip_id (String)

    The OCID of the private IP.

  • update_private_ip_details (OCI::Core::Models::UpdatePrivateIpDetails)

    Private IP details.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
# File 'lib/oci/core/virtual_network_client.rb', line 9589

def update_private_ip(private_ip_id, update_private_ip_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_private_ip.' if logger

  raise "Missing the required parameter 'private_ip_id' when calling update_private_ip." if private_ip_id.nil?
  raise "Missing the required parameter 'update_private_ip_details' when calling update_private_ip." if update_private_ip_details.nil?
  raise "Parameter value for 'private_ip_id' must not be blank" if OCI::Internal::Util.blank_string?(private_ip_id)

  path = '/privateIps/{privateIpId}'.sub('{privateIpId}', private_ip_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_private_ip_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_private_ip') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::PrivateIp'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_public_ip(public_ip_id, update_public_ip_details, opts = {}) ⇒ Response

Updates the specified public IP. You must specify the object’s OCID. Use this operation if you want to:

  • Assign a reserved public IP in your pool to a private IP.

  • Move a reserved public IP to a different private IP.

  • Unassign a reserved public IP from a private IP (which returns it to your pool

of reserved public IPs).

  • Change the display name or tags for a public IP.

Assigning, moving, and unassigning a reserved public IP are asynchronous operations. Poll the public IP’s ‘lifecycleState` to determine if the operation succeeded.

Note: When moving a reserved public IP, the target private IP must not already have a public IP with ‘lifecycleState` = ASSIGNING or ASSIGNED. If it does, an error is returned. Also, the initial unassignment from the original private IP always succeeds, but the assignment to the target private IP is asynchronous and could fail silently (for example, if the target private IP is deleted or has a different public IP assigned to it in the interim). If that occurs, the public IP remains unassigned and its `lifecycleState` switches to AVAILABLE (it is not reassigned to its original private IP). You must poll the public IP’s ‘lifecycleState` to determine if the move succeeded.

Regarding ephemeral public IPs:

  • If you want to assign an ephemeral public IP to a primary private IP, use

create_public_ip.

  • You can’t move an ephemeral public IP to a different private IP.

  • If you want to unassign an ephemeral public IP from its private IP, use

delete_public_ip, which unassigns and deletes the ephemeral public IP.

Note: If a public IP is assigned to a secondary private IP (see PrivateIp), and you move that secondary private IP to another VNIC, the public IP moves with it.

Note: There’s a limit to the number of PublicIp a VNIC or instance can have. If you try to move a reserved public IP to a VNIC or instance that has already reached its public IP limit, an error is returned. For information about the public IP limits, see [Public IP Addresses](docs.cloud.oracle.com/Content/Network/Tasks/managingpublicIPs.htm).

Parameters:

  • public_ip_id (String)

    The OCID of the public IP.

  • update_public_ip_details (OCI::Core::Models::UpdatePublicIpDetails)

    Public IP details.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
# File 'lib/oci/core/virtual_network_client.rb', line 9686

def update_public_ip(public_ip_id, update_public_ip_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_public_ip.' if logger

  raise "Missing the required parameter 'public_ip_id' when calling update_public_ip." if public_ip_id.nil?
  raise "Missing the required parameter 'update_public_ip_details' when calling update_public_ip." if update_public_ip_details.nil?
  raise "Parameter value for 'public_ip_id' must not be blank" if OCI::Internal::Util.blank_string?(public_ip_id)

  path = '/publicIps/{publicIpId}'.sub('{publicIpId}', public_ip_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_public_ip_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_public_ip') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::PublicIp'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_remote_peering_connection(remote_peering_connection_id, update_remote_peering_connection_details, opts = {}) ⇒ Response

Updates the specified remote peering connection (RPC).

Parameters:

  • remote_peering_connection_id (String)

    The OCID of the remote peering connection (RPC).

  • update_remote_peering_connection_details (OCI::Core::Models::UpdateRemotePeeringConnectionDetails)

    Request to the update the peering connection to remote region

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
# File 'lib/oci/core/virtual_network_client.rb', line 9745

def update_remote_peering_connection(remote_peering_connection_id, update_remote_peering_connection_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_remote_peering_connection.' if logger

  raise "Missing the required parameter 'remote_peering_connection_id' when calling update_remote_peering_connection." if remote_peering_connection_id.nil?
  raise "Missing the required parameter 'update_remote_peering_connection_details' when calling update_remote_peering_connection." if update_remote_peering_connection_details.nil?
  raise "Parameter value for 'remote_peering_connection_id' must not be blank" if OCI::Internal::Util.blank_string?(remote_peering_connection_id)

  path = '/remotePeeringConnections/{remotePeeringConnectionId}'.sub('{remotePeeringConnectionId}', remote_peering_connection_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_remote_peering_connection_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_remote_peering_connection') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::RemotePeeringConnection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_route_table(rt_id, update_route_table_details, opts = {}) ⇒ Response

Updates the specified route table’s display name or route rules. Avoid entering confidential information.

Note that the ‘routeRules` object you provide replaces the entire existing set of rules.

Parameters:

  • rt_id (String)

    The OCID of the route table.

  • update_route_table_details (OCI::Core::Models::UpdateRouteTableDetails)

    Details object for updating a route table.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
# File 'lib/oci/core/virtual_network_client.rb', line 9807

def update_route_table(rt_id, update_route_table_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_route_table.' if logger

  raise "Missing the required parameter 'rt_id' when calling update_route_table." if rt_id.nil?
  raise "Missing the required parameter 'update_route_table_details' when calling update_route_table." if update_route_table_details.nil?
  raise "Parameter value for 'rt_id' must not be blank" if OCI::Internal::Util.blank_string?(rt_id)

  path = '/routeTables/{rtId}'.sub('{rtId}', rt_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_route_table_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_route_table') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::RouteTable'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_security_list(security_list_id, update_security_list_details, opts = {}) ⇒ Response

Updates the specified security list’s display name or rules. Avoid entering confidential information.

Note that the ‘egressSecurityRules` or `ingressSecurityRules` objects you provide replace the entire existing objects.

Parameters:

  • security_list_id (String)

    The OCID of the security list.

  • update_security_list_details (OCI::Core::Models::UpdateSecurityListDetails)

    Updated details for the security list.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
# File 'lib/oci/core/virtual_network_client.rb', line 9870

def update_security_list(security_list_id, update_security_list_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_security_list.' if logger

  raise "Missing the required parameter 'security_list_id' when calling update_security_list." if security_list_id.nil?
  raise "Missing the required parameter 'update_security_list_details' when calling update_security_list." if update_security_list_details.nil?
  raise "Parameter value for 'security_list_id' must not be blank" if OCI::Internal::Util.blank_string?(security_list_id)

  path = '/securityLists/{securityListId}'.sub('{securityListId}', security_list_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_security_list_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_security_list') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::SecurityList'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_service_gateway(service_gateway_id, update_service_gateway_details, opts = {}) ⇒ Response

Updates the specified service gateway. The information you provide overwrites the existing attributes of the gateway.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
# File 'lib/oci/core/virtual_network_client.rb', line 9930

def update_service_gateway(service_gateway_id, update_service_gateway_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_service_gateway.' if logger

  raise "Missing the required parameter 'service_gateway_id' when calling update_service_gateway." if service_gateway_id.nil?
  raise "Missing the required parameter 'update_service_gateway_details' when calling update_service_gateway." if update_service_gateway_details.nil?
  raise "Parameter value for 'service_gateway_id' must not be blank" if OCI::Internal::Util.blank_string?(service_gateway_id)

  path = '/serviceGateways/{serviceGatewayId}'.sub('{serviceGatewayId}', service_gateway_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_service_gateway_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_service_gateway') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::ServiceGateway'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_subnet(subnet_id, update_subnet_details, opts = {}) ⇒ Response

Updates the specified subnet.

Parameters:

  • subnet_id (String)

    The OCID of the subnet.

  • update_subnet_details (OCI::Core::Models::UpdateSubnetDetails)

    Details object for updating a subnet.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
# File 'lib/oci/core/virtual_network_client.rb', line 9989

def update_subnet(subnet_id, update_subnet_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_subnet.' if logger

  raise "Missing the required parameter 'subnet_id' when calling update_subnet." if subnet_id.nil?
  raise "Missing the required parameter 'update_subnet_details' when calling update_subnet." if update_subnet_details.nil?
  raise "Parameter value for 'subnet_id' must not be blank" if OCI::Internal::Util.blank_string?(subnet_id)

  path = '/subnets/{subnetId}'.sub('{subnetId}', subnet_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_subnet_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_subnet') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Subnet'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_vcn(vcn_id, update_vcn_details, opts = {}) ⇒ Response

Updates the specified VCN.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:

  • (Response)

    A Response object with data of type Vcn



10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
# File 'lib/oci/core/virtual_network_client.rb', line 10048

def update_vcn(vcn_id, update_vcn_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_vcn.' if logger

  raise "Missing the required parameter 'vcn_id' when calling update_vcn." if vcn_id.nil?
  raise "Missing the required parameter 'update_vcn_details' when calling update_vcn." if update_vcn_details.nil?
  raise "Parameter value for 'vcn_id' must not be blank" if OCI::Internal::Util.blank_string?(vcn_id)

  path = '/vcns/{vcnId}'.sub('{vcnId}', vcn_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_vcn_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_vcn') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Vcn'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_virtual_circuit(virtual_circuit_id, update_virtual_circuit_details, opts = {}) ⇒ Response

Updates the specified virtual circuit. This can be called by either the customer who owns the virtual circuit, or the provider (when provisioning or de-provisioning the virtual circuit from their end). The documentation for update_virtual_circuit_details indicates who can update each property of the virtual circuit.

Important: If the virtual circuit is working and in the PROVISIONED state, updating any of the network-related properties (such as the DRG being used, the BGP ASN, and so on) will cause the virtual circuit’s state to switch to PROVISIONING and the related BGP session to go down. After Oracle re-provisions the virtual circuit, its state will return to PROVISIONED. Make sure you confirm that the associated BGP session is back up. For more information about the various states and how to test connectivity, see [FastConnect Overview](docs.cloud.oracle.com/Content/Network/Concepts/fastconnect.htm).

To change the list of public IP prefixes for a public virtual circuit, use bulk_add_virtual_circuit_public_prefixes and bulk_delete_virtual_circuit_public_prefixes. Updating the list of prefixes does NOT cause the BGP session to go down. However, Oracle must verify the customer’s ownership of each added prefix before traffic for that prefix will flow across the virtual circuit.

Parameters:

  • virtual_circuit_id (String)

    The OCID of the virtual circuit.

  • update_virtual_circuit_details (OCI::Core::Models::UpdateVirtualCircuitDetails)

    Update VirtualCircuit fields.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
# File 'lib/oci/core/virtual_network_client.rb', line 10130

def update_virtual_circuit(virtual_circuit_id, update_virtual_circuit_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_virtual_circuit.' if logger

  raise "Missing the required parameter 'virtual_circuit_id' when calling update_virtual_circuit." if virtual_circuit_id.nil?
  raise "Missing the required parameter 'update_virtual_circuit_details' when calling update_virtual_circuit." if update_virtual_circuit_details.nil?
  raise "Parameter value for 'virtual_circuit_id' must not be blank" if OCI::Internal::Util.blank_string?(virtual_circuit_id)

  path = '/virtualCircuits/{virtualCircuitId}'.sub('{virtualCircuitId}', virtual_circuit_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_virtual_circuit_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_virtual_circuit') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::VirtualCircuit'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_vnic(vnic_id, update_vnic_details, opts = {}) ⇒ Response

Updates the specified VNIC.

Parameters:

  • vnic_id (String)

    The OCID of the VNIC.

  • update_vnic_details (OCI::Core::Models::UpdateVnicDetails)

    Details object for updating a VNIC.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

Returns:



10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
# File 'lib/oci/core/virtual_network_client.rb', line 10189

def update_vnic(vnic_id, update_vnic_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#update_vnic.' if logger

  raise "Missing the required parameter 'vnic_id' when calling update_vnic." if vnic_id.nil?
  raise "Missing the required parameter 'update_vnic_details' when calling update_vnic." if update_vnic_details.nil?
  raise "Parameter value for 'vnic_id' must not be blank" if OCI::Internal::Util.blank_string?(vnic_id)

  path = '/vnics/{vnicId}'.sub('{vnicId}', vnic_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_vnic_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#update_vnic') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Core::Models::Vnic'
    )
  end
  # rubocop:enable Metrics/BlockLength
end