Class: OCI::Core::VirtualNetworkClient

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

Overview

Use the Core Services API to manage resources such as virtual cloud networks (VCNs), compute instances, and block storage volumes. For more information, see the console documentation for the Networking, Compute, and Block Volume services. The required permissions are documented in the Details for the Core Services article.

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



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/oci/core/virtual_network_client.rb', line 61

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # 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.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @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:



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

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


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

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


35
36
37
# File 'lib/oci/core/virtual_network_client.rb', line 35

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



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

def retry_config
  @retry_config
end

Instance Method Details

#add_drg_route_distribution_statements(drg_route_distribution_id, add_drg_route_distribution_statements_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_drg_route_distribution_statements API.

Adds one or more route distribution statements to the specified route distribution.

Parameters:

  • drg_route_distribution_id (String)

    The OCID of the route distribution.

  • add_drg_route_distribution_statements_details (OCI::Core::Models::AddDrgRouteDistributionStatementsDetails)

    Request with one or more route distribution statements to be inserted into the route distribution.

  • 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:



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/oci/core/virtual_network_client.rb', line 119

def add_drg_route_distribution_statements(drg_route_distribution_id, add_drg_route_distribution_statements_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#add_drg_route_distribution_statements.' if logger

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

  path = '/drgRouteDistributions/{drgRouteDistributionId}/actions/addDrgRouteDistributionStatements'.sub('{drgRouteDistributionId}', drg_route_distribution_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_drg_route_distribution_statements_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#add_drg_route_distribution_statements') 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: 'Array<OCI::Core::Models::DrgRouteDistributionStatement>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#add_drg_route_rules(drg_route_table_id, add_drg_route_rules_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_drg_route_rules API.

Adds one or more static route rules to the specified DRG route table.

Parameters:

  • drg_route_table_id (String)

    The OCID of the DRG route table.

  • add_drg_route_rules_details (OCI::Core::Models::AddDrgRouteRulesDetails)

    Request for one or more route rules to be inserted into the DRG 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

  • :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:



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/oci/core/virtual_network_client.rb', line 181

def add_drg_route_rules(drg_route_table_id, add_drg_route_rules_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#add_drg_route_rules.' if logger

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

  path = '/drgRouteTables/{drgRouteTableId}/actions/addDrgRouteRules'.sub('{drgRouteTableId}', drg_route_table_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-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(add_drg_route_rules_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#add_drg_route_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: 'Array<OCI::Core::Models::DrgRouteRule>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#add_ipv6_subnet_cidr(subnet_id, add_subnet_ipv6_cidr_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_ipv6_subnet_cidr API.

Add an IPv6 prefix to a subnet.

Parameters:

  • subnet_id (String)

    The OCID of the subnet.

  • add_subnet_ipv6_cidr_details (OCI::Core::Models::AddSubnetIpv6CidrDetails)

    Details object for adding an IPv6 prefix to 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

  • :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).

  • :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



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/oci/core/virtual_network_client.rb', line 251

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

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

  path = '/subnets/{subnetId}/actions/addIpv6Cidr'.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-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  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
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(add_subnet_ipv6_cidr_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#add_ipv6_subnet_cidr') 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

#add_ipv6_vcn_cidr(vcn_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_ipv6_vcn_cidr API.

Add an IPv6 prefix to a VCN. The VCN size is always /56 and assigned by Oracle. Once added the IPv6 prefix cannot be removed or modified.

Parameters:

  • vcn_id (String)

    The OCID of the VCN.

  • 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).

  • :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.

  • :add_vcn_ipv6_cidr_details (OCI::Core::Models::AddVcnIpv6CidrDetails)

    Details object for adding an IPv6 VCN CIDR.

Returns:

  • (Response)

    A Response object with data of type nil



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/oci/core/virtual_network_client.rb', line 324

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

  raise "Missing the required parameter 'vcn_id' when calling add_ipv6_vcn_cidr." 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}/actions/addIpv6Cidr'.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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(opts[:add_vcn_ipv6_cidr_details])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#add_ipv6_vcn_cidr') 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

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

Note:

Click here to see an example of how to use add_network_security_group_security_rules API.

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

Parameters:

  • network_security_group_id (String)

    The OCID of the network security group.

  • add_network_security_group_security_rules_details (OCI::Core::Models::AddNetworkSecurityGroupSecurityRulesDetails)

    Request with one or more security rules to be associated with the network security 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:



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
413
414
415
416
417
418
# File 'lib/oci/core/virtual_network_client.rb', line 382

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

#add_public_ip_pool_capacity(public_ip_pool_id, add_public_ip_pool_capacity_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_public_ip_pool_capacity API.

Adds some or all of a CIDR block to a public IP pool.

The CIDR block (or subrange) must not overlap with any other CIDR block already added to this or any other public IP pool.

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:



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
480
481
482
483
484
485
486
487
488
# File 'lib/oci/core/virtual_network_client.rb', line 449

def add_public_ip_pool_capacity(public_ip_pool_id, add_public_ip_pool_capacity_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#add_public_ip_pool_capacity.' if logger

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

  path = '/publicIpPools/{publicIpPoolId}/actions/addCapacity'.sub('{publicIpPoolId}', public_ip_pool_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(add_public_ip_pool_capacity_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#add_public_ip_pool_capacity') 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::PublicIpPool'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#add_vcn_cidr(vcn_id, add_vcn_cidr_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use add_vcn_cidr API.

Adds a CIDR block to a VCN. The CIDR block you add:

  • Must be valid.

  • Must not overlap with another CIDR block in the VCN, a CIDR block of a peered VCN, or the on-premises network CIDR block.

  • Must not exceed the limit of CIDR blocks allowed per VCN.

Note: Adding a CIDR block places your VCN in an updating state until the changes are complete. You cannot create or update the VCN's subnets, VLANs, LPGs, or route tables during this operation. The time to completion can take a few minutes. You can use the GetWorkRequest operation to check the status of the update.

Parameters:

  • vcn_id (String)

    The OCID of the VCN.

  • add_vcn_cidr_details (OCI::Core::Models::AddVcnCidrDetails)

    Details object for deleting a VCN CIDR.

  • 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).

  • :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



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/oci/core/virtual_network_client.rb', line 526

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

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

  path = '/vcns/{vcnId}/actions/addCidr'.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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(add_vcn_cidr_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#add_vcn_cidr') 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
Note:

Click here to see an example of how to use advertise_byoip_range API.

Begins BGP route advertisements for the BYOIP CIDR block you imported to the Oracle Cloud. The ByoipRange resource must be in the PROVISIONED state before the BYOIP CIDR block routes can be advertised with BGP.

Parameters:

  • byoip_range_id (String)

    The OCID of the ByoipRange resource containing the BYOIP CIDR block.

  • 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.

Returns:

  • (Response)

    A Response object with data of type nil



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
614
615
616
617
618
619
620
621
622
# File 'lib/oci/core/virtual_network_client.rb', line 587

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

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

  path = '/byoipRanges/{byoipRangeId}/actions/advertise'.sub('{byoipRangeId}', byoip_range_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#advertise_byoip_range') 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

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

Note:

Click here to see an example of how to use attach_service_id API.

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:

  • service_gateway_id (String)

    The service gateway's OCID.

  • attach_service_details (OCI::Core::Models::ServiceIdRequestDetails)

    ServiceId of Service to be attached to a service 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:



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
681
682
683
684
685
686
687
688
689
690
691
# File 'lib/oci/core/virtual_network_client.rb', line 654

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

Note:

Click here to see an example of how to use bulk_add_virtual_circuit_public_prefixes API.

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:

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



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

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

Note:

Click here to see an example of how to use bulk_delete_virtual_circuit_public_prefixes API.

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



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

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_byoip_range_compartment(byoip_range_id, change_byoip_range_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_byoip_range_compartment API.

Moves a BYOIP CIDR block to a different compartment. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • byoip_range_id (String)

    The OCID of the ByoipRange resource containing the BYOIP CIDR block.

  • change_byoip_range_compartment_details (OCI::Core::Models::ChangeByoipRangeCompartmentDetails)

    Request to change the compartment of a BYOIP CIDR block.

  • 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



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

def change_byoip_range_compartment(byoip_range_id, change_byoip_range_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_byoip_range_compartment.' if logger

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

  path = '/byoipRanges/{byoipRangeId}/actions/changeCompartment'.sub('{byoipRangeId}', byoip_range_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_byoip_range_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_byoip_range_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_capture_filter_compartment(capture_filter_id, change_capture_filter_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_capture_filter_compartment API.

Moves a capture filter to a new compartment in the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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.

  • :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



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

def change_capture_filter_compartment(capture_filter_id, change_capture_filter_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_capture_filter_compartment.' if logger

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

  path = '/captureFilters/{captureFilterId}/actions/changeCompartment'.sub('{captureFilterId}', capture_filter_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]
  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_capture_filter_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_capture_filter_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_cpe_compartment(cpe_id, change_cpe_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_cpe_compartment API.

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.

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



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

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

Note:

Click here to see an example of how to use change_cross_connect_compartment API.

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.

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



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
1083
1084
1085
1086
# File 'lib/oci/core/virtual_network_client.rb', line 1048

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

Note:

Click here to see an example of how to use change_cross_connect_group_compartment API.

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.

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



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
1150
1151
1152
1153
1154
# File 'lib/oci/core/virtual_network_client.rb', line 1116

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_dhcp_options_compartment(dhcp_id, change_dhcp_options_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_dhcp_options_compartment API.

Moves a set of DHCP options into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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



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
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
# File 'lib/oci/core/virtual_network_client.rb', line 1184

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

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

  path = '/dhcps/{dhcpId}/actions/changeCompartment'.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[:'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_dhcp_options_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_dhcp_options_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_drg_compartment(drg_id, change_drg_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_drg_compartment API.

Moves a DRG into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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



1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
# File 'lib/oci/core/virtual_network_client.rb', line 1252

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

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

  path = '/drgs/{drgId}/actions/changeCompartment'.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[:'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_drg_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_drg_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_internet_gateway_compartment(ig_id, change_internet_gateway_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_internet_gateway_compartment API.

Moves an internet gateway into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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



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
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
# File 'lib/oci/core/virtual_network_client.rb', line 1320

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

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

  path = '/internetGateways/{igId}/actions/changeCompartment'.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[:'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_internet_gateway_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_internet_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_ip_sec_connection_compartment(ipsc_id, change_ip_sec_connection_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_ip_sec_connection_compartment API.

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.

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



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

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_local_peering_gateway_compartment(local_peering_gateway_id, change_local_peering_gateway_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_local_peering_gateway_compartment API.

Moves a local peering gateway into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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



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

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

  raise "Missing the required parameter 'local_peering_gateway_id' when calling change_local_peering_gateway_compartment." if local_peering_gateway_id.nil?
  raise "Missing the required parameter 'change_local_peering_gateway_compartment_details' when calling change_local_peering_gateway_compartment." if change_local_peering_gateway_compartment_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/changeCompartment'.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[:'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_local_peering_gateway_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_local_peering_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_nat_gateway_compartment(nat_gateway_id, change_nat_gateway_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_nat_gateway_compartment API.

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.

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



1524
1525
1526
1527
1528
1529
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
# File 'lib/oci/core/virtual_network_client.rb', line 1524

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_network_security_group_compartment(network_security_group_id, change_network_security_group_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_network_security_group_compartment API.

Moves a network security group into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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



1591
1592
1593
1594
1595
1596
1597
1598
1599
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
# File 'lib/oci/core/virtual_network_client.rb', line 1591

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

  raise "Missing the required parameter 'network_security_group_id' when calling change_network_security_group_compartment." if network_security_group_id.nil?
  raise "Missing the required parameter 'change_network_security_group_compartment_details' when calling change_network_security_group_compartment." if change_network_security_group_compartment_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/changeCompartment'.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[:'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_network_security_group_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_network_security_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_public_ip_compartment(public_ip_id, change_public_ip_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_public_ip_compartment API.

Moves a public IP into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

This operation applies only to reserved public IPs. Ephemeral public IPs always belong to the same compartment as their VNIC and move accordingly.

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



1662
1663
1664
1665
1666
1667
1668
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
# File 'lib/oci/core/virtual_network_client.rb', line 1662

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

  raise "Missing the required parameter 'public_ip_id' when calling change_public_ip_compartment." if public_ip_id.nil?
  raise "Missing the required parameter 'change_public_ip_compartment_details' when calling change_public_ip_compartment." if change_public_ip_compartment_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}/actions/changeCompartment'.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[:'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_public_ip_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_public_ip_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_public_ip_pool_compartment(public_ip_pool_id, change_public_ip_pool_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_public_ip_pool_compartment API.

Moves a public IP pool to a different compartment. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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



1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
# File 'lib/oci/core/virtual_network_client.rb', line 1730

def change_public_ip_pool_compartment(public_ip_pool_id, change_public_ip_pool_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_public_ip_pool_compartment.' if logger

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

  path = '/publicIpPools/{publicIpPoolId}/actions/changeCompartment'.sub('{publicIpPoolId}', public_ip_pool_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_public_ip_pool_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_public_ip_pool_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

Note:

Click here to see an example of how to use change_remote_peering_connection_compartment API.

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.

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



1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
# File 'lib/oci/core/virtual_network_client.rb', line 1798

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

Note:

Click here to see an example of how to use change_route_table_compartment API.

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.

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



1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
# File 'lib/oci/core/virtual_network_client.rb', line 1866

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

Note:

Click here to see an example of how to use change_security_list_compartment API.

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.

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



1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
# File 'lib/oci/core/virtual_network_client.rb', line 1934

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

Note:

Click here to see an example of how to use change_service_gateway_compartment API.

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.

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



2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
# File 'lib/oci/core/virtual_network_client.rb', line 2002

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

Note:

Click here to see an example of how to use change_subnet_compartment API.

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.

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



2070
2071
2072
2073
2074
2075
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
# File 'lib/oci/core/virtual_network_client.rb', line 2070

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

Note:

Click here to see an example of how to use change_vcn_compartment API.

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.

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



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

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

Note:

Click here to see an example of how to use change_virtual_circuit_compartment API.

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.

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



2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
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
# File 'lib/oci/core/virtual_network_client.rb', line 2206

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

#change_vlan_compartment(vlan_id, change_vlan_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_vlan_compartment API.

Moves a VLAN into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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.

  • :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



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
2312
2313
2314
2315
2316
2317
# File 'lib/oci/core/virtual_network_client.rb', line 2278

def change_vlan_compartment(vlan_id, change_vlan_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_vlan_compartment.' if logger

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

  path = '/vlans/{vlanId}/actions/changeCompartment'.sub('{vlanId}', vlan_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]
  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_vlan_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_vlan_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_vtap_compartment(vtap_id, change_vtap_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_vtap_compartment API.

Moves a VTAP to a new compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different 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

  • :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.

  • :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



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
2385
2386
2387
2388
2389
2390
# File 'lib/oci/core/virtual_network_client.rb', line 2351

def change_vtap_compartment(vtap_id, change_vtap_compartment_details, opts = {})
  logger.debug 'Calling operation VirtualNetworkClient#change_vtap_compartment.' if logger

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

  path = '/vtaps/{vtapId}/actions/changeCompartment'.sub('{vtapId}', vtap_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]
  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_vtap_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#change_vtap_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

Note:

Click here to see an example of how to use connect_local_peering_gateways API.

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.

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



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

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

Note:

Click here to see an example of how to use connect_remote_peering_connections API.

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.

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



2481
2482
2483
2484
2485
2486
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
# File 'lib/oci/core/virtual_network_client.rb', line 2481

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_byoip_range(create_byoip_range_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_byoip_range API.

Creates a subrange of the BYOIP CIDR block.

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:



2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
# File 'lib/oci/core/virtual_network_client.rb', line 2544

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

  raise "Missing the required parameter 'create_byoip_range_details' when calling create_byoip_range." if create_byoip_range_details.nil?

  path = '/byoipRanges'
  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_byoip_range_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_byoip_range') 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::ByoipRange'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_capture_filter(create_capture_filter_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_capture_filter API.

Creates a virtual test access point (VTAP) capture filter in the specified compartment.

For the purposes of access control, you must provide the OCID of the compartment that contains the VTAP. For more information about compartments and access control, see Overview of the IAM Service. For information about OCIDs, see Resource Identifiers.

You may optionally specify a display name for the VTAP, otherwise a default is provided. It does not have to be unique, and you can change it.

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).

  • :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:



2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
# File 'lib/oci/core/virtual_network_client.rb', line 2616

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

  raise "Missing the required parameter 'create_capture_filter_details' when calling create_capture_filter." if create_capture_filter_details.nil?

  path = '/captureFilters'
  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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_capture_filter_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_capture_filter') 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::CaptureFilter'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use create_cpe API.

Creates a new virtual customer-premises equipment (CPE) object in the specified compartment. For more information, see Site-to-Site VPN Overview.

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. For information about OCIDs, see Resource Identifiers.

You must provide the public IP address of your on-premises router. See CPE Configuration.

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



2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
# File 'lib/oci/core/virtual_network_client.rb', line 2691

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

Note:

Click here to see an example of how to use create_cross_connect API.

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.

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. For information about OCIDs, see Resource Identifiers.

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:



2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
# File 'lib/oci/core/virtual_network_client.rb', line 2769

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

Note:

Click here to see an example of how to use create_cross_connect_group API.

Creates a new cross-connect group to use with Oracle Cloud Infrastructure FastConnect. For more information, see FastConnect Overview.

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. For information about OCIDs, see Resource Identifiers.

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:



2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
# File 'lib/oci/core/virtual_network_client.rb', line 2843

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

Note:

Click here to see an example of how to use create_dhcp_options API.

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. For information about OCIDs, see Resource Identifiers.

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:



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

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

Note:

Click here to see an example of how to use create_drg API.

Creates a new dynamic routing gateway (DRG) in the specified compartment. For more information, see Dynamic Routing Gateways (DRGs).

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. For information about OCIDs, see Resource Identifiers.

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



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
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
# File 'lib/oci/core/virtual_network_client.rb', line 2985

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

Note:

Click here to see an example of how to use create_drg_attachment API.

Attaches the specified DRG to the specified network resource. A VCN can be attached to only one DRG at a time, but a DRG can be attached to more than one VCN. The response includes a DrgAttachment object with its own OCID. For more information about DRGs, see Dynamic Routing Gateways (DRGs).

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 currently selected compartment. For more information about compartments and access control, see Overview of the IAM Service.

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:



3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
# File 'lib/oci/core/virtual_network_client.rb', line 3055

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_drg_route_distribution(create_drg_route_distribution_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_drg_route_distribution API.

Creates a new route distribution for the specified DRG. Assign the route distribution as an import distribution to a DRG route table using the UpdateDrgRouteTable or CreateDrgRouteTable operations. Assign the route distribution as an export distribution to a DRG attachment using the UpdateDrgAttachment or CreateDrgAttachment operations.

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:



3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
# File 'lib/oci/core/virtual_network_client.rb', line 3118

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

  raise "Missing the required parameter 'create_drg_route_distribution_details' when calling create_drg_route_distribution." if create_drg_route_distribution_details.nil?

  path = '/drgRouteDistributions'
  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_route_distribution_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_drg_route_distribution') 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::DrgRouteDistribution'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_drg_route_table(create_drg_route_table_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_drg_route_table API.

Creates a new DRG route table for the specified DRG. Assign the DRG route table to a DRG attachment using the UpdateDrgAttachment or CreateDrgAttachment operations.

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:



3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
# File 'lib/oci/core/virtual_network_client.rb', line 3179

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

  raise "Missing the required parameter 'create_drg_route_table_details' when calling create_drg_route_table." if create_drg_route_table_details.nil?

  path = '/drgRouteTables'
  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_route_table_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_drg_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::DrgRouteTable'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use create_internet_gateway API.

Creates a new internet gateway for the specified VCN. For more information, see Access to the Internet.

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.

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:



3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
# File 'lib/oci/core/virtual_network_client.rb', line 3258

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

Note:

Click here to see an example of how to use create_ip_sec_connection API.

Creates a new IPSec connection between the specified DRG and CPE. For more information, see Site-to-Site VPN Overview.

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.

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 CPE Configuration.

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:



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
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
# File 'lib/oci/core/virtual_network_client.rb', line 3345

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

Note:

Click here to see an example of how to use create_ipv6 API.

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:



3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
# File 'lib/oci/core/virtual_network_client.rb', line 3408

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

Note:

Click here to see an example of how to use create_local_peering_gateway API.

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:



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
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
# File 'lib/oci/core/virtual_network_client.rb', line 3469

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

Note:

Click here to see an example of how to use create_nat_gateway API.

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:



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
3560
3561
3562
3563
3564
3565
3566
# File 'lib/oci/core/virtual_network_client.rb', line 3530

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

Note:

Click here to see an example of how to use create_network_security_group API.

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:



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

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

Note:

Click here to see an example of how to use create_private_ip API.

Creates a secondary private IP for the specified VNIC. For more information about secondary private IPs, see IP 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

  • :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:



3652
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 3652

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

Note:

Click here to see an example of how to use create_public_ip API.

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.

  • 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:



3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
# File 'lib/oci/core/virtual_network_client.rb', line 3732

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_public_ip_pool(create_public_ip_pool_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_public_ip_pool API.

Creates a public IP pool.

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:



3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
# File 'lib/oci/core/virtual_network_client.rb', line 3795

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

  raise "Missing the required parameter 'create_public_ip_pool_details' when calling create_public_ip_pool." if create_public_ip_pool_details.nil?

  path = '/publicIpPools'
  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_public_ip_pool_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_public_ip_pool') 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::PublicIpPool'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use create_remote_peering_connection API.

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:



3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
# File 'lib/oci/core/virtual_network_client.rb', line 3856

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

Note:

Click here to see an example of how to use create_route_table API.

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. For general information about route tables in your VCN and the types of targets you can use in route rules, see Route Tables.

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. For information about OCIDs, see Resource Identifiers.

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:



3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
# File 'lib/oci/core/virtual_network_client.rb', line 3930

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

Note:

Click here to see an example of how to use create_security_list API.

Creates a new security list for the specified VCN. For more information about security lists, see Security Lists. For information on the number of rules you can have in a security list, see Service Limits.

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. For information about OCIDs, see Resource Identifiers.

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:



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

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

Note:

Click here to see an example of how to use create_service_gateway API.

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. For information about OCIDs, see Resource Identifiers.

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:



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

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

Note:

Click here to see an example of how to use create_subnet API.

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. For information on the number of subnets you can have in a VCN, see Service Limits.

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. For information about OCIDs, see Resource Identifiers.

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.

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.

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.

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.

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:



4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
# File 'lib/oci/core/virtual_network_client.rb', line 4161

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

Note:

Click here to see an example of how to use create_vcn API.

Creates a new virtual cloud network (VCN). For more information, see VCNs and Subnets.

For the VCN, you specify a list of one or more IPv4 CIDR blocks that meet the following criteria:

  • The CIDR blocks must be valid.

  • They must not overlap with each other or with the on-premises network CIDR block.

  • The number of CIDR blocks does not exceed the limit of CIDR blocks allowed per VCN.

For a CIDR block, Oracle recommends that you use one of the private IP address ranges specified in RFC 1918 (10.0.0.0/8, 172.16/12, and 192.168/16). Example: 172.16.0.0/16. The CIDR blocks can range from /16 to /30.

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. For information about OCIDs, see Resource Identifiers.

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.

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 a Site-to-Site VPN or FastConnect. For more information, see Overview of the Networking Service.

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



4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
# File 'lib/oci/core/virtual_network_client.rb', line 4253

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

Note:

Click here to see an example of how to use create_virtual_circuit API.

Creates a new virtual circuit to use with Oracle Cloud Infrastructure FastConnect. For more information, see FastConnect Overview.

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. For information about OCIDs, see Resource Identifiers.

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.

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:



4333
4334
4335
4336
4337
4338
4339
4340
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
# File 'lib/oci/core/virtual_network_client.rb', line 4333

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

#create_vlan(create_vlan_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_vlan API.

Creates a VLAN 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

  • :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).

  • :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:



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
4430
4431
4432
4433
# File 'lib/oci/core/virtual_network_client.rb', line 4396

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

  raise "Missing the required parameter 'create_vlan_details' when calling create_vlan." if create_vlan_details.nil?

  path = '/vlans'
  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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_vlan_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_vlan') 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::Vlan'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_vtap(create_vtap_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_vtap API.

Creates a virtual test access point (VTAP) in the specified compartment.

For the purposes of access control, you must provide the OCID of the compartment that contains the VTAP. For more information about compartments and access control, see Overview of the IAM Service. For information about OCIDs, see Resource Identifiers.

You may optionally specify a display name for the VTAP, otherwise a default is provided. It does not have to be unique, and you can change it.

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).

  • :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:



4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
# File 'lib/oci/core/virtual_network_client.rb', line 4468

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

  raise "Missing the required parameter 'create_vtap_details' when calling create_vtap." if create_vtap_details.nil?

  path = '/vtaps'
  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]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_vtap_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VirtualNetworkClient#create_vtap') 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::Vtap'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_byoip_range(byoip_range_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_byoip_range API.

Deletes the specified ByoipRange resource. The resource must be in one of the following states: CREATING, PROVISIONED, ACTIVE, or FAILED. It must not have any subranges currently allocated to a PublicIpPool object or the deletion will fail. You must specify the OCID. If the ByoipRange resource is currently in the PROVISIONED or ACTIVE state, it will be de-provisioned and then deleted.

Parameters:

  • byoip_range_id (String)

    The OCID of the ByoipRange resource containing the BYOIP CIDR block.

  • 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.

  • :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



4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
# File 'lib/oci/core/virtual_network_client.rb', line 4534

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

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

  path = '/byoipRanges/{byoipRangeId}'.sub('{byoipRangeId}', byoip_range_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[:'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_byoip_range') 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_capture_filter(capture_filter_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_capture_filter API.

Deletes the specified VTAP capture filter. This is an asynchronous operation. The VTAP capture filter's lifecycleState will change to TERMINATING temporarily until the VTAP capture filter is completely removed.

Parameters:

  • capture_filter_id (String)

    The OCID of the capture filter.

  • 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.

  • :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



4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
# File 'lib/oci/core/virtual_network_client.rb', line 4596

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

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

  path = '/captureFilters/{captureFilterId}'.sub('{captureFilterId}', capture_filter_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_capture_filter') 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_cpe(cpe_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_cpe API.

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



4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
# File 'lib/oci/core/virtual_network_client.rb', line 4656

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