Class: OracleBMC::Core::VirtualNetworkClient

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil) ⇒ VirtualNetworkClient

Creates a new VirtualNetworkClient. If a config is not specified, then the global OracleBMC.config will be used.

A region must be specified in either the config 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.



32
33
34
35
36
37
38
39
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 32

def initialize(config:nil, region:nil)
  config ||= OracleBMC.config
  signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase)
  @api_client = ApiClient.new(config, signer)

  region ||= config.region
  self.region = region
end

Instance Attribute Details

#api_clientOracleBMC::ApiClient (readonly)

Client used to make HTTP requests.



12
13
14
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 12

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


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

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


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

def region
  @region
end

Instance Method Details

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

Creates a new virtual Customer-Premise Equipment (CPE) object in the specified compartment. For more information, see [Managing Customer-Premise Equipment (CPE)](docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingCPEs.htm).

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

You must provide the public IP address of your on-premise router. See [Configuring Your On-Premise Router](docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm).

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

Parameters:

  • create_cpe_details (CreateCpeDetails)

    Details for creating a CPE.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::Cpe



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 88

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

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

  path = "/cpes"

  # 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']

  post_body = @api_client.object_to_http_body(create_cpe_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Cpe')
end

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

Creates a new set of DHCP options for the specified VCN. The only option available to use is DhcpDnsOption, which lets you specify how DNS (host name resolution) is handled in the subnets in your VCN. For more information, see [Managing DHCP Options](docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDHCP.htm).

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

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

Parameters:

  • create_dhcp_details (CreateDhcpDetails)

    Request object for creating a new set of DHCP options.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::DhcpOptions



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 140

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

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

  path = "/dhcps"

  # 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']

  post_body = @api_client.object_to_http_body(create_dhcp_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::DhcpOptions')
end

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

Creates a new Dynamic Routing Gateway (DRG) in the specified compartment. For more information, see [Managing Dynamic Routing Gateways (DRGs)](docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingDRGs.htm).

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

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

Parameters:

  • create_drg_details (CreateDrgDetails)

    Details for creating a DRG.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::Drg



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

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

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

  path = "/drgs"

  # 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']

  post_body = @api_client.object_to_http_body(create_drg_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Drg')
end

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

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

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

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

Parameters:

  • create_drg_attachment_details (CreateDrgAttachmentDetails)

    Details for creating a ‘DrgAttachment`.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::DrgAttachment



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 238

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

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

  path = "/drgAttachments"

  # 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']

  post_body = @api_client.object_to_http_body(create_drg_attachment_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::DrgAttachment')
end

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

Creates a new Internet Gateway for the specified VCN. For more information, see [Managing Internet Gateways](docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIGs.htm).

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

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

For traffic to flow between a subnet and an Internet Gateway, you must create a route rule accordingly in the subnet’s route table (e.g., 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:

  • create_internet_gateway_details (CreateInternetGatewayDetails)

    Details for creating a new Internet Gateway.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::InternetGateway



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 297

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

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

  path = "/internetGateways"

  # 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']

  post_body = @api_client.object_to_http_body(create_internet_gateway_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::InternetGateway')
end

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

Creates a new IPSec connection between the specified DRG and CPE. For more information, see [Managing IPSec Connections](docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingIPsec.htm).

In the request, you must include at least one static route to the CPE object (you’re allowed a maximum of 10). For example: 10.0.8.0/16.

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 CPE. For more information about compartments and access control, see [Overview of the IAM Service](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about OCIDs, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).

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

After creating the IPSec connection, you need to configure your on-premise router with tunnel-specific information returned by get_ip_sec_connection_device_config. For each tunnel, that operation gives you the IP address of Oracle’s VPN headend and the shared secret (i.e., the pre-shared key). For more information, see [Configuring Your On-Premise Router](docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/configuringCPE.htm).

To get the status of the tunnels (whether they’re up or down), use get_ip_sec_connection_device_status.

Parameters:

  • create_ip_sec_connection_details (CreateIPSecConnectionDetails)

    Details for creating an ‘IPSecConnection`.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::IPSecConnection



361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 361

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

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

  path = "/ipsecConnections"

  # 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']

  post_body = @api_client.object_to_http_body(create_ip_sec_connection_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::IPSecConnection')
end

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

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

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

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

Parameters:

  • create_route_table_details (CreateRouteTableDetails)

    Details for creating a new route table.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::RouteTable



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 413

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

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

  path = "/routeTables"

  # 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']

  post_body = @api_client.object_to_http_body(create_route_table_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::RouteTable')
end

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

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

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

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

Parameters:

  • create_security_list_details (CreateSecurityListDetails)

    Details regarding the security list to create.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::SecurityList



465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 465

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

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

  path = "/securityLists"

  # 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']

  post_body = @api_client.object_to_http_body(create_security_list_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::SecurityList')
end

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

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

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

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

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

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

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

Parameters:

  • create_subnet_details (CreateSubnetDetails)

    Details for creating a subnet.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::Subnet



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

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

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

  path = "/subnets"

  # 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']

  post_body = @api_client.object_to_http_body(create_subnet_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Subnet')
end

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

Creates a new Virtual Cloud Network (VCN). For more information, see [Managing Virtual Cloud Networks (VCNs)](docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm).

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

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

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

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 (i.e., route rules, etc.)

The VCN and subnets you create are not accessible until you attach an Internet Gateway or set up a VPN. For more information, see [Typical Networking Service Scenarios](docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/overview.htm#three).

Parameters:

  • create_vcn_details (CreateVcnDetails)

    Details for creating a new VCN.

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g., 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 OracleBMC::Core::Models::Vcn



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

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

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

  path = "/vcns"

  # 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']

  post_body = @api_client.object_to_http_body(create_vcn_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Vcn')
end

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

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

Parameters:

  • cpe_id (String)

    The OCID of the CPE.

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

    the optional parameters

Options Hash (opts):

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



632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 632

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

  fail "Missing the required parameter 'cpe_id' when calling delete_cpe." if cpe_id.nil?

  path = "/cpes/{cpeId}".sub('{cpeId}', cpe_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

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

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

Parameters:

  • dhcp_id (String)

    The OCID for the set of DHCP options.

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

    the optional parameters

Options Hash (opts):

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



672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 672

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

  fail "Missing the required parameter 'dhcp_id' when calling delete_dhcp_options." if dhcp_id.nil?

  path = "/dhcps/{dhcpId}".sub('{dhcpId}', dhcp_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

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

Parameters:

  • drg_id (String)

    The OCID of the DRG.

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

    the optional parameters

Options Hash (opts):

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



711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 711

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

  fail "Missing the required parameter 'drg_id' when calling delete_drg." if drg_id.nil?

  path = "/drgs/{drgId}".sub('{drgId}', drg_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

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

Parameters:

  • drg_attachment_id (String)

    The OCID of the DRG attachment.

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

    the optional parameters

Options Hash (opts):

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



749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 749

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

  fail "Missing the required parameter 'drg_attachment_id' when calling delete_drg_attachment." if drg_attachment_id.nil?

  path = "/drgAttachments/{drgAttachmentId}".sub('{drgAttachmentId}', drg_attachment_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

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

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

Parameters:

  • ig_id (String)

    The OCID of the Internet Gateway.

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

    the optional parameters

Options Hash (opts):

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



789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 789

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

  fail "Missing the required parameter 'ig_id' when calling delete_internet_gateway." if ig_id.nil?

  path = "/internetGateways/{igId}".sub('{igId}', ig_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

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

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

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Options Hash (opts):

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



832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 832

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

  fail "Missing the required parameter 'ipsc_id' when calling delete_ip_sec_connection." if ipsc_id.nil?

  path = "/ipsecConnections/{ipscId}".sub('{ipscId}', ipsc_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

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

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

Parameters:

  • rt_id (String)

    The OCID of the route table.

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

    the optional parameters

Options Hash (opts):

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



872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 872

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

  fail "Missing the required parameter 'rt_id' when calling delete_route_table." if rt_id.nil?

  path = "/routeTables/{rtId}".sub('{rtId}', rt_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

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

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

Parameters:

  • security_list_id (String)

    The OCID of the security list.

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

    the optional parameters

Options Hash (opts):

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



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

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

  fail "Missing the required parameter 'security_list_id' when calling delete_security_list." if security_list_id.nil?

  path = "/securityLists/{securityListId}".sub('{securityListId}', security_list_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

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

Parameters:

  • subnet_id (String)

    The OCID of the subnet.

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

    the optional parameters

Options Hash (opts):

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



950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 950

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

  fail "Missing the required parameter 'subnet_id' when calling delete_subnet." if subnet_id.nil?

  path = "/subnets/{subnetId}".sub('{subnetId}', subnet_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

Deletes the specified VCN. The VCN must be empty and have no attached gateways. This is an asynchronous operation; the VCN’s ‘lifecycleState` will change to TERMINATING temporarily until the VCN is completely removed.

Parameters:

  • vcn_id (String)

    The OCID of the VCN.

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

    the optional parameters

Options Hash (opts):

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



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

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

  fail "Missing the required parameter 'vcn_id' when calling delete_vcn." if vcn_id.nil?

  path = "/vcns/{vcnId}".sub('{vcnId}', vcn_id.to_s)

  # 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']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

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

Gets the specified CPE’s information.

Parameters:

  • cpe_id (String)

    The OCID of the CPE.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Cpe



1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1019

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

  fail "Missing the required parameter 'cpe_id' when calling get_cpe." if cpe_id.nil?

  path = "/cpes/{cpeId}".sub('{cpeId}', cpe_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Cpe')
end

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

Gets the specified set of DHCP options.

Parameters:

  • dhcp_id (String)

    The OCID for the set of DHCP options.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::DhcpOptions



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

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

  fail "Missing the required parameter 'dhcp_id' when calling get_dhcp_options." if dhcp_id.nil?

  path = "/dhcps/{dhcpId}".sub('{dhcpId}', dhcp_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::DhcpOptions')
end

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

Gets the specified DRG’s information.

Parameters:

  • drg_id (String)

    The OCID of the DRG.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Drg



1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1081

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

  fail "Missing the required parameter 'drg_id' when calling get_drg." if drg_id.nil?

  path = "/drgs/{drgId}".sub('{drgId}', drg_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Drg')
end

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

Gets the information for the specified ‘DrgAttachment`.

Parameters:

  • drg_attachment_id (String)

    The OCID of the DRG attachment.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::DrgAttachment



1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1112

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

  fail "Missing the required parameter 'drg_attachment_id' when calling get_drg_attachment." if drg_attachment_id.nil?

  path = "/drgAttachments/{drgAttachmentId}".sub('{drgAttachmentId}', drg_attachment_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::DrgAttachment')
end

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

Gets the specified Internet Gateway’s information.

Parameters:

  • ig_id (String)

    The OCID of the Internet Gateway.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::InternetGateway



1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1143

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

  fail "Missing the required parameter 'ig_id' when calling get_internet_gateway." if ig_id.nil?

  path = "/internetGateways/{igId}".sub('{igId}', ig_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::InternetGateway')
end

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

Gets the specified IPSec connection’s basic information, including the static routes for the on-premise router. If you want the status of the connection (whether it’s up or down), use get_ip_sec_connection_device_status.

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::IPSecConnection



1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1177

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

  fail "Missing the required parameter 'ipsc_id' when calling get_ip_sec_connection." if ipsc_id.nil?

  path = "/ipsecConnections/{ipscId}".sub('{ipscId}', ipsc_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::IPSecConnection')
end

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

Gets the configuration information for the specified IPSec connection. For each tunnel, the response includes the IP address of Oracle’s VPN headend and the shared secret.

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::IPSecConnectionDeviceConfig



1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1210

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

  fail "Missing the required parameter 'ipsc_id' when calling get_ip_sec_connection_device_config." if ipsc_id.nil?

  path = "/ipsecConnections/{ipscId}/deviceConfig".sub('{ipscId}', ipsc_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::IPSecConnectionDeviceConfig')
end

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

Gets the status of the specified IPSec connection (whether it’s up or down).

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::IPSecConnectionDeviceStatus



1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1242

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

  fail "Missing the required parameter 'ipsc_id' when calling get_ip_sec_connection_device_status." if ipsc_id.nil?

  path = "/ipsecConnections/{ipscId}/deviceStatus".sub('{ipscId}', ipsc_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::IPSecConnectionDeviceStatus')
end

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

Gets the specified route table’s information.

Parameters:

  • rt_id (String)

    The OCID of the route table.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::RouteTable



1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1273

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

  fail "Missing the required parameter 'rt_id' when calling get_route_table." if rt_id.nil?

  path = "/routeTables/{rtId}".sub('{rtId}', rt_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::RouteTable')
end

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

Gets the specified security list’s information.

Parameters:

  • security_list_id (String)

    The OCID of the security list.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::SecurityList



1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1304

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

  fail "Missing the required parameter 'security_list_id' when calling get_security_list." if security_list_id.nil?

  path = "/securityLists/{securityListId}".sub('{securityListId}', security_list_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::SecurityList')
end

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

Gets the specified subnet’s information.

Parameters:

  • subnet_id (String)

    The OCID of the subnet.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Subnet



1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1335

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

  fail "Missing the required parameter 'subnet_id' when calling get_subnet." if subnet_id.nil?

  path = "/subnets/{subnetId}".sub('{subnetId}', subnet_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Subnet')
end

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

Gets the specified VCN’s information.

Parameters:

  • vcn_id (String)

    The OCID of the VCN.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Vcn



1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1366

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

  fail "Missing the required parameter 'vcn_id' when calling get_vcn." if vcn_id.nil?

  path = "/vcns/{vcnId}".sub('{vcnId}', vcn_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Vcn')
end

#get_vnic(vnic_id, opts = {}) ⇒ Response

Gets the information for the specified Virtual Network Interface Card (VNIC), including the attached instance’s public and private IP addresses. You can get the instance’s VNIC OCID from the Cloud Compute Service’s list_vnic_attachments operation.

Parameters:

  • vnic_id (String)

    The OCID of the VNIC.

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

    the optional parameters

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Vnic



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

def get_vnic(vnic_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#get_vnic." if logger

  fail "Missing the required parameter 'vnic_id' when calling get_vnic." if vnic_id.nil?

  path = "/vnics/{vnicId}".sub('{vnicId}', vnic_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Vnic')
end

#list_cpes(compartment_id, opts = {}) ⇒ Response

Lists the Customer-Premise Equipment objects (CPEs) in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous "List" call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::Cpe>



1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1438

def list_cpes(compartment_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_cpes." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_cpes." if compartment_id.nil?

  path = "/cpes"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::Cpe>')
end

#list_dhcp_options(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the sets of DHCP options in the specified VCN and specified compartment. The response includes the default set of options that automatically comes with each VCN, plus any other sets you’ve created.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • vcn_id (String)

    The OCID of the VCN.

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::DhcpOptions>



1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1482

def list_dhcp_options(compartment_id, vcn_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_dhcp_options." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_dhcp_options." if compartment_id.nil?
  fail "Missing the required parameter 'vcn_id' when calling list_dhcp_options." if vcn_id.nil?

  path = "/dhcps"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'vcnId'] = vcn_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::DhcpOptions>')
end

#list_drg_attachments(compartment_id, opts = {}) ⇒ Response

Lists the ‘DrgAttachment` objects for the specified compartment. You can filter the results by VCN or DRG.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

  • :vcn_id (String)

    The OCID of the VCN.

  • :drg_id (String)

    The OCID of the DRG.

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::DrgAttachment>



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

def list_drg_attachments(compartment_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_drg_attachments." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_drg_attachments." if compartment_id.nil?

  path = "/drgAttachments"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'vcnId'] = opts[:'vcn_id'] if opts[:'vcn_id']
  query_params[:'drgId'] = opts[:'drg_id'] if opts[:'drg_id']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::DrgAttachment>')
end

#list_drgs(compartment_id, opts = {}) ⇒ Response

Lists the DRGs in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::Drg>



1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1571

def list_drgs(compartment_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_drgs." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_drgs." if compartment_id.nil?

  path = "/drgs"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::Drg>')
end

#list_internet_gateways(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the Internet Gateways in the specified VCN and the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • vcn_id (String)

    The OCID of the VCN.

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::InternetGateway>



1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1613

def list_internet_gateways(compartment_id, vcn_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_internet_gateways." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_internet_gateways." if compartment_id.nil?
  fail "Missing the required parameter 'vcn_id' when calling list_internet_gateways." if vcn_id.nil?

  path = "/internetGateways"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'vcnId'] = vcn_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::InternetGateway>')
end

#list_ip_sec_connections(compartment_id, opts = {}) ⇒ Response

Lists the IPSec connections for the specified compartment. You can filter the results by DRG or CPE.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

  • :drg_id (String)

    The OCID of the DRG.

  • :cpe_id (String)

    The OCID of the CPE.

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::IPSecConnection>



1659
1660
1661
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
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1659

def list_ip_sec_connections(compartment_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_ip_sec_connections." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_ip_sec_connections." if compartment_id.nil?

  path = "/ipsecConnections"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'drgId'] = opts[:'drg_id'] if opts[:'drg_id']
  query_params[:'cpeId'] = opts[:'cpe_id'] if opts[:'cpe_id']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::IPSecConnection>')
end

#list_route_tables(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the route tables in the specified VCN and specified compartment. The response includes the default route table that automatically comes with each VCN, plus any route tables you’ve created.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • vcn_id (String)

    The OCID of the VCN.

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::RouteTable>



1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1705

def list_route_tables(compartment_id, vcn_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_route_tables." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_route_tables." if compartment_id.nil?
  fail "Missing the required parameter 'vcn_id' when calling list_route_tables." if vcn_id.nil?

  path = "/routeTables"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'vcnId'] = vcn_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::RouteTable>')
end

#list_security_lists(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the security lists in the specified VCN and compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • vcn_id (String)

    The OCID of the VCN.

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::SecurityList>



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

def list_security_lists(compartment_id, vcn_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_security_lists." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_security_lists." if compartment_id.nil?
  fail "Missing the required parameter 'vcn_id' when calling list_security_lists." if vcn_id.nil?

  path = "/securityLists"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'vcnId'] = vcn_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::SecurityList>')
end

#list_subnets(compartment_id, vcn_id, opts = {}) ⇒ Response

Lists the subnets in the specified VCN and the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • vcn_id (String)

    The OCID of the VCN.

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::Subnet>



1793
1794
1795
1796
1797
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
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1793

def list_subnets(compartment_id, vcn_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_subnets." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_subnets." if compartment_id.nil?
  fail "Missing the required parameter 'vcn_id' when calling list_subnets." if vcn_id.nil?

  path = "/subnets"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'vcnId'] = vcn_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::Subnet>')
end

#list_vcns(compartment_id, opts = {}) ⇒ Response

Lists the Virtual Cloud Networks (VCNs) in the specified compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of items to return in a paginated &quot;List&quot; call.

    Example: ‘500`

  • :page (String)

    The value of the ‘opc-next-page` response header from the previous &quot;List&quot; call.

Returns:

  • (Response)

    A Response object with data of type Array<OracleBMC::Core::Models::Vcn>



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

def list_vcns(compartment_id, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#list_vcns." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_vcns." if compartment_id.nil?

  path = "/vcns"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OracleBMC::Core::Models::Vcn>')
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



58
59
60
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 58

def logger
  @api_client.config.logger
end

#update_cpe(cpe_id, update_cpe_details, opts = {}) ⇒ Response

Updates the specified CPE’s display name.

Parameters:

  • cpe_id (String)

    The OCID of the CPE.

  • update_cpe_details (UpdateCpeDetails)

    Details object for updating a CPE.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Cpe



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

def update_cpe(cpe_id, update_cpe_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_cpe." if logger

  fail "Missing the required parameter 'cpe_id' when calling update_cpe." if cpe_id.nil?
  fail "Missing the required parameter 'update_cpe_details' when calling update_cpe." if update_cpe_details.nil?

  path = "/cpes/{cpeId}".sub('{cpeId}', cpe_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_cpe_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Cpe')
end

#update_dhcp_options(dhcp_id, update_dhcp_details, opts = {}) ⇒ Response

Updates the specified set of DHCP options. You can update the display name or the options themselves. Note that the ‘options` object you provide replaces the entire existing set of options.

Parameters:

  • dhcp_id (String)

    The OCID for the set of DHCP options.

  • update_dhcp_details (UpdateDhcpDetails)

    Request object for updating a set of DHCP options.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::DhcpOptions



1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1916

def update_dhcp_options(dhcp_id, update_dhcp_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_dhcp_options." if logger

  fail "Missing the required parameter 'dhcp_id' when calling update_dhcp_options." if dhcp_id.nil?
  fail "Missing the required parameter 'update_dhcp_details' when calling update_dhcp_options." if update_dhcp_details.nil?

  path = "/dhcps/{dhcpId}".sub('{dhcpId}', dhcp_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_dhcp_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::DhcpOptions')
end

#update_drg(drg_id, update_drg_details, opts = {}) ⇒ Response

Updates the specified DRG’s display name.

Parameters:

  • drg_id (String)

    The OCID of the DRG.

  • update_drg_details (UpdateDrgDetails)

    Details object for updating a DRG.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Drg



1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1955

def update_drg(drg_id, update_drg_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_drg." if logger

  fail "Missing the required parameter 'drg_id' when calling update_drg." if drg_id.nil?
  fail "Missing the required parameter 'update_drg_details' when calling update_drg." if update_drg_details.nil?

  path = "/drgs/{drgId}".sub('{drgId}', drg_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_drg_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Drg')
end

#update_drg_attachment(drg_attachment_id, update_drg_attachment_details, opts = {}) ⇒ Response

Updates the display name for the specified ‘DrgAttachment`.

Parameters:

  • drg_attachment_id (String)

    The OCID of the DRG attachment.

  • update_drg_attachment_details (UpdateDrgAttachmentDetails)

    Details object for updating a ‘DrgAttachment`.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::DrgAttachment



1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 1994

def update_drg_attachment(drg_attachment_id, update_drg_attachment_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_drg_attachment." if logger

  fail "Missing the required parameter 'drg_attachment_id' when calling update_drg_attachment." if drg_attachment_id.nil?
  fail "Missing the required parameter 'update_drg_attachment_details' when calling update_drg_attachment." if update_drg_attachment_details.nil?

  path = "/drgAttachments/{drgAttachmentId}".sub('{drgAttachmentId}', drg_attachment_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_drg_attachment_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::DrgAttachment')
end

#update_internet_gateway(ig_id, update_internet_gateway_details, opts = {}) ⇒ Response

Updates the specified Internet Gateway. You can disable/enable it, or change its display name.

If the gateway is disabled, that means no traffic will flow to/from the internet even if there’s a route rule that enables that traffic.

Parameters:

  • ig_id (String)

    The OCID of the Internet Gateway.

  • update_internet_gateway_details (UpdateInternetGatewayDetails)

    Details for updating the Internet Gateway.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::InternetGateway



2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 2036

def update_internet_gateway(ig_id, update_internet_gateway_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_internet_gateway." if logger

  fail "Missing the required parameter 'ig_id' when calling update_internet_gateway." if ig_id.nil?
  fail "Missing the required parameter 'update_internet_gateway_details' when calling update_internet_gateway." if update_internet_gateway_details.nil?

  path = "/internetGateways/{igId}".sub('{igId}', ig_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_internet_gateway_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::InternetGateway')
end

#update_ip_sec_connection(ipsc_id, update_ip_sec_connection_details, opts = {}) ⇒ Response

Updates the display name for the specified IPSec connection.

Parameters:

  • ipsc_id (String)

    The OCID of the IPSec connection.

  • update_ip_sec_connection_details (UpdateIPSecConnectionDetails)

    Details object for updating a IPSec connection.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::IPSecConnection



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

def update_ip_sec_connection(ipsc_id, update_ip_sec_connection_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_ip_sec_connection." if logger

  fail "Missing the required parameter 'ipsc_id' when calling update_ip_sec_connection." if ipsc_id.nil?
  fail "Missing the required parameter 'update_ip_sec_connection_details' when calling update_ip_sec_connection." if update_ip_sec_connection_details.nil?

  path = "/ipsecConnections/{ipscId}".sub('{ipscId}', ipsc_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_ip_sec_connection_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::IPSecConnection')
end

#update_route_table(rt_id, update_route_table_details, opts = {}) ⇒ Response

Updates the specified route table’s display name or route rules. Note that the ‘routeRules` object you provide replaces the entire existing set of rules.

Parameters:

  • rt_id (String)

    The OCID of the route table.

  • update_route_table_details (UpdateRouteTableDetails)

    Details object for updating a route table.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::RouteTable



2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 2115

def update_route_table(rt_id, update_route_table_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_route_table." if logger

  fail "Missing the required parameter 'rt_id' when calling update_route_table." if rt_id.nil?
  fail "Missing the required parameter 'update_route_table_details' when calling update_route_table." if update_route_table_details.nil?

  path = "/routeTables/{rtId}".sub('{rtId}', rt_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_route_table_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::RouteTable')
end

#update_security_list(security_list_id, update_security_list_details, opts = {}) ⇒ Response

Updates the specified security list’s display name or rules. Note that the ‘egressSecurityRules` or `ingressSecurityRules` objects you provide replace the entire existing objects.

Parameters:

  • security_list_id (String)

    The OCID of the security list.

  • update_security_list_details (UpdateSecurityListDetails)

    Updated details for the security list.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::SecurityList



2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 2156

def update_security_list(security_list_id, update_security_list_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_security_list." if logger

  fail "Missing the required parameter 'security_list_id' when calling update_security_list." if security_list_id.nil?
  fail "Missing the required parameter 'update_security_list_details' when calling update_security_list." if update_security_list_details.nil?

  path = "/securityLists/{securityListId}".sub('{securityListId}', security_list_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_security_list_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::SecurityList')
end

#update_subnet(subnet_id, update_subnet_details, opts = {}) ⇒ Response

Updates the specified subnet’s display name.

Parameters:

  • subnet_id (String)

    The OCID of the subnet.

  • update_subnet_details (UpdateSubnetDetails)

    Details object for updating a subnet.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Subnet



2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 2195

def update_subnet(subnet_id, update_subnet_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_subnet." if logger

  fail "Missing the required parameter 'subnet_id' when calling update_subnet." if subnet_id.nil?
  fail "Missing the required parameter 'update_subnet_details' when calling update_subnet." if update_subnet_details.nil?

  path = "/subnets/{subnetId}".sub('{subnetId}', subnet_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_subnet_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Subnet')
end

#update_vcn(vcn_id, update_vcn_details, opts = {}) ⇒ Response

Updates the specified VCN’s display name.

Parameters:

  • vcn_id (String)

    The OCID of the VCN.

  • update_vcn_details (UpdateVcnDetails)

    Details object for updating a VCN.

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

    the optional parameters

Options Hash (opts):

  • :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&#39;s current etag value.

Returns:

  • (Response)

    A Response object with data of type OracleBMC::Core::Models::Vcn



2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
# File 'lib/oraclebmc/core/virtual_network_client.rb', line 2234

def update_vcn(vcn_id, update_vcn_details, opts = {})
  logger.debug "Calling operation VirtualNetworkClient#update_vcn." if logger

  fail "Missing the required parameter 'vcn_id' when calling update_vcn." if vcn_id.nil?
  fail "Missing the required parameter 'update_vcn_details' when calling update_vcn." if update_vcn_details.nil?

  path = "/vcns/{vcnId}".sub('{vcnId}', vcn_id.to_s)

  # 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']

  post_body = @api_client.object_to_http_body(update_vcn_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OracleBMC::Core::Models::Vcn')
end