Class: IbmVpc::VpcV1

Inherits:
IBMCloudSdkCore::BaseService
  • Object
show all
Includes:
Concurrent::Async
Defined in:
lib/ibm_vpc/vpc_v1.rb

Overview

The vpc V1 service.

Constant Summary collapse

DEFAULT_SERVICE_NAME =
"vpc"
DEFAULT_SERVICE_URL =
"https://us-south.iaas.cloud.ibm.com/v1"
DEFAULT_SERVICE_VERSION =
"2026-03-24"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ VpcV1

Construct a new client for the vpc service.

Parameters:

  • args (Hash)

    The args to initialize with

Options Hash (args):

  • version (String)

    The API version, in format ‘YYYY-MM-DD`. For the API behavior documented here, specify any date between `2025-12-09` and `2026-03-24`.

  • service_url (String)

    The base service URL to use when contacting the service. The base service_url may differ between IBM Cloud regions.

  • authenticator (Object)

    The Authenticator instance to be configured for this service.

  • service_name (String)

    The name of the service to configure. Will be used as the key to load any external configuration, if applicable.

Raises:

  • (ArgumentError)


51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/ibm_vpc/vpc_v1.rb', line 51

def initialize(args = {})
  @__async_initialized__ = false
  defaults = {}
  defaults[:service_url] = DEFAULT_SERVICE_URL
  defaults[:service_name] = DEFAULT_SERVICE_NAME
  defaults[:authenticator] = nil
  defaults[:version] = DEFAULT_SERVICE_VERSION
  defaults[:generation] = 2
  user_service_url = args[:service_url] unless args[:service_url].nil?
  args = defaults.merge(args)
  @generation = args[:generation]

  @version = args[:version]
  raise ArgumentError.new("version must be provided") if @version.nil?

  super
  @service_url = user_service_url unless user_service_url.nil?
end

Instance Attribute Details

#generationObject

Returns the value of attribute generation.



38
39
40
# File 'lib/ibm_vpc/vpc_v1.rb', line 38

def generation
  @generation
end

#versionObject

Returns the value of attribute version.



37
38
39
# File 'lib/ibm_vpc/vpc_v1.rb', line 37

def version
  @version
end

Instance Method Details

#activate_reservation(id:) ⇒ nil

Activate a reservation. This request activates a reservation. For this request to succeed, the reservation

status must be `inactive`.

Parameters:

  • id (String)

    The reservation identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
# File 'lib/ibm_vpc/vpc_v1.rb', line 13010

def activate_reservation(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "activate_reservation")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/reservations/%s/activate" % [ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#add_bare_metal_server_network_interface_floating_ip(bare_metal_server_id:, network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Associate a floating IP with a bare metal server network interface. This request associates the specified floating IP with the specified bare metal

server network interface. If `enable_infrastructure_nat` is `false`, this adds the
IP to any existing associations. If `enable_infrastructure_nat` is `true`, this
replaces any existing association.

The existing floating IP must:
- not be required by another resource, such as a public gateway
- be in the same `zone` as the bare metal server

A request body is not required, and if provided, is ignored.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • network_interface_id (String)

    The bare metal server network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
# File 'lib/ibm_vpc/vpc_v1.rb', line 1607

def add_bare_metal_server_network_interface_floating_ip(bare_metal_server_id:, network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_bare_metal_server_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#add_endpoint_gateway_ip(endpoint_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Bind a reserved IP to an endpoint gateway. This request binds the specified reserved IP to the specified endpoint gateway.

The reserved IP:

- must currently be unbound, or not required by its target
- must not be in the same zone as any other reserved IP bound to the endpoint
gateway.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
# File 'lib/ibm_vpc/vpc_v1.rb', line 4105

def add_endpoint_gateway_ip(endpoint_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_endpoint_gateway_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#add_instance_network_interface_floating_ip(instance_id:, network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Associate a floating IP with an instance network interface. This request associates the specified floating IP with the specified instance

network interface, replacing any existing association.

The existing floating IP must:
- not be required by another resource, such as a public gateway
- be in the same `zone` as the instance

A request body is not required, and if provided, is ignored.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • network_interface_id (String)

    The instance network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
# File 'lib/ibm_vpc/vpc_v1.rb', line 8608

def add_instance_network_interface_floating_ip(instance_id:, network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_instance_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#add_network_interface_floating_ip(virtual_network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Add an association between a floating IP and a virtual network interface. This request adds an association between the specified floating IP and the

specified virtual network interface.

If the virtual network interface has `enable_infrastructure_nat` set to `true`, no
more than one floating IP can be associated, and network address translation is
performed between the floating IP address and the virtual network interface's
`primary_ip` address.

If the virtual network interface has `enable_infrastructure_nat` set to `false`,
packets are passed unchanged to/from the virtual network interface.

The floating IP must:
- be in the same `zone` as the virtual network interface
- not currently be associated with another resource

The virtual network interface's `target` must not currently be a file share mount
target.

A request body is not required, and if provided, is ignored.

Parameters:

  • virtual_network_interface_id (String)

    The virtual network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
# File 'lib/ibm_vpc/vpc_v1.rb', line 16610

def add_network_interface_floating_ip(virtual_network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("virtual_network_interface_id must be provided") if virtual_network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/virtual_network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(virtual_network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#add_virtual_network_interface_ip(virtual_network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Bind a reserved IP to a virtual network interface. This request binds the specified reserved IP to the specified virtual network

interface.

The reserved IP must currently be unbound and in the primary IP's subnet.

The virtual network interface's `target` must not currently be a file share mount
target.

Parameters:

  • virtual_network_interface_id (String)

    The virtual network interface identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
# File 'lib/ibm_vpc/vpc_v1.rb', line 16780

def add_virtual_network_interface_ip(virtual_network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("virtual_network_interface_id must be provided") if virtual_network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_virtual_network_interface_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/virtual_network_interfaces/%s/ips/%s" % [ERB::Util.url_encode(virtual_network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#add_vpn_gateway_advertised_cidr(vpn_gateway_id:, cidr:) ⇒ nil

Set an advertised CIDR on a VPN gateway. This request adds the specified CIDR to the specified VPN gateway advertised

CIDRs. This request succeeds if the specified CIDR already exists. A request body
is not required, and if provided, is ignored.

This request is only supported for route mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
# File 'lib/ibm_vpc/vpc_v1.rb', line 19985

def add_vpn_gateway_advertised_cidr(vpn_gateway_id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_vpn_gateway_advertised_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/advertised_cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(cidr)]

  request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#add_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) ⇒ nil

Set a local CIDR on a VPN gateway connection. This request adds the specified CIDR to the specified VPN gateway connection. This

request succeeds if the specified CIDR already exists. A request body is not
required, and if provided, is ignored.

This request is only supported for policy mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
# File 'lib/ibm_vpc/vpc_v1.rb', line 20369

def add_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_vpn_gateway_connections_local_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)]

  request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#add_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) ⇒ nil

Set a peer CIDR on a VPN gateway connection. This request adds the specified CIDR to the specified VPN gateway connection. This

request succeeds if the specified CIDR already exists. A request body is not
required, and if provided, is ignored.

This request is only supported for policy mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
# File 'lib/ibm_vpc/vpc_v1.rb', line 20541

def add_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_vpn_gateway_connections_peer_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)]

  request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#cancel_volume_job(volume_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Cancel a queued or running volume job. This request cancels a ‘queued` or `running` volume job.

Parameters:

  • volume_id (String)

    The volume identifier.

  • id (String)

    The volume job identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
# File 'lib/ibm_vpc/vpc_v1.rb', line 17388

def cancel_volume_job(volume_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("volume_id must be provided") if volume_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "cancel_volume_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/volumes/%s/jobs/%s/cancel" % [ERB::Util.url_encode(volume_id), ERB::Util.url_encode(id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#check_vpn_gateway_advertised_cidr(vpn_gateway_id:, cidr:) ⇒ nil

Check if the specified advertised CIDR exists on a VPN gateway. This request succeeds if an advertised CIDR exists on the specified VPN gateway,

and fails otherwise.

This request is only supported for route mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
# File 'lib/ibm_vpc/vpc_v1.rb', line 19943

def check_vpn_gateway_advertised_cidr(vpn_gateway_id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "check_vpn_gateway_advertised_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/advertised_cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(cidr)]

  request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#check_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) ⇒ nil

Check if the specified local CIDR exists on a VPN gateway connection. This request succeeds if a CIDR exists on the specified VPN gateway connection,

and fails otherwise.

This request is only supported for policy mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
# File 'lib/ibm_vpc/vpc_v1.rb', line 20324

def check_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "check_vpn_gateway_connections_local_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)]

  request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#check_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) ⇒ nil

Check if the specified peer CIDR exists on a VPN gateway connection. This request succeeds if a CIDR exists on the specified VPN gateway connection,

and fails otherwise.

This request is only supported for policy mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
# File 'lib/ibm_vpc/vpc_v1.rb', line 20496

def check_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "check_vpn_gateway_connections_peer_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)]

  request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#create_backup_policy(backup_policy_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a backup policy. This request creates a new backup policy from a backup policy prototype object.

The prototype object is structured in the same way as a retrieved backup policy,
and contains the information necessary to create the new backup policy.

Parameters:

  • backup_policy_prototype (BackupPolicyPrototype)

    The backup policy prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/ibm_vpc/vpc_v1.rb', line 129

def create_backup_policy(backup_policy_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("backup_policy_prototype must be provided") if backup_policy_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_backup_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = backup_policy_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/backup_policies"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_backup_policy_plan(backup_policy_id:, cron_spec:, active: nil, attach_user_tags: nil, clone_policy: nil, copy_user_tags: nil, deletion_trigger: nil, name: nil, remote_region_policies: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a plan for a backup policy. This request creates a new backup policy plan from a backup policy plan prototype

object. The prototype object is structured in the same way as a retrieved backup
policy plan, and contains the information necessary to create the new backup
policy plan.

Backups created by this plan will use the resource group of the source being
backed up.

Backups created by this plan will use the plan's name truncated to 46 characters,
followed by a unique 16-character suffix.

Parameters:

  • backup_policy_id (String)

    The backup policy identifier.

  • cron_spec (String)

    The cron specification for the backup schedule. The backup policy jobs (which create and delete backups for this plan) will not start until this time, and may start for up to 90 minutes after this time.

    All backup schedules for plans in the same policy must be at least an hour apart.

  • active (Boolean) (defaults to: nil)

    Indicates whether the plan is active.

  • attach_user_tags (Array[String]) (defaults to: nil)

    The user tags to attach to each backup (snapshot) created by this plan.

  • clone_policy (BackupPolicyPlanClonePolicyPrototype) (defaults to: nil)
  • copy_user_tags (Boolean) (defaults to: nil)

    Indicates whether to copy the source’s user tags to the created backups (snapshots).

  • deletion_trigger (BackupPolicyPlanDeletionTriggerPrototype) (defaults to: nil)
  • name (String) (defaults to: nil)

    The name for this backup policy plan. The name must not be used by another plan for the backup policy. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • remote_region_policies (Array[BackupPolicyPlanRemoteRegionPolicyPrototype]) (defaults to: nil)

    The policies for additional backups in remote regions.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/ibm_vpc/vpc_v1.rb', line 332

def create_backup_policy_plan(backup_policy_id:, cron_spec:, active: nil, attach_user_tags: nil, clone_policy: nil, copy_user_tags: nil, deletion_trigger: nil, name: nil, remote_region_policies: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("backup_policy_id must be provided") if backup_policy_id.nil?

  raise ArgumentError.new("cron_spec must be provided") if cron_spec.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_backup_policy_plan")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "cron_spec" => cron_spec,
    "active" => active,
    "attach_user_tags" => attach_user_tags,
    "clone_policy" => clone_policy,
    "copy_user_tags" => copy_user_tags,
    "deletion_trigger" => deletion_trigger,
    "name" => name,
    "remote_region_policies" => remote_region_policies
  }

  method_url = "/backup_policies/%s/plans" % [ERB::Util.url_encode(backup_policy_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_bare_metal_server(bare_metal_server_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a bare metal server. This request provisions a new bare metal server from a prototype object. The

prototype object is structured in the same way as a retrieved bare metal server,
and contains the information necessary to provision the new bare metal server. The
bare metal server is automatically started.

For this request to succeed, the properties in the request must adhere to the
source image's `allowed_use` property.

Parameters:

  • bare_metal_server_prototype (BareMetalServerPrototype)

    The bare metal server prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/ibm_vpc/vpc_v1.rb', line 787

def create_bare_metal_server(bare_metal_server_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_prototype must be provided") if bare_metal_server_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_bare_metal_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = bare_metal_server_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/bare_metal_servers"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_bare_metal_server_console_access_token(bare_metal_server_id:, console_type:, force: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a console access token for a bare metal server. This request creates a new single-use console access token for a bare metal

server. All console configuration is provided at token create time, and the token
is subsequently used in the `access_token` query parameter for the WebSocket
request.  The access token is only valid for a short period of time, and a maximum
of one token is valid for a given bare metal server at a time.  For this request
to succeed, the server must have a `status` of `stopped`, `starting`, or
`running`.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • console_type (String)

    The bare metal server console type for which this token may be used

    Must be ‘serial` for bare metal servers with a `cpu.architecture` of `s390x`.

  • force (Boolean) (defaults to: nil)

    Indicates whether to disconnect an existing serial console session as the serial console cannot be shared. This has no effect on VNC consoles.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
# File 'lib/ibm_vpc/vpc_v1.rb', line 837

def create_bare_metal_server_console_access_token(bare_metal_server_id:, console_type:, force: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("console_type must be provided") if console_type.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_bare_metal_server_console_access_token")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "console_type" => console_type,
    "force" => force
  }

  method_url = "/bare_metal_servers/%s/console_access_token" % [ERB::Util.url_encode(bare_metal_server_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_bare_metal_server_network_attachment(bare_metal_server_id:, bare_metal_server_network_attachment_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a network attachment on a bare metal server. This request creates a new bare metal server network attachment from a bare metal

server network attachment prototype object. The prototype object is structured in
the same way as a retrieved bare metal server network attachment, and contains the
information necessary to create the new bare metal server network attachment.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • bare_metal_server_network_attachment_prototype (BareMetalServerNetworkAttachmentPrototype)

    The bare metal server network attachment prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
# File 'lib/ibm_vpc/vpc_v1.rb', line 1052

def create_bare_metal_server_network_attachment(bare_metal_server_id:, bare_metal_server_network_attachment_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("bare_metal_server_network_attachment_prototype must be provided") if bare_metal_server_network_attachment_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_bare_metal_server_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = bare_metal_server_network_attachment_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/bare_metal_servers/%s/network_attachments" % [ERB::Util.url_encode(bare_metal_server_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_bare_metal_server_network_interface(bare_metal_server_id:, bare_metal_server_network_interface_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a network interface on a bare metal server. This request creates a new bare metal server network interface from a bare metal

server network interface prototype object. The prototype object is structured in
the same way as a retrieved bare metal server network interface, and contains the
information necessary to create the new bare metal server network interface. Any
subnet in the bare metal server's VPC may be specified, even if it is already
attached to another bare metal server network interface. Addresses on the bare
metal server network interface must be within the specified subnet's CIDR blocks.

If this bare metal server has network attachments, each network interface is a
[read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface, and new network interfaces are not allowed to be created.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • bare_metal_server_network_interface_prototype (BareMetalServerNetworkInterfacePrototype)

    The bare metal server network interface prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
# File 'lib/ibm_vpc/vpc_v1.rb', line 1285

def create_bare_metal_server_network_interface(bare_metal_server_id:, bare_metal_server_network_interface_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("bare_metal_server_network_interface_prototype must be provided") if bare_metal_server_network_interface_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_bare_metal_server_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = bare_metal_server_network_interface_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/bare_metal_servers/%s/network_interfaces" % [ERB::Util.url_encode(bare_metal_server_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_cluster_network(profile:, vpc:, zone:, name: nil, resource_group: nil, subnet_prefixes: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a cluster network. This request creates a new cluster network from a cluster network prototype

object. The prototype object is structured in the same way as a retrieved cluster
network, and contains the information necessary to create the new cluster network.

Parameters:

  • profile (ClusterNetworkProfileIdentity)

    The profile to use for this cluster network.

  • vpc (VPCIdentity)

    The VPC this cluster network will reside in.

  • zone (ZoneIdentity)

    The zone this cluster network will reside in. The zone must be listed as supported on the specified cluster network profile.

  • name (String) (defaults to: nil)

    The name for this cluster network. The name must not be used by another cluster network in the region. Names starting with ‘ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • subnet_prefixes (Array[ClusterNetworkSubnetPrefixPrototype]) (defaults to: nil)

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
# File 'lib/ibm_vpc/vpc_v1.rb', line 2262

def create_cluster_network(profile:, vpc:, zone:, name: nil, resource_group: nil, subnet_prefixes: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("profile must be provided") if profile.nil?

  raise ArgumentError.new("vpc must be provided") if vpc.nil?

  raise ArgumentError.new("zone must be provided") if zone.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "profile" => profile,
    "vpc" => vpc,
    "zone" => zone,
    "name" => name,
    "resource_group" => resource_group,
    "subnet_prefixes" => subnet_prefixes
  }

  method_url = "/cluster_networks"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_cluster_network_attachment(instance_id:, cluster_network_interface:, before: nil, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a cluster network attachment. This request creates a cluster network attachment from an instance cluster network

attachment prototype object. A cluster network attachment will attach the instance
to a cluster network. The cluster network attachment prototype must specify a
cluster network interface identity or a cluster network interface prototype.

The instance must be in a `stopped` or `stopping` state to create an instance
cluster network attachment.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • cluster_network_interface (InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface)

    A cluster network interface for the instance cluster network attachment. This can be specified using an existing cluster network interface that does not already have a ‘target`, or a prototype object for a new cluster network interface.

    This instance must reside in the same VPC as the specified cluster network interface. The cluster network interface must reside in the same cluster network as the ‘cluster_network_interface` of any other `cluster_network_attachments` for this instance.

  • before (InstanceClusterNetworkAttachmentBeforePrototype) (defaults to: nil)

    The instance cluster network attachment to insert this instance cluster network attachment immediately before.

    If unspecified, this instance cluster network attachment will be inserted after all existing instance cluster network attachments.

  • name (String) (defaults to: nil)

    The name for this cluster network attachment. Names must be unique within the instance the cluster network attachment resides in. If unspecified, the name will be a hyphenated list of randomly-selected words. Names starting with ‘ibm-` are reserved for provider-owned resources, and are not allowed.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
# File 'lib/ibm_vpc/vpc_v1.rb', line 7634

def create_cluster_network_attachment(instance_id:, cluster_network_interface:, before: nil, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("cluster_network_interface must be provided") if cluster_network_interface.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "cluster_network_interface" => cluster_network_interface,
    "before" => before,
    "name" => name
  }

  method_url = "/instances/%s/cluster_network_attachments" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_cluster_network_interface(cluster_network_id:, name: nil, primary_ip: nil, subnet: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a cluster network interface. This request creates a new cluster network interface from a cluster network

interface prototype object. The prototype object is structured in the same way as
a retrieved cluster network interface, and contains the information necessary to
create the new cluster network interface.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • name (String) (defaults to: nil)

    The name for this cluster network interface. The name must not be used by another interface in the cluster network. Names beginning with ‘ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • primary_ip (ClusterNetworkInterfacePrimaryIPPrototype) (defaults to: nil)

    The primary IP address to bind to the cluster network interface. May be either a cluster network subnet reserved IP identity, or a cluster network subnet reserved IP prototype object which will be used to create a new cluster network subnet reserved IP.

    If a cluster network subnet reserved IP identity is provided, the specified cluster network subnet reserved IP must be unbound.

    If a cluster network subnet reserved IP prototype object with an address is provided, the address must be available on the cluster network interface’s cluster network subnet. If no address is specified, an available address on the cluster network subnet will be automatically selected and reserved.

  • subnet (ClusterNetworkSubnetIdentity) (defaults to: nil)

    The associated cluster network subnet. Required if ‘primary_ip` does not specify a cluster network subnet reserved IP identity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
# File 'lib/ibm_vpc/vpc_v1.rb', line 2393

def create_cluster_network_interface(cluster_network_id:, name: nil, primary_ip: nil, subnet: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "name" => name,
    "primary_ip" => primary_ip,
    "subnet" => subnet
  }

  method_url = "/cluster_networks/%s/interfaces" % [ERB::Util.url_encode(cluster_network_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_cluster_network_subnet(cluster_network_id:, cluster_network_subnet_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a cluster network subnet. This request creates a new cluster network subnet from a cluster network subnet

prototype object. The prototype object is structured in the same way as a
retrieved cluster network subnet, and contains the information necessary to create
the new cluster network subnet.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • cluster_network_subnet_prototype (ClusterNetworkSubnetPrototype)

    The cluster network subnet prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
# File 'lib/ibm_vpc/vpc_v1.rb', line 2623

def create_cluster_network_subnet(cluster_network_id:, cluster_network_subnet_prototype:)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("cluster_network_subnet_prototype must be provided") if cluster_network_subnet_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network_subnet")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = cluster_network_subnet_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/cluster_networks/%s/subnets" % [ERB::Util.url_encode(cluster_network_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, address: nil, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a cluster network subnet reserved IP. This request creates a new cluster network subnet reserved IP from a cluster

network subnet reserved IP prototype object. The prototype object is structured in
the same way as a retrieved cluster network subnet reserved IP, and contains the
information necessary to create the new cluster network subnet reserved IP.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • cluster_network_subnet_id (String)

    The cluster network subnet identifier.

  • address (String) (defaults to: nil)

    The IP address to reserve, which must not already be reserved on the subnet.

    If unspecified, an available address on the subnet will automatically be selected.

  • name (String) (defaults to: nil)

    The name for this cluster network subnet reserved IP. The name must not be used by another reserved IP in the cluster network subnet. Names starting with ‘ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
# File 'lib/ibm_vpc/vpc_v1.rb', line 2726

def create_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, address: nil, name: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network_subnet_reserved_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "address" => address,
    "name" => name
  }

  method_url = "/cluster_networks/%s/subnets/%s/reserved_ips" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_dedicated_host(dedicated_host_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a dedicated host. This request creates a new dedicated host.

Parameters:

  • dedicated_host_prototype (DedicatedHostPrototype)

    The dedicated host prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
# File 'lib/ibm_vpc/vpc_v1.rb', line 3515

def create_dedicated_host(dedicated_host_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("dedicated_host_prototype must be provided") if dedicated_host_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_dedicated_host")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = dedicated_host_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/dedicated_hosts"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_dedicated_host_group(_class:, family:, zone:, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a dedicated host group. This request creates a new dedicated host group.

Parameters:

  • _class (String)

    The dedicated host profile class for hosts in this group.

  • family (String)

    The dedicated host profile family for hosts in this group.

  • zone (ZoneIdentity)

    The zone this dedicated host group will reside in.

  • name (String) (defaults to: nil)

    The name for this dedicated host group. The name must not be used by another dedicated host group in the region. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
# File 'lib/ibm_vpc/vpc_v1.rb', line 3228

def create_dedicated_host_group(_class:, family:, zone:, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("_class must be provided") if _class.nil?

  raise ArgumentError.new("family must be provided") if family.nil?

  raise ArgumentError.new("zone must be provided") if zone.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_dedicated_host_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "class" => _class,
    "family" => family,
    "zone" => zone,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/dedicated_host/groups"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_endpoint_gateway(target:, vpc:, dns_resolution_binding_mode: nil, ips: nil, name: nil, resource_group: nil, security_groups: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create an endpoint gateway. This request creates a new endpoint gateway from an endpoint gateway prototype

object. The prototype object is structured in the same way as a retrieved endpoint
gateway, and contains the information necessary to create a new endpoint gateway.
An endpoint gateway maps one or more reserved IPs in a VPC to a target service
outside the VPC.

Parameters:

  • target (EndpointGatewayTargetPrototype)

    The target to use for this endpoint gateway. The target:

    • Must not already be the target of another endpoint gateway in the VPC

    • Must not have a service endpoint that overlaps with any ‘service_endpoints` of another endpoint gateway in the VPC.

    If ‘dns_resolution_binding_mode` is set to `primary`, then there must not be another endpoint gateway in the [DNS sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) connected topology that:

    • Has the same ‘target` as this endpoint gateway

    • Has ‘service_endpoints` that overlap with the `service_endpoints` for this

    endpoint

    gateway.
    

    If ‘dns_resolution_binding_mode` is set to `per_resource_binding`, then:

    • The VPC in the topology with ‘dns.enable_hub` set to `true` must have an

    endpoint

    gateway with the same `target` as this endpoint gateway.
    
    • The VPC in the topology with ‘dns.enable_hub` set to `true` must have an

    endpoint

    gateway with `dns_resolution_binding_mode` set to `primary`.
    
    • No other VPC in the topology can have an endpoint gateway with a resource

    binding

    using the same `service_endpoint` as a resource binding for this endpoint
    

    gateway.

  • vpc (VPCIdentity)

    The VPC this endpoint gateway will reside in.

  • dns_resolution_binding_mode (String) (defaults to: nil)

    The DNS resolution binding mode to use for this endpoint gateway:

    • ‘disabled`: The endpoint gateway will not participate in [DNS sharing for VPE

      gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) with other VPCs in a connected
      topology.
      
    • ‘primary`: The endpoint gateway will participate in [DNS sharing for VPE

    gateways]

    (/docs/vpc?topic=vpc-vpe-dns-sharing) if the VPC this endpoint gateway resides
    

    in

    has a DNS resolution binding to another VPC. If the VPC this endpoint gateway
    resides in has a DNS resolution binding to another VPC, then no other VPC in
    

    the

    topology can have an endpoint gateway with the same `target` as this endpoint
    gateway.
    
    • ‘per_resource_binding`: The endpoint gateway will participate in [DNS sharing

    for VPE

    gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) if the VPC this endpoint gateway
    resides in has a DNS resolution binding to another VPC. Resource binding must
    

    be

    enabled for the `target` service.
    
    The VPC this endpoint gateway resides in must have `dns.enable_hub` set to
    `false`.
    
    If the VPC this endpoint gateway resides in has DNS resolution binding to
    

    another

    VPC, the other VPC must:
    - have `dns.enable_hub` set to `true`
    - contain an endpoint gateway for the same `target` service with
      `dns_resolution_binding_mode` set to `primary`.
    
  • ips (Array[EndpointGatewayReservedIP]) (defaults to: nil)

    The reserved IPs to bind to this endpoint gateway. At most one reserved IP per zone is allowed.

  • name (String) (defaults to: nil)

    The name for this endpoint gateway. The name must not be used by another endpoint gateway in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • security_groups (Array[SecurityGroupIdentity]) (defaults to: nil)

    The security groups to use for this endpoint gateway. If unspecified, the VPC’s default security group is used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


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

def create_endpoint_gateway(target:, vpc:, dns_resolution_binding_mode: nil, ips: nil, name: nil, resource_group: nil, security_groups: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("target must be provided") if target.nil?

  raise ArgumentError.new("vpc must be provided") if vpc.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_endpoint_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "target" => target,
    "vpc" => vpc,
    "dns_resolution_binding_mode" => dns_resolution_binding_mode,
    "ips" => ips,
    "name" => name,
    "resource_group" => resource_group,
    "security_groups" => security_groups
  }

  method_url = "/endpoint_gateways"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_endpoint_gateway_resource_binding(endpoint_gateway_id:, target:, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a resource binding for an endpoint gateway. This request creates a new resource binding for an endpoint gateway from an

endpoint gateway resource binding prototype object. The prototype object is
structured in the same way as a retrieved endpoint gateway resource binding, and
contains the information necessary to create the new resource binding.

For this request to succeed, resource binding must be enabled for this endpoint
gateway's
`target` service and this endpoint gateway resource binding must not conflict with
another resource binding in the [DNS sharing](/docs/vpc?topic=vpc-vpe-dns-sharing)
connected topology.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • target (EndpointGatewayResourceBindingTargetPrototype)

    The target to use for this resource binding.

  • name (String) (defaults to: nil)

    The name for this resource binding. The name must not be used by another resource binding for the endpoint gateway. If unspecified, the name will be a hyphenated list of randomly-selected words.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
# File 'lib/ibm_vpc/vpc_v1.rb', line 4202

def create_endpoint_gateway_resource_binding(endpoint_gateway_id:, target:, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  raise ArgumentError.new("target must be provided") if target.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_endpoint_gateway_resource_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "target" => target,
    "name" => name
  }

  method_url = "/endpoint_gateways/%s/resource_bindings" % [ERB::Util.url_encode(endpoint_gateway_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_floating_ip(floating_ip_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Reserve a floating IP. This request reserves a new floating IP.

Parameters:

  • floating_ip_prototype (FloatingIPPrototype)

    The floating IP prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
# File 'lib/ibm_vpc/vpc_v1.rb', line 4556

def create_floating_ip(floating_ip_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("floating_ip_prototype must be provided") if floating_ip_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = floating_ip_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/floating_ips"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_flow_log_collector(storage_bucket:, target:, active: nil, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a flow log collector. This request creates and starts a new flow log collector from a flow log collector

prototype object. The prototype object is structured in the same way as a
retrieved flow log collector, and contains the information necessary to create and
start the new flow log collector.

Parameters:

  • storage_bucket (LegacyCloudObjectStorageBucketIdentity)

    The Cloud Object Storage bucket where the collected flows will be logged. The bucket must exist and an IAM service authorization must grant ‘IBM Cloud Flow Logs` resources of `VPC Infrastructure Services` writer access to the bucket. For more information, see [Creating a flow log collector](cloud.ibm.com/docs/vpc?topic=vpc-ordering-flow-log-collector).

  • target (FlowLogCollectorTargetPrototype)

    The target this collector will collect flow logs for.

    If the target is an instance, subnet, or VPC, flow logs will not be collected for any instance network attachments, virtual network interfaces or instance network interfaces within the target that are themselves the target of a more specific flow log collector.

    For this request to succeed, the target must:

    • not be a virtual network interface that is attached to a bare metal server

    network

    attachment or to a file share mount target
    
    • not already be the target of another flow log collector.

  • active (Boolean) (defaults to: nil)

    Indicates whether this collector will be active upon creation.

  • name (String) (defaults to: nil)

    The name for this flow log collector. The name must not be used by another flow log collector in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
# File 'lib/ibm_vpc/vpc_v1.rb', line 4802

def create_flow_log_collector(storage_bucket:, target:, active: nil, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("storage_bucket must be provided") if storage_bucket.nil?

  raise ArgumentError.new("target must be provided") if target.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_flow_log_collector")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "storage_bucket" => storage_bucket,
    "target" => target,
    "active" => active,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/flow_log_collectors"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_ike_policy(authentication_algorithm:, dh_group:, encryption_algorithm:, ike_version:, key_lifetime: nil, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create an IKE policy. This request creates a new IKE policy.

Parameters:

  • authentication_algorithm (String)

    The authentication algorithm.

  • dh_group (Fixnum)

    The Diffie-Hellman group.

  • encryption_algorithm (String)

    The encryption algorithm.

  • ike_version (Fixnum)

    The IKE protocol version.

  • key_lifetime (Fixnum) (defaults to: nil)

    The key lifetime in seconds.

  • name (String) (defaults to: nil)

    The name for this IKE policy. The name must not be used by another IKE policy in the region. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
# File 'lib/ibm_vpc/vpc_v1.rb', line 19195

def create_ike_policy(authentication_algorithm:, dh_group:, encryption_algorithm:, ike_version:, key_lifetime: nil, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("authentication_algorithm must be provided") if authentication_algorithm.nil?

  raise ArgumentError.new("dh_group must be provided") if dh_group.nil?

  raise ArgumentError.new("encryption_algorithm must be provided") if encryption_algorithm.nil?

  raise ArgumentError.new("ike_version must be provided") if ike_version.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_ike_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "authentication_algorithm" => authentication_algorithm,
    "dh_group" => dh_group,
    "encryption_algorithm" => encryption_algorithm,
    "ike_version" => ike_version,
    "key_lifetime" => key_lifetime,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/ike_policies"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_image(image_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create an image. This request creates a new image from an image prototype object. The prototype

object is structured in the same way as a retrieved image, and contains the
information necessary to create the new image. If an image is being imported, a
URL to the image file on object storage must be specified. If an image is being
created from an existing volume, that volume must be specified.

Parameters:

  • image_prototype (ImagePrototype)

    The image prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
# File 'lib/ibm_vpc/vpc_v1.rb', line 5188

def create_image(image_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("image_prototype must be provided") if image_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_image")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = image_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/images"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_image_export_job(image_id:, storage_bucket:, format: nil, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create an export job for an image. This request creates and queues a new export job for the image specified in the

URL using the image export job prototype object. The image must be owned by the
account and be in the `available`, `deprecated`, `obsolete`, or `unusable` state.
The prototype object is structured in the same way as a retrieved image export
job, and contains the information necessary to create and queue the new image
export job.

Parameters:

  • image_id (String)

    The image identifier.

  • storage_bucket (CloudObjectStorageBucketIdentity)

    The Cloud Object Storage bucket to export the image to. The bucket must exist and an IAM service authorization must grant ‘Image Service for VPC` of `VPC Infrastructure Services` writer access to the bucket.

  • format (String) (defaults to: nil)

    The format to use for the exported image. If the image is encrypted, only ‘qcow2` is supported.

  • name (String) (defaults to: nil)

    The name for this image export job. The name must not be used by another export job for the image. If unspecified, the name will be a hyphenated list of randomly-selected words prefixed with the first 16 characters of the parent image name.

    The exported image object name in Cloud Object Storage (‘storage_object.name` in the response) will be based on this name. The object name will be unique within the bucket.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
# File 'lib/ibm_vpc/vpc_v1.rb', line 5581

def create_image_export_job(image_id:, storage_bucket:, format: nil, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("image_id must be provided") if image_id.nil?

  raise ArgumentError.new("storage_bucket must be provided") if storage_bucket.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_image_export_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "storage_bucket" => storage_bucket,
    "format" => format,
    "name" => name
  }

  method_url = "/images/%s/export_jobs" % [ERB::Util.url_encode(image_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_instance(instance_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create an instance. This request provisions a new instance from an instance prototype object. The

prototype object is structured in the same way as a retrieved instance, and
contains the information necessary to provision the new instance. The instance is
automatically started.

For this request to succeed, the properties in the request must adhere to the
source's
`allowed_use` property.

Parameters:

  • instance_prototype (InstancePrototype)

    The instance prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
# File 'lib/ibm_vpc/vpc_v1.rb', line 7312

def create_instance(instance_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_prototype must be provided") if instance_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/instances"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_instance_action(instance_id:, type:, force: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create an instance action. This request creates a new action which will be queued up to run as soon as any

pending or running actions have completed.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • type (String)

    The type of action.

  • force (Boolean) (defaults to: nil)

    If set to true, the action will be forced immediately, and all queued actions deleted. Ignored for the start action.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
# File 'lib/ibm_vpc/vpc_v1.rb', line 7523

def create_instance_action(instance_id:, type:, force: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("type must be provided") if type.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_action")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "type" => type,
    "force" => force
  }

  method_url = "/instances/%s/actions" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_instance_console_access_token(instance_id:, console_type:, force: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a console access token for an instance. This request creates a new single-use console access token for an instance. All

console configuration is provided at token create time, and the token is
subsequently used in the `access_token` query parameter for the WebSocket request.
 The access token is only valid for a short period of time, and a maximum of one
token is valid for a given instance at a time.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • console_type (String)

    The instance console type for which this token may be used.

  • force (Boolean) (defaults to: nil)

    Indicates whether to disconnect an existing serial console session as the serial console cannot be shared. This has no effect on VNC consoles.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
# File 'lib/ibm_vpc/vpc_v1.rb', line 7815

def create_instance_console_access_token(instance_id:, console_type:, force: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("console_type must be provided") if console_type.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_console_access_token")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "console_type" => console_type,
    "force" => force
  }

  method_url = "/instances/%s/console_access_token" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_instance_group(instance_template:, subnets:, application_port: nil, load_balancer: nil, load_balancer_pool: nil, membership_count: nil, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create an instance group. This request creates a new instance group.

Parameters:

  • instance_template (InstanceTemplateIdentity)

    The instance template to use when creating new instances.

    The specified template must not have ‘default_trusted_profile.auto_link` set to `true`.

  • subnets (Array[SubnetIdentity])

    The subnets to use when creating new instances.

  • application_port (Fixnum) (defaults to: nil)

    The port to use for new load balancer pool members created by this instance group. The load balancer pool member will receive load balancer traffic on this port, unless the load balancer listener is using a port range. (Traffic received on a listener using a port range will be sent to members using the same port the listener received it on.)

    This port will also be used for health checks unless the port property of ‘health_monitor` property is specified.

    This property must be specified if and only if ‘load_balancer_pool` has been specified.

  • load_balancer (LoadBalancerIdentity) (defaults to: nil)

    The load balancer associated with the specified load balancer pool. Required if ‘load_balancer_pool` is specified. The load balancer must have `instance_groups_supported` set to `true`.

  • load_balancer_pool (LoadBalancerPoolIdentity) (defaults to: nil)

    If specified, this instance group will manage the load balancer pool. A pool member will be created for each instance created by this group. The specified load balancer pool must not be used by another instance group in the VPC.

    If specified, ‘load_balancer` and `application_port` must also be specified.

  • membership_count (Fixnum) (defaults to: nil)

    The number of instances in the instance group.

  • name (String) (defaults to: nil)

    The name for this instance group. The name must not be used by another instance group in the region. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
# File 'lib/ibm_vpc/vpc_v1.rb', line 5892

def create_instance_group(instance_template:, subnets:, application_port: nil, load_balancer: nil, load_balancer_pool: nil, membership_count: nil, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_template must be provided") if instance_template.nil?

  raise ArgumentError.new("subnets must be provided") if subnets.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "instance_template" => instance_template,
    "subnets" => subnets,
    "application_port" => application_port,
    "load_balancer" => load_balancer,
    "load_balancer_pool" => load_balancer_pool,
    "membership_count" => membership_count,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/instance_groups"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_instance_group_manager(instance_group_id:, instance_group_manager_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a manager for an instance group. This request creates a new instance group manager.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_prototype (InstanceGroupManagerPrototype)

    The instance group manager prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
# File 'lib/ibm_vpc/vpc_v1.rb', line 6132

def create_instance_group_manager(instance_group_id:, instance_group_manager_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_prototype must be provided") if instance_group_manager_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_group_manager")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_group_manager_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/instance_groups/%s/managers" % [ERB::Util.url_encode(instance_group_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, instance_group_manager_action_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create an instance group manager action. This request creates a new instance group manager action.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • instance_group_manager_action_prototype (InstanceGroupManagerActionPrototype)

    The instance group manager action prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
# File 'lib/ibm_vpc/vpc_v1.rb', line 6340

def create_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, instance_group_manager_action_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  raise ArgumentError.new("instance_group_manager_action_prototype must be provided") if instance_group_manager_action_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_group_manager_action")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_group_manager_action_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/instance_groups/%s/managers/%s/actions" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, instance_group_manager_policy_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a policy for an instance group manager. This request creates a new instance group manager policy.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • instance_group_manager_policy_prototype (InstanceGroupManagerPolicyPrototype)

    The instance group manager policy prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
# File 'lib/ibm_vpc/vpc_v1.rb', line 6559

def create_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, instance_group_manager_policy_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  raise ArgumentError.new("instance_group_manager_policy_prototype must be provided") if instance_group_manager_policy_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_group_manager_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_group_manager_policy_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/instance_groups/%s/managers/%s/policies" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_instance_network_attachment(instance_id:, virtual_network_interface:, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a network attachment on an instance. This request creates a new instance network attachment from an instance network

attachment prototype object. The prototype object is structured in the same way as
a retrieved instance network attachment, and contains the information necessary to
create the new instance network attachment.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • virtual_network_interface (InstanceNetworkAttachmentPrototypeVirtualNetworkInterface)

    A virtual network interface for the instance network attachment. This can be specified using an existing virtual network interface, or a prototype object for a new virtual network interface.

    If an existing virtual network interface is specified, ‘enable_infrastructure_nat` must be `true`.

  • name (String) (defaults to: nil)

    The name for this network attachment. Names must be unique within the instance the network attachment resides in. If unspecified, the name will be a hyphenated list of randomly-selected words.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
# File 'lib/ibm_vpc/vpc_v1.rb', line 8036

def create_instance_network_attachment(instance_id:, virtual_network_interface:, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("virtual_network_interface must be provided") if virtual_network_interface.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "virtual_network_interface" => virtual_network_interface,
    "name" => name
  }

  method_url = "/instances/%s/network_attachments" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_instance_network_interface(instance_id:, subnet:, allow_ip_spoofing: nil, name: nil, primary_ip: nil, security_groups: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a network interface on an instance. This request creates a new instance network interface from an instance network

interface prototype object. The prototype object is structured in the same way as
a retrieved instance network interface, and contains the information necessary to
create the new instance network interface. Any subnet in the instance's VPC may be
specified. Addresses on the instance network interface must be within the
specified subnet's CIDR blocks.

If this instance has network attachments, each network interface is a [read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface, and new network interfaces are not allowed to be created.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • subnet (SubnetIdentity)

    The associated subnet.

  • allow_ip_spoofing (Boolean) (defaults to: nil)

    Indicates whether source IP spoofing is allowed on this instance network interface.

    If this instance has network attachments, this network interface is a [read-only representation](cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients) of its corresponding network attachment and its attached virtual network interface, and source IP spoofing is managed on the attached virtual network interface.

  • name (String) (defaults to: nil)

    The name for the instance network interface. The name must not be used by another network interface on the virtual server instance. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • primary_ip (NetworkInterfaceIPPrototype) (defaults to: nil)

    The primary IP address to bind to the instance network interface. This can be specified using an existing reserved IP, or a prototype object for a new reserved IP.

    If an existing reserved IP or a prototype object with an address is specified, it must be available on the instance network interface’s subnet. Otherwise, an available address on the subnet will be automatically selected and reserved.

  • security_groups (Array[SecurityGroupIdentity]) (defaults to: nil)

    The security groups to use for this instance network interface. If unspecified, the VPC’s default security group is used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
# File 'lib/ibm_vpc/vpc_v1.rb', line 8286

def create_instance_network_interface(instance_id:, subnet:, allow_ip_spoofing: nil, name: nil, primary_ip: nil, security_groups: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("subnet must be provided") if subnet.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "subnet" => subnet,
    "allow_ip_spoofing" => allow_ip_spoofing,
    "name" => name,
    "primary_ip" => primary_ip,
    "security_groups" => security_groups
  }

  method_url = "/instances/%s/network_interfaces" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_instance_template(instance_template_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create an instance template. This request creates a new instance template. The prototype object is structured

in the same way as a retrieved instance template, and contains the information
necessary to provision a new instance from the template.

If a `source_template` is specified in the prototype object, its contents are
copied into the new template prior to copying any other properties provided in the
prototype object.

Parameters:

  • instance_template_prototype (InstanceTemplatePrototype)

    The instance template prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
# File 'lib/ibm_vpc/vpc_v1.rb', line 6976

def create_instance_template(instance_template_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_template_prototype must be provided") if instance_template_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_template")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_template_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/instance/templates"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_instance_volume_attachment(instance_id:, volume:, delete_volume_on_instance_delete: nil, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a volume attachment on an instance. This request creates a new volume attachment from a volume attachment prototype

object, connecting a volume to an instance. For this request to succeed, the
specified volume must not be busy. The prototype object is structured in the same
way as a retrieved volume attachment, and contains the information necessary to
create the new volume attachment.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • volume (VolumeAttachmentPrototypeVolume)

    The volume to use for this attachment. This can be specified as an existing unattached volume, or a prototype object for a new volume.

  • delete_volume_on_instance_delete (Boolean) (defaults to: nil)

    Indicates whether deleting the instance will also delete the attached volume.

  • name (String) (defaults to: nil)

    The name for this volume attachment. The name must not be used by another volume attachment on the instance. If unspecified, the name will be a hyphenated list of randomly-selected words.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
# File 'lib/ibm_vpc/vpc_v1.rb', line 8778

def create_instance_volume_attachment(instance_id:, volume:, delete_volume_on_instance_delete: nil, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("volume must be provided") if volume.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_instance_volume_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "volume" => volume,
    "delete_volume_on_instance_delete" => delete_volume_on_instance_delete,
    "name" => name
  }

  method_url = "/instances/%s/volume_attachments" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_ipsec_policy(authentication_algorithm:, encryption_algorithm:, pfs:, key_lifetime: nil, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create an IPsec policy. This request creates a new IPsec policy.

Parameters:

  • authentication_algorithm (String)

    The authentication algorithm

    Must be ‘disabled` if and only if the `encryption_algorithm` is `aes128gcm16`, `aes192gcm16`, or `aes256gcm16`

    The ‘md5` and `sha1` algorithms have been deprecated.

  • encryption_algorithm (String)

    The encryption algorithm

    The ‘authentication_algorithm` must be `disabled` if and only if `encryption_algorithm` is `aes128gcm16`, `aes192gcm16`, or `aes256gcm16`

    The ‘triple_des` algorithm has been deprecated.

  • pfs (String)

    The Perfect Forward Secrecy group.

    Groups ‘group_2` and `group_5` have been deprecated.

  • key_lifetime (Fixnum) (defaults to: nil)

    The key lifetime in seconds.

  • name (String) (defaults to: nil)

    The name for this IPsec policy. The name must not be used by another IPsec policy in the region. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
# File 'lib/ibm_vpc/vpc_v1.rb', line 19456

def create_ipsec_policy(authentication_algorithm:, encryption_algorithm:, pfs:, key_lifetime: nil, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("authentication_algorithm must be provided") if authentication_algorithm.nil?

  raise ArgumentError.new("encryption_algorithm must be provided") if encryption_algorithm.nil?

  raise ArgumentError.new("pfs must be provided") if pfs.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_ipsec_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "authentication_algorithm" => authentication_algorithm,
    "encryption_algorithm" => encryption_algorithm,
    "pfs" => pfs,
    "key_lifetime" => key_lifetime,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/ipsec_policies"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_key(public_key:, name: nil, resource_group: nil, type: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a key. This request creates a new SSH key from an key prototype object. The prototype

object is structured in the same way as a retrieved key, and contains the
information necessary to create the new key. The public key value must be
provided.

Parameters:

  • public_key (String)

    The public SSH key to use, in OpenSSH format (consisting of three space-separated fields: the algorithm name, base64-encoded key value, and a comment). The algorithm and comment fields may be omitted, as only the key field is used.

    The key field must not match another key in the region.

    Keys of type ‘rsa` must be 2048 or 4096 bits in length (4096 is recommended). Keys of type `ed25519` must be 256 bits in length.

  • name (String) (defaults to: nil)

    The name for this key. The name must not be used by another key in the region. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • type (String) (defaults to: nil)

    The crypto-system for this key.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
# File 'lib/ibm_vpc/vpc_v1.rb', line 9007

def create_key(public_key:, name: nil, resource_group: nil, type: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("public_key must be provided") if public_key.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_key")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "public_key" => public_key,
    "name" => name,
    "resource_group" => resource_group,
    "type" => type
  }

  method_url = "/keys"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_load_balancer(is_public:, subnets:, dns: nil, is_private_path: nil, listeners: nil, logging: nil, name: nil, pools: nil, profile: nil, resource_group: nil, route_mode: nil, security_groups: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a load balancer. This request creates and provisions a new load balancer.

Parameters:

  • is_public (Boolean)

    Indicates whether this load balancer is public.

    At present,

    • If ‘route_mode` is set to `true`, the load balancer must be private.

    • If ‘is_private_path` is specified, it must be set to `false`.

  • subnets (Array[SubnetIdentity])

    The subnets to provision this load balancer in. The subnets must be in the same VPC.

    • If ‘availability’ is specified as ‘subnet` in the profile, the load balancer’s

    availability will depend on the availability of the zones that the subnets reside in.

    • If ‘availability’ is specified as ‘region` in the profile, the load balancer

    remains available as long as any zone in the region is available. Only members in healthy zones will be sent new connections.

    Load balancers in the ‘network` family allow only one subnet to be specified.

  • dns (LoadBalancerDNSPrototype) (defaults to: nil)

    The DNS configuration for this load balancer.

    If unspecified, DNS ‘A` records for this load balancer’s ‘hostname` property will be added to the public DNS zone `lb.appdomain.cloud`. Otherwise, those DNS `A` records will be added to the specified `zone`.

    Not supported by private path load balancers.

  • is_private_path (Boolean) (defaults to: nil)

    Indicates whether this is a private path load balancer.

  • listeners (Array[LoadBalancerListenerPrototypeLoadBalancerContext]) (defaults to: nil)

    The listeners of this load balancer.

  • logging (LoadBalancerLoggingPrototype) (defaults to: nil)

    The logging configuration to use for this load balancer. See [VPC Datapath Logging](cloud.ibm.com/docs/vpc?topic=vpc-datapath-logging) on the logging format, fields and permitted values. If unspecified, ‘datapath.active` will be `false`.

    To activate logging, the load balancer profile must support the specified logging type.

  • name (String) (defaults to: nil)

    The name for this load balancer. The name must not be used by another load balancer in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • pools (Array[LoadBalancerPoolPrototypeLoadBalancerContext]) (defaults to: nil)

    The pools of this load balancer.

  • profile (LoadBalancerProfileIdentity) (defaults to: nil)

    The profile to use for this load balancer.

    If unspecified, ‘application` will be used.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • route_mode (Boolean) (defaults to: nil)

    Indicates whether [route mode](cloud.ibm.com/docs/vpc?topic=vpc-nlb-vnf&interface=ui) is enabled for this load balancer.

    At present, public load balancers are not supported with route mode enabled.

  • security_groups (Array[SecurityGroupIdentity]) (defaults to: nil)

    The security groups to use for this load balancer. If unspecified, the VPC’s default security group is used.

    The load balancer profile must support security groups.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
# File 'lib/ibm_vpc/vpc_v1.rb', line 9324

def create_load_balancer(is_public:, subnets:, dns: nil, is_private_path: nil, listeners: nil, logging: nil, name: nil, pools: nil, profile: nil, resource_group: nil, route_mode: nil, security_groups: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("is_public must be provided") if is_public.nil?

  raise ArgumentError.new("subnets must be provided") if subnets.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "is_public" => is_public,
    "subnets" => subnets,
    "dns" => dns,
    "is_private_path" => is_private_path,
    "listeners" => listeners,
    "logging" => logging,
    "name" => name,
    "pools" => pools,
    "profile" => profile,
    "resource_group" => resource_group,
    "route_mode" => route_mode,
    "security_groups" => security_groups
  }

  method_url = "/load_balancers"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_load_balancer_listener(load_balancer_id:, protocol:, accept_proxy_protocol: nil, certificate_instance: nil, connection_limit: nil, default_pool: nil, https_redirect: nil, idle_connection_timeout: nil, policies: nil, port: nil, port_max: nil, port_min: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a listener for a load balancer. This request creates a new listener for a load balancer.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • protocol (String)

    The listener protocol. Each listener in the load balancer must have a non-overlapping port range and ‘protocol` combination.

    Load balancers in the ‘network` family support `tcp` and `udp` (if `udp_supported` is `true`). Load balancers in the `application` family support `tcp`, `http` and `https`.

    Additional restrictions:

    • If ‘default_pool` is set, the pool’s protocol must match, or be compatible with the listener’s protocol. At present, the compatible protocols are ‘http` and `https`.

    • If ‘https_redirect` is set, the protocol must be `http`.

  • accept_proxy_protocol (Boolean) (defaults to: nil)

    If set to ‘true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in the `application` family (otherwise always `false`). Additional restrictions:

    • If this listener has ‘https_redirect` specified, its `accept_proxy_protocol`

    value must

    match the `accept_proxy_protocol` value of the `https_redirect` listener.
    
    • If this listener is the target of another listener’s ‘https_redirect`, its `accept_proxy_protocol` value must match that listener’s ‘accept_proxy_protocol`

    value.

  • certificate_instance (CertificateInstanceIdentity) (defaults to: nil)

    The certificate instance to use for SSL termination. The listener must have a ‘protocol` of `https`.

  • connection_limit (Fixnum) (defaults to: nil)

    The concurrent connection limit for the listener. If reached, incoming connections may be queued or rejected.

    Supported for load balancers in the ‘application` family.

    If unspecified, the limit will be ‘15000` for load balancers in the `application` family.

  • default_pool (LoadBalancerPoolIdentity) (defaults to: nil)

    The default pool for this listener. If ‘https_redirect` is specified, the default pool will not be used.

    If specified, the pool must:

    • Belong to this load balancer.

    • Have the same ‘protocol` as this listener, or have a compatible protocol. At present, the compatible protocols are `http` and `https`.

    • Not already be the ‘default_pool` for another listener.

    • Not already be the ‘failsafe_policy.target` for another `default_pool` and `failsafe_policy.target` (applies only to load balancers in the `network` family).

    If unspecified, this listener will be created with no default pool, but one may be subsequently set.

  • https_redirect (LoadBalancerListenerHTTPSRedirectPrototype) (defaults to: nil)

    The target listener that requests will be redirected to if none of the listener’s ‘policies` match.

    If specified, this listener must have a ‘protocol` of `http`, and the target listener must have a `protocol` of `https`.

  • idle_connection_timeout (Fixnum) (defaults to: nil)

    The idle connection timeout of the listener in seconds.

    Supported for load balancers in the ‘application` family.

    If unspecified, the timeout will be ‘50` for load balancers in the `application` family.

  • policies (Array[LoadBalancerListenerPolicyPrototype]) (defaults to: nil)

    The policy prototype objects for this listener. The load balancer must be in the ‘application` family.

  • port (Fixnum) (defaults to: nil)

    The listener port number. Each listener in the load balancer must have a non-overlapping port range and ‘protocol` combination. Protocol values of `tcp`, `http` and `https` share the TCP port space.

    If ‘port_min` is also specified, `port` must have the same value as `port_min`.

  • port_max (Fixnum) (defaults to: nil)

    The inclusive upper bound of the range of ports used by this listener. Must not be less than ‘port_min`.

    Only network load balancers with ‘route_mode`, `is_public` or `is_private_path` set to `true` support different values for `port_min` and `port_max`. If `route_mode` is set to `true`, the value must be `65535`.

    The specified port range must not overlap with port ranges used by other listeners for this load balancer using the same protocol. Protocol values of ‘tcp`, `http` and `https` share the TCP port space.

  • port_min (Fixnum) (defaults to: nil)

    The inclusive lower bound of the range of ports used by this listener. Must not be greater than ‘port_max`.

    If specified, ‘port_max` must also be specified, and must not be smaller. If unspecified, `port_max` must also be unspecified.

    If ‘port` is also specified, `port_min` must have the same value as `port`.

    Only network load balancers with ‘route_mode`, `is_public` or `is_private_path` set to `true` support different values for `port_min` and `port_max`. If `route_mode` is set to `true`, the value must be `1`.

    The specified port range must not overlap with port ranges used by other listeners for this load balancer using the same protocol. Protocol values of ‘tcp`, `http` and `https` share the TCP port space.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
# File 'lib/ibm_vpc/vpc_v1.rb', line 9662

def create_load_balancer_listener(load_balancer_id:, protocol:, accept_proxy_protocol: nil, certificate_instance: nil, connection_limit: nil, default_pool: nil, https_redirect: nil, idle_connection_timeout: nil, policies: nil, port: nil, port_max: nil, port_min: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("protocol must be provided") if protocol.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_listener")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "protocol" => protocol,
    "accept_proxy_protocol" => accept_proxy_protocol,
    "certificate_instance" => certificate_instance,
    "connection_limit" => connection_limit,
    "default_pool" => default_pool,
    "https_redirect" => https_redirect,
    "idle_connection_timeout" => idle_connection_timeout,
    "policies" => policies,
    "port" => port,
    "port_max" => port_max,
    "port_min" => port_min
  }

  method_url = "/load_balancers/%s/listeners" % [ERB::Util.url_encode(load_balancer_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action:, priority:, name: nil, rules: nil, target: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a policy for a load balancer listener. This request creates a new policy from a load balancer listener policy object. The

prototype object is structured in the same way as a retrieved policy, and contains
the information necessary to create the new policy. For this request to succeed,
the load balancer must be in the `application` family.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • action (String)

    The policy action:

    • ‘forward_to_listener`: Requests will be forwarded to the specified `target` listener.

    • ‘forward_to_pool`: Requests will be forwarded to the specified `target` pool.

    • ‘https_redirect`: Requests will be redirected to the specified

    ‘target.listener`.

    This listener must have a `protocol` of `http`, and the target listener must
    have a `protocol` of `https`.
    
    • ‘redirect`: Requests will be redirected to the specified `target.url`

    • ‘reject`: Requests will be rejected with a `403` status code.

  • priority (Fixnum)

    The priority of the policy. The priority is unique across all policies for this load balancer listener. Lower value indicates higher priority.

  • name (String) (defaults to: nil)

    The name for this policy. The name must not be used by another policy for the load balancer listener. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • rules (Array[LoadBalancerListenerPolicyRulePrototype]) (defaults to: nil)

    The rule prototype objects for this policy.

  • target (LoadBalancerListenerPolicyTargetPrototype) (defaults to: nil)
    • If ‘action` is `forward_to_listener`, specify a `LoadBalancerListenerIdentity`

    in this

    load balancer to forward to.
    
    • If ‘action` is `forward_to_pool`, use `LoadBalancerPoolIdentity` to specify a

    pool in

    this load balancer to forward to.
    
    • If ‘action` is `https_redirect`, use `LoadBalancerListenerPolicyHTTPSRedirectPrototype` to specify a listener on this load balancer to redirect to.

    • If ‘action` is `redirect`, use

    ‘LoadBalancerListenerPolicyRedirectURLPrototype`to

    specify a URL to redirect to.
    

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
# File 'lib/ibm_vpc/vpc_v1.rb', line 9910

def create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action:, priority:, name: nil, rules: nil, target: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("action must be provided") if action.nil?

  raise ArgumentError.new("priority must be provided") if priority.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_listener_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "action" => action,
    "priority" => priority,
    "name" => name,
    "rules" => rules,
    "target" => target
  }

  method_url = "/load_balancers/%s/listeners/%s/policies" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, condition:, type:, value:, field: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a rule for a load balancer listener policy. Creates a new rule for the load balancer listener policy.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • policy_id (String)

    The policy identifier.

  • condition (String)

    The condition for the rule.

  • type (String)

    The content the rule applies to:

    • ‘body`: The UTF-8 form-encoded HTTP request body

    • ‘header`: The HTTP header

    • ‘hostname`: The fully-qualified domain name of the server specified in the Host HTTP request header

    • ‘path`: The path of the HTTP request

    • ‘query`: The query of the HTTP request URL

    • ‘sni_hostname`: The fully-qualified domain name of the server provided in the “server name indicator” extension during TLS negotiation

    • For listeners with ‘protocol` `http` or `https`, any type may be specified.

    • For listeners with ‘protocol` `tcp`, only type `sni_hostname` may be specified.

  • value (String)

    The value to be matched for the rule condition.

    If the rule type is ‘query` and the rule condition is not `matches_regex`, the value must be percent-encoded.

  • field (String) (defaults to: nil)

    The field to match for this rule.

    • If the ‘type` is `header`, this property must be specified.

    • If the ‘type` is `body` or `query`, this property may be specified.

    • For all other types, this property must not be specified.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
# File 'lib/ibm_vpc/vpc_v1.rb', line 10156

def create_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, condition:, type:, value:, field: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("policy_id must be provided") if policy_id.nil?

  raise ArgumentError.new("condition must be provided") if condition.nil?

  raise ArgumentError.new("type must be provided") if type.nil?

  raise ArgumentError.new("value must be provided") if value.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_listener_policy_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "condition" => condition,
    "type" => type,
    "value" => value,
    "field" => field
  }

  method_url = "/load_balancers/%s/listeners/%s/policies/%s/rules" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id), ERB::Util.url_encode(policy_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_load_balancer_pool(load_balancer_id:, algorithm:, health_monitor:, protocol:, failsafe_policy: nil, members: nil, name: nil, proxy_protocol: nil, session_persistence: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a load balancer pool. This request creates a new pool from a pool prototype object.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • algorithm (String)

    The load balancing algorithm. The ‘least_connections` algorithm is only supported for load balancers that have `availability` with value `subnet` in the profile.

  • health_monitor (LoadBalancerPoolHealthMonitorPrototype)

    The health monitor of this pool.

    If this pool has a member targeting a load balancer then:

    • If the targeted load balancer has multiple subnets, this health monitor will be used to direct traffic to the available subnets.

    • The health checks spawned by this health monitor will be handled as any other traffic (that is, subject to the configuration of listeners and pools on the

    target

    load balancer).
    
    • This health monitor does not affect how pool member health is determined within

    the

    target load balancer.
    

    For more information, see [Private Path network load balancer frequently asked questions](cloud.ibm.com/docs/vpc?topic=vpc-nlb-faqs#ppnlb-faqs).

  • protocol (String)

    The protocol used for this load balancer pool. Load balancers in the ‘network` family support `tcp` and `udp` (if `udp_supported` is `true`). Load balancers in the `application` family support `tcp`, `http`, and `https`.

  • failsafe_policy (LoadBalancerPoolFailsafePolicyPrototype) (defaults to: nil)

    The failsafe policy to use for this pool.

    If unspecified, the default failsafe policy action from the profile will be used.

  • members (Array[LoadBalancerPoolMemberPrototype]) (defaults to: nil)

    The members for this load balancer pool. For load balancers in the ‘network` family, the same `port` and `target` tuple cannot be shared by a pool member of any other load balancer in the same VPC.

  • name (String) (defaults to: nil)

    The name for this load balancer pool. The name must not be used by another pool for the load balancer. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • proxy_protocol (String) (defaults to: nil)

    The PROXY protocol setting for this pool:

    • ‘v1`: Enabled with version 1 (human-readable header format)

    • ‘v2`: Enabled with version 2 (binary header format)

    • ‘disabled`: Disabled

    For load balancers in the ‘network` family, this property must be `disabled`.

  • session_persistence (LoadBalancerPoolSessionPersistencePrototype) (defaults to: nil)

    The session persistence of this pool. If specified, the load balancer must have ‘source_ip_session_persistence_supported` set to `true` in its profile.

    If unspecified, session persistence will be disabled, and traffic will be distributed across members of the pool.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
# File 'lib/ibm_vpc/vpc_v1.rb', line 10427

def create_load_balancer_pool(load_balancer_id:, algorithm:, health_monitor:, protocol:, failsafe_policy: nil, members: nil, name: nil, proxy_protocol: nil, session_persistence: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("algorithm must be provided") if algorithm.nil?

  raise ArgumentError.new("health_monitor must be provided") if health_monitor.nil?

  raise ArgumentError.new("protocol must be provided") if protocol.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_pool")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "algorithm" => algorithm,
    "health_monitor" => health_monitor,
    "protocol" => protocol,
    "failsafe_policy" => failsafe_policy,
    "members" => members,
    "name" => name,
    "proxy_protocol" => proxy_protocol,
    "session_persistence" => session_persistence
  }

  method_url = "/load_balancers/%s/pools" % [ERB::Util.url_encode(load_balancer_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_load_balancer_pool_member(load_balancer_id:, pool_id:, port:, target:, weight: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a member in a load balancer pool. This request creates a new member and adds the member to the pool.

The pool must not already have a member targeting a load balancer.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • pool_id (String)

    The pool identifier.

  • port (Fixnum)

    The port the member will receive load balancer traffic on. Applies only to load balancer traffic received on a listener with a single port. (If the traffic is received on a listener with a port range, the member will receive the traffic on the same port the listener received it on.)

    This port will also be used for health checks unless the ‘port` property of `health_monitor` property is specified.

    The port must be unique across all members for all pools associated with this pool’s listener.

    For load balancers in the ‘network` family, the same `port` and `target` tuple cannot be shared by a pool member of any other load balancer in the same VPC.

  • target (LoadBalancerPoolMemberTargetPrototype)

    The pool member target.

    If the load balancer has ‘route_mode` set to `true`, the member must be in a zone the load balancer has a subnet in.

    For load balancers in the ‘network` family, the same `port` and `target` tuple cannot be shared by a pool member of any other load balancer in the same VPC.

  • weight (Fixnum) (defaults to: nil)

    The weight of the member.

    If specified, the pool algorithm must be ‘weighted_round_robin` and the load balancer must be in the `application` family.

    If unspecified, the weight will be ‘50` for load balancers in the `application` family.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
# File 'lib/ibm_vpc/vpc_v1.rb', line 10673

def create_load_balancer_pool_member(load_balancer_id:, pool_id:, port:, target:, weight: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("pool_id must be provided") if pool_id.nil?

  raise ArgumentError.new("port must be provided") if port.nil?

  raise ArgumentError.new("target must be provided") if target.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_pool_member")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "port" => port,
    "target" => target,
    "weight" => weight
  }

  method_url = "/load_balancers/%s/pools/%s/members" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(pool_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_network_acl(network_acl_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a network ACL. This request creates a new stateless network ACL from a network ACL prototype

object. The prototype object is structured in the same way as a retrieved network
ACL, and contains the information necessary to create the new network ACL.

Parameters:

  • network_acl_prototype (NetworkACLPrototype)

    The network ACL prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
# File 'lib/ibm_vpc/vpc_v1.rb', line 10947

def create_network_acl(network_acl_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("network_acl_prototype must be provided") if network_acl_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_network_acl")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = network_acl_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/network_acls"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_network_acl_rule(network_acl_id:, network_acl_rule_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a rule for a network ACL. This request creates a new rule from a network ACL rule prototype object. The

prototype object is structured in the same way as a retrieved rule, and contains
the information necessary to create the new rule.

Parameters:

  • network_acl_id (String)

    The network ACL identifier.

  • network_acl_rule_prototype (NetworkACLRulePrototype)

    The network ACL rule prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
# File 'lib/ibm_vpc/vpc_v1.rb', line 11148

def create_network_acl_rule(network_acl_id:, network_acl_rule_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil?

  raise ArgumentError.new("network_acl_rule_prototype must be provided") if network_acl_rule_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_network_acl_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = network_acl_rule_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/network_acls/%s/rules" % [ERB::Util.url_encode(network_acl_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_placement_group(strategy:, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a placement group. This request creates a new placement group.

Parameters:

  • strategy (String)

    The strategy for this placement group:

    • ‘host_spread`: place on different compute hosts

    • ‘power_spread`: place on compute hosts that use different power sources.

  • name (String) (defaults to: nil)

    The name for this placement group. The name must not be used by another placement group in the region. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
# File 'lib/ibm_vpc/vpc_v1.rb', line 11359

def create_placement_group(strategy:, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("strategy must be provided") if strategy.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_placement_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "strategy" => strategy,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/placement_groups"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_private_path_service_gateway(load_balancer:, service_endpoints:, default_access_policy: nil, name: nil, resource_group: nil, zonal_affinity: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a private path service gateway. This request creates a private path service gateway from a private path service

gateway prototype object. The prototype object is structured in the same way as a
retrieved private path service gateway, and contains the information necessary to
create the new private path service gateway.

Parameters:

  • load_balancer (LoadBalancerIdentity)

    The load balancer for this private path service gateway. The load balancer must have ‘is_private_path` set to `true`.

    The private path service gateway will reside in the same VPC as the specified load balancer.

  • service_endpoints (Array[String])

    The fully qualified domain names for this private path service gateway. Any uppercase letters will be converted to lowercase.

  • default_access_policy (String) (defaults to: nil)

    The policy to use for bindings from accounts without an explicit account policy.

  • name (String) (defaults to: nil)

    The name for this private path service gateway. The name must not be used by another private path service gateway in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • zonal_affinity (Boolean) (defaults to: nil)

    Indicates whether this private path service gateway has zonal affinity.

    • ‘true`: Traffic to the service from a zone the service resides in will remain

    in

    that zone.
    
    • ‘false`: Traffic to the service from a zone will be load balanced across all

    zones

    in the region the service resides in.
    

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
# File 'lib/ibm_vpc/vpc_v1.rb', line 11591

def create_private_path_service_gateway(load_balancer:, service_endpoints:, default_access_policy: nil, name: nil, resource_group: nil, zonal_affinity: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer must be provided") if load_balancer.nil?

  raise ArgumentError.new("service_endpoints must be provided") if service_endpoints.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_private_path_service_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "load_balancer" => load_balancer,
    "service_endpoints" => service_endpoints,
    "default_access_policy" => default_access_policy,
    "name" => name,
    "resource_group" => resource_group,
    "zonal_affinity" => zonal_affinity
  }

  method_url = "/private_path_service_gateways"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_private_path_service_gateway_account_policy(private_path_service_gateway_id:, access_policy:, account:) ⇒ IBMCloudSdkCore::DetailedResponse

Create an account policy for a private path service gateway. This request creates an account policy from an account policy prototype object.

The prototype object is structured in the same way as a retrieved account policy,
and contains the information necessary to create the new account policy.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • access_policy (String)

    The access policy for the account:

    • ‘permit`: access will be permitted

    • ‘deny`: access will be denied

    • ‘review`: access will be manually reviewed

    • Specifying ‘review` sets the status of future endpoint gateway bindings from

    this

    account to `pending`.
    
    • Specifying ‘permit` updates both the status of `pending` and future endpoint

    gateway

    bindings from this account to `permitted`.
    
    • Specifying ‘deny` updates both the status of `pending` and future endpoint

    gateway

    bindings from this account to `denied`.
    
  • account (AccountIdentity)

    The account for this access policy. The account must be unique across all account policies for this private path service gateway.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
# File 'lib/ibm_vpc/vpc_v1.rb', line 11822

def (private_path_service_gateway_id:, access_policy:, account:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  raise ArgumentError.new("access_policy must be provided") if access_policy.nil?

  raise ArgumentError.new("account must be provided") if .nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_private_path_service_gateway_account_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "access_policy" => access_policy,
    "account" => 
  }

  method_url = "/private_path_service_gateways/%s/account_policies" % [ERB::Util.url_encode(private_path_service_gateway_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_public_address_range(ipv4_address_count:, name: nil, resource_group: nil, target: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a public address range. This request creates a new public address range from a public address range

prototype object. The prototype object is structured in the same way as a
retrieved public address range, and contains the information necessary to create
the new public address range.

Parameters:

  • ipv4_address_count (Fixnum)

    The total number of public IPv4 addresses required. Must be a power of 2.

  • name (String) (defaults to: nil)

    The name for this public address range. The name must not be used by another public address range in the region. Names starting with ‘ibm-` are reserved for provider-managed resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • target (PublicAddressRangeTargetPrototype) (defaults to: nil)

    The target to bind this public address range to. If unspecified, the public address range will not be bound to a target at creation.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
# File 'lib/ibm_vpc/vpc_v1.rb', line 12384

def create_public_address_range(ipv4_address_count:, name: nil, resource_group: nil, target: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("ipv4_address_count must be provided") if ipv4_address_count.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_public_address_range")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "ipv4_address_count" => ipv4_address_count,
    "name" => name,
    "resource_group" => resource_group,
    "target" => target
  }

  method_url = "/public_address_ranges"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_public_gateway(vpc:, zone:, floating_ip: nil, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a public gateway. This request creates a new public gateway from a public gateway prototype object.

For this to succeed, the VPC must not already have a public gateway in the
specified zone.

If a floating IP is provided, it must be unbound. If a floating IP is not
provided, one will be created and bound to the public gateway. Once a public
gateway has been created, its floating IP cannot be unbound. A public gateway must
be explicitly attached to each subnet it will provide connectivity for.

Parameters:

  • vpc (VPCIdentity)

    The VPC this public gateway will reside in.

  • zone (ZoneIdentity)

    The zone this public gateway will reside in.

  • floating_ip (PublicGatewayFloatingIPPrototype) (defaults to: nil)
  • name (String) (defaults to: nil)

    The name for this public gateway. The name must not be used by another public gateway in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
# File 'lib/ibm_vpc/vpc_v1.rb', line 12604

def create_public_gateway(vpc:, zone:, floating_ip: nil, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc must be provided") if vpc.nil?

  raise ArgumentError.new("zone must be provided") if zone.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_public_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "vpc" => vpc,
    "zone" => zone,
    "floating_ip" => floating_ip,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/public_gateways"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_reservation(capacity:, committed_use:, profile:, zone:, affinity_policy: nil, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a reservation. This request creates a new reservation from a reservation prototype object. The

prototype object is structured in the same way as a retrieved reservation, and
contains the information necessary to create the new reservation.

Parameters:

  • capacity (ReservationCapacityPrototype)

    The capacity reservation configuration to use.

  • committed_use (ReservationCommittedUsePrototype)

    The committed use configuration to use for this reservation.

  • profile (ReservationProfilePrototype)

    The [instance profile](cloud.ibm.com/docs/vpc?topic=vpc-profiles) or [bare metal server profile](cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) to use for this reservation.

  • zone (ZoneIdentity)

    The zone to use for this reservation.

  • affinity_policy (String) (defaults to: nil)

    The affinity policy to use for this reservation:

    • ‘automatic`: The reservation will be automatically selected

    • ‘restricted`: The reservation must be manually requested.

  • name (String) (defaults to: nil)

    The name for this reservation. The name must not be used by another reservation in the region. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
# File 'lib/ibm_vpc/vpc_v1.rb', line 12842

def create_reservation(capacity:, committed_use:, profile:, zone:, affinity_policy: nil, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("capacity must be provided") if capacity.nil?

  raise ArgumentError.new("committed_use must be provided") if committed_use.nil?

  raise ArgumentError.new("profile must be provided") if profile.nil?

  raise ArgumentError.new("zone must be provided") if zone.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_reservation")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "capacity" => capacity,
    "committed_use" => committed_use,
    "profile" => profile,
    "zone" => zone,
    "affinity_policy" => affinity_policy,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/reservations"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_security_group(vpc:, name: nil, resource_group: nil, rules: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a security group. This request creates a new security group from a security group prototype object.

The prototype object is structured in the same way as a retrieved security group,
and contains the information necessary to create the new security group. If
security group rules are included in the prototype object, those rules will be
added to the security group. Each security group is scoped to one VPC. Only
resources in that VPC can be added to the security group.

Parameters:

  • vpc (VPCIdentity)

    The VPC this security group will reside in.

  • name (String) (defaults to: nil)

    The name for this security group. The name must not be used by another security group for the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • rules (Array[SecurityGroupRulePrototype]) (defaults to: nil)

    The prototype objects for rules to be created for this security group. If unspecified, no rules will be created, resulting in no traffic being allowed.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
# File 'lib/ibm_vpc/vpc_v1.rb', line 13112

def create_security_group(vpc:, name: nil, resource_group: nil, rules: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc must be provided") if vpc.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "vpc" => vpc,
    "name" => name,
    "resource_group" => resource_group,
    "rules" => rules
  }

  method_url = "/security_groups"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_security_group_rule(security_group_id:, security_group_rule_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a rule for a security group. This request creates a new security group rule from a security group rule

prototype object. The prototype object is structured in the same way as a
retrieved security group rule and contains the information necessary to create the
rule. As part of creating a new rule in a security group, the rule is applied to
all the networking interfaces in the security group. Rules specify which IP
traffic a security group will allow. Security group rules are stateful, such that
reverse traffic in response to allowed traffic is automatically permitted. A rule
allowing inbound TCP traffic on port 80 also allows outbound TCP traffic on port
80 without the need for an additional rule.

Parameters:

  • security_group_id (String)

    The security group identifier.

  • security_group_rule_prototype (SecurityGroupRulePrototype)

    The properties of the security group rule to be created.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
# File 'lib/ibm_vpc/vpc_v1.rb', line 13318

def create_security_group_rule(security_group_id:, security_group_rule_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  raise ArgumentError.new("security_group_rule_prototype must be provided") if security_group_rule_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = security_group_rule_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/security_groups/%s/rules" % [ERB::Util.url_encode(security_group_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_security_group_target_binding(security_group_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Add a target to a security group. This request adds a resource to an existing security group. The specified target

identifier can be:

- A bare metal server network interface identifier
- A virtual network interface identifier
- A VPN server identifier
- A load balancer identifier
- An endpoint gateway identifier
- An instance network interface identifier

When a target is added to a security group, the security group rules are applied
to the target. A request body is not required, and if provided, is ignored.

Parameters:

  • security_group_id (String)

    The security group identifier.

  • id (String)

    The security group target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
# File 'lib/ibm_vpc/vpc_v1.rb', line 13627

def create_security_group_target_binding(security_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group_target_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#create_share(share_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a file share. This request provisions new file shares from a share prototype object. The new

file shares can be a standalone share, a replica share, or both a source and
replica share.

The prototype object is structured in the same way as a retrieved share, and
contains the information necessary to provision the new file shares.

Parameters:

  • share_prototype (SharePrototype)

    The file share prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
# File 'lib/ibm_vpc/vpc_v1.rb', line 13804

def create_share(share_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_prototype must be provided") if share_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_share")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = share_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/shares"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_share_mount_target(share_id:, share_mount_target_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a mount target for a file share. This request creates a new share mount target from a share mount target prototype

object.

The prototype object is structured in the same way as a retrieved share mount
target, and contains the information necessary to provision the new file share
mount target.

Parameters:

  • share_id (String)

    The file share identifier.

  • share_mount_target_prototype (ShareMountTargetPrototype)

    The share mount target prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
# File 'lib/ibm_vpc/vpc_v1.rb', line 14204

def create_share_mount_target(share_id:, share_mount_target_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("share_mount_target_prototype must be provided") if share_mount_target_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_share_mount_target")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = share_mount_target_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/shares/%s/mount_targets" % [ERB::Util.url_encode(share_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_share_snapshot(share_id:, name: nil, user_tags: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a snapshot for a file share. This request creates a new share snapshot from a share snapshot prototype object.

The prototype object is structured in the same way as a retrieved share snapshot,
and contains the information necessary to create the new share snapshot.

The share must have an `access_control_mode` of `security_group`, and a
`replication_role` of `source` or `none`.

The snapshot will inherit its `resource_group` and encryption settings from the
share.

If the share has a `replication_role` of `source`, a corresponding snapshot on the
replica share will be created with a `status` of `pending`. It will remain in
`pending` until the data is synchronized per the replication schedule determined
by the replica share's `replication_cron_spec`.

Parameters:

  • share_id (String)

    The file share identifier.

  • name (String) (defaults to: nil)

    The name for this share snapshot. The name must not be used by another snapshot for the file share. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • user_tags (Array[String]) (defaults to: nil)

    The [user tags](cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this share snapshot.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
# File 'lib/ibm_vpc/vpc_v1.rb', line 14448

def create_share_snapshot(share_id:, name: nil, user_tags: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_share_snapshot")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "name" => name,
    "user_tags" => user_tags
  }

  method_url = "/shares/%s/snapshots" % [ERB::Util.url_encode(share_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_snapshot(snapshot_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a snapshot. This request creates a new snapshot from a snapshot prototype object. The

prototype object is structured in the same way as a retrieved snapshot, and
contains the information necessary to provision the new snapshot.

Parameters:

  • snapshot_prototype (SnapshotPrototype)

    The snapshot prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
# File 'lib/ibm_vpc/vpc_v1.rb', line 15075

def create_snapshot(snapshot_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("snapshot_prototype must be provided") if snapshot_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_snapshot")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = snapshot_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/snapshots"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_snapshot_clone(id:, zone_name:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a clone for a snapshot. This request creates a new clone for a snapshot in the specified zone. A request

body is not required, and if provided, is ignored. If the snapshot already has a
clone in the zone, it is returned.

Parameters:

  • id (String)

    The snapshot identifier.

  • zone_name (String)

    The zone name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
# File 'lib/ibm_vpc/vpc_v1.rb', line 15351

def create_snapshot_clone(id:, zone_name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("zone_name must be provided") if zone_name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_snapshot_clone")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/snapshots/%s/clones/%s" % [ERB::Util.url_encode(id), ERB::Util.url_encode(zone_name)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#create_snapshot_consistency_group(snapshot_consistency_group_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a snapshot consistency group. This request creates a new snapshot consistency group from a snapshot consistency

group object.  The prototype object is structured in the same way as a retrieved
consistency group, and contains the information necessary to provision the new
snapshot consistency group.

Parameters:

  • snapshot_consistency_group_prototype (SnapshotConsistencyGroupPrototype)

    The snapshot consistency group prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
# File 'lib/ibm_vpc/vpc_v1.rb', line 14767

def create_snapshot_consistency_group(snapshot_consistency_group_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("snapshot_consistency_group_prototype must be provided") if snapshot_consistency_group_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_snapshot_consistency_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = snapshot_consistency_group_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/snapshot_consistency_groups"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_subnet(subnet_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a subnet. This request creates a new subnet from a subnet prototype object. The prototype

object is structured in the same way as a retrieved subnet, and contains the
information necessary to create the new subnet. For this request to succeed, the
prototype's CIDR block must not overlap with an existing subnet in the VPC.

Parameters:

  • subnet_prototype (SubnetPrototype)

    The subnet prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
# File 'lib/ibm_vpc/vpc_v1.rb', line 15495

def create_subnet(subnet_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("subnet_prototype must be provided") if subnet_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_subnet")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = subnet_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/subnets"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_subnet_reserved_ip(subnet_id:, address: nil, auto_delete: nil, name: nil, target: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Reserve an IP in a subnet. This request reserves an IP address in a subnet. If the provided prototype object

includes an `address`, the address must not already be reserved.

Parameters:

  • subnet_id (String)

    The subnet identifier.

  • address (String) (defaults to: nil)

    The IP address to reserve, which must not already be reserved on the subnet.

    If unspecified, an available address on the subnet will automatically be selected.

  • auto_delete (Boolean) (defaults to: nil)

    Indicates whether this reserved IP member will be automatically deleted when either ‘target` is deleted, or the reserved IP is unbound. Must be `false` if the reserved IP is unbound.

  • name (String) (defaults to: nil)

    The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with ‘ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • target (ReservedIPTargetPrototype) (defaults to: nil)

    The target to bind this reserved IP to. The target must be in the same VPC.

    The following targets are supported:

    • An endpoint gateway not already bound to a reserved IP in the subnet’s zone.

    • A virtual network interface.

    If unspecified, the reserved IP will be created unbound.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
# File 'lib/ibm_vpc/vpc_v1.rb', line 16009

def create_subnet_reserved_ip(subnet_id:, address: nil, auto_delete: nil, name: nil, target: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("subnet_id must be provided") if subnet_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_subnet_reserved_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "address" => address,
    "auto_delete" => auto_delete,
    "name" => name,
    "target" => target
  }

  method_url = "/subnets/%s/reserved_ips" % [ERB::Util.url_encode(subnet_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_virtual_network_interface(allow_ip_spoofing: nil, auto_delete: nil, enable_infrastructure_nat: nil, ips: nil, name: nil, primary_ip: nil, protocol_state_filtering_mode: nil, resource_group: nil, security_groups: nil, subnet: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a virtual network interface. This request creates a new virtual network interface from a virtual network

interface prototype object. The prototype object is structured in the same way as
a retrieved virtual network interface, and contains the information necessary to
create the new virtual network interface.

Parameters:

  • allow_ip_spoofing (Boolean) (defaults to: nil)

    Indicates whether source IP spoofing is allowed on this interface. If ‘false`, source IP spoofing is prevented on this interface. If `true`, source IP spoofing is allowed on this interface.

  • auto_delete (Boolean) (defaults to: nil)

    Indicates whether this virtual network interface will be automatically deleted when ‘target` is deleted. Must be `false` if the virtual network interface is unbound.

  • enable_infrastructure_nat (Boolean) (defaults to: nil)

    If ‘true`:

    • The VPC infrastructure performs any needed NAT operations.

    • ‘floating_ips` must not have more than one floating IP.

    If ‘false`:

    • Packets are passed unchanged to/from the virtual network interface, allowing the workload to perform any needed NAT operations.

    • ‘allow_ip_spoofing` must be `false`.

    • Can only be attached to a ‘target` with a `resource_type` of `bare_metal_server_network_attachment`.

  • ips (Array[VirtualNetworkInterfaceIPPrototype]) (defaults to: nil)

    The additional IP addresses to bind to the virtual network interface. Each item may be either a reserved IP identity, or a reserved IP prototype object which will be used to create a new reserved IP. All IP addresses must be in the primary IP’s subnet.

    If reserved IP identities are provided, the specified reserved IPs must be unbound.

    If reserved IP prototype objects with addresses are provided, the addresses must be available on the virtual network interface’s subnet. For any prototype objects that do not specify an address, an available address on the subnet will be automatically selected and reserved.

  • name (String) (defaults to: nil)

    The name for this virtual network interface. The name must not be used by another virtual network interface in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words. Names beginning with ‘ibm-` are reserved for provider-owned resources, and are not allowed.

  • primary_ip (VirtualNetworkInterfacePrimaryIPPrototype) (defaults to: nil)

    The primary IP address to bind to the virtual network interface. May be either a reserved IP identity, or a reserved IP prototype object which will be used to create a new reserved IP.

    If a reserved IP identity is provided, the specified reserved IP must be unbound.

    If a reserved IP prototype object with an address is provided, the address must be available on the virtual network interface’s subnet. If no address is specified, an available address on the subnet will be automatically selected and reserved.

  • protocol_state_filtering_mode (String) (defaults to: nil)

    The protocol state filtering mode to use for this virtual network interface. If ‘auto`, protocol state packet filtering is enabled or disabled based on the virtual network interface’s ‘target` resource type:

    • ‘bare_metal_server_network_attachment`: disabled

    • ‘instance_network_attachment`: enabled

    • ‘share_mount_target`: enabled

    Protocol state filtering monitors each network connection flowing over this virtual network interface, and drops any packets that are invalid based on the current connection state and protocol. See [Protocol state filtering mode](cloud.ibm.com/docs/vpc?topic=vpc-vni-about#protocol-state-filtering) for more information.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • security_groups (Array[SecurityGroupIdentity]) (defaults to: nil)

    The security groups to use for this virtual network interface. If unspecified, the default security group of the VPC for the subnet is used.

  • subnet (SubnetIdentity) (defaults to: nil)

    The associated subnet. Required if ‘primary_ip` does not specify a reserved IP identity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
# File 'lib/ibm_vpc/vpc_v1.rb', line 16296

def create_virtual_network_interface(allow_ip_spoofing: nil, auto_delete: nil, enable_infrastructure_nat: nil, ips: nil, name: nil, primary_ip: nil, protocol_state_filtering_mode: nil, resource_group: nil, security_groups: nil, subnet: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_virtual_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "allow_ip_spoofing" => allow_ip_spoofing,
    "auto_delete" => auto_delete,
    "enable_infrastructure_nat" => enable_infrastructure_nat,
    "ips" => ips,
    "name" => name,
    "primary_ip" => primary_ip,
    "protocol_state_filtering_mode" => protocol_state_filtering_mode,
    "resource_group" => resource_group,
    "security_groups" => security_groups,
    "subnet" => subnet
  }

  method_url = "/virtual_network_interfaces"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_volume(volume_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a volume. This request creates a new volume from a volume prototype object. The prototype

object is structured in the same way as a retrieved volume, and contains the
information necessary to create the new volume.

Parameters:

  • volume_prototype (VolumePrototype)

    The volume prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
# File 'lib/ibm_vpc/vpc_v1.rb', line 16965

def create_volume(volume_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("volume_prototype must be provided") if volume_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_volume")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = volume_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/volumes"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_volume_job(volume_id:, volume_job_prototype:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a job for a volume. This request creates and queues a new job for the volume specified in the URL

using the volume job prototype object.

Parameters:

  • volume_id (String)

    The volume identifier.

  • volume_job_prototype (VolumeJobPrototype)

    The volume job prototype object.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
# File 'lib/ibm_vpc/vpc_v1.rb', line 17219

def create_volume_job(volume_id:, volume_job_prototype:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("volume_id must be provided") if volume_id.nil?

  raise ArgumentError.new("volume_job_prototype must be provided") if volume_job_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_volume_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  data = volume_job_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/volumes/%s/jobs" % [ERB::Util.url_encode(volume_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_vpc(address_prefix_management: nil, classic_access: nil, dns: nil, name: nil, resource_group: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a VPC. This request creates a new VPC from a VPC prototype object. The prototype object

is structured in the same way as a retrieved VPC, and contains the information
necessary to create the new VPC.

The system will automatically create the following additional resources for the
VPC:
- Unless `address_prefix_management` is `manual`, a [default address
  prefix](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-address-prefix) for
each zone
- A [default network
  ACL](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-network-acl)
- A [default routing
  table](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-routing-table)
- A [default security
  group](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-security-group).

Parameters:

  • address_prefix_management (String) (defaults to: nil)

    Indicates whether a [default address prefix](cloud.ibm.com/docs/vpc?topic=vpc-configuring-address-prefixes) will be automatically created for each zone in this VPC. If ‘manual`, this VPC will be created with no default address prefixes.

    Since address prefixes are managed identically regardless of whether they were automatically created, the value is not preserved as a VPC property.

  • classic_access (Boolean) (defaults to: nil)

    Indicates whether this VPC will be connected to Classic Infrastructure. If true, this VPC’s resources will have private network connectivity to the account’s Classic Infrastructure resources. Only one VPC, per region, may be connected in this way. This value is set at creation and subsequently immutable.

    Setting this property to ‘true` is supported only for accounts that have been [granted approval](cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure). Instead, use a [Transit Gateway](cloud.ibm.com/docs/transit-gateway) to connect this VPC to Classic Infrastructure.

  • dns (VPCDNSPrototype) (defaults to: nil)

    The DNS configuration for this VPC.

    If unspecified, the system will assign DNS servers capable of resolving hosts and endpoint gateways within this VPC, and hosts on the internet.

  • name (String) (defaults to: nil)

    The name for this VPC. The name must not be used by another VPC in the region. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
# File 'lib/ibm_vpc/vpc_v1.rb', line 17512

def create_vpc(address_prefix_management: nil, classic_access: nil, dns: nil, name: nil, resource_group: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpc")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "address_prefix_management" => address_prefix_management,
    "classic_access" => classic_access,
    "dns" => dns,
    "name" => name,
    "resource_group" => resource_group
  }

  method_url = "/vpcs"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_vpc_address_prefix(vpc_id:, cidr:, zone:, is_default: nil, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create an address prefix for a VPC. This request creates a new prefix from a prefix prototype object. The prototype

object is structured in the same way as a retrieved prefix, and contains the
information necessary to create the new prefix.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • cidr (String)

    The IPv4 range of the address prefix, expressed in CIDR format. The range must not overlap with any existing address prefixes in the VPC or any of the following reserved address ranges:

    - `127.0.0.0/8` (IPv4 loopback addresses)
    - `161.26.0.0/16` (IBM services)
    - `166.8.0.0/14` (Cloud Service Endpoints)
    - `169.254.0.0/16` (IPv4 link-local addresses)
    - `224.0.0.0/4` (IPv4 multicast addresses)
    

    The prefix length of the address prefix’s CIDR must be between ‘/9` (8,388,608 addresses) and `/29` (8 addresses).

  • zone (ZoneIdentity)

    The zone this address prefix will reside in.

  • is_default (Boolean) (defaults to: nil)

    Indicates whether this will be the default address prefix for this zone in this VPC. If ‘true`, the VPC must not have a default address prefix for this zone.

  • name (String) (defaults to: nil)

    The name for this address prefix. The name must not be used by another address prefix for the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
# File 'lib/ibm_vpc/vpc_v1.rb', line 17855

def create_vpc_address_prefix(vpc_id:, cidr:, zone:, is_default: nil, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  raise ArgumentError.new("zone must be provided") if zone.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpc_address_prefix")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "cidr" => cidr,
    "zone" => zone,
    "is_default" => is_default,
    "name" => name
  }

  method_url = "/vpcs/%s/address_prefixes" % [ERB::Util.url_encode(vpc_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_vpc_dns_resolution_binding(vpc_id:, vpc:, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a DNS resolution binding. This request creates a new DNS resolution binding from a DNS resolution binding

prototype object. The prototype object is structured in the same way as a
retrieved DNS resolution binding, and contains the information necessary to create
the new DNS resolution binding.

For this request to succeed:
- The VPC specified by the identifier in the URL must not already have a DNS
resolution
  binding
- The VPC specified by the identifier in the URL must have `dns.enable_hub` set to
 `false`
- The updated DNS sharing connected topology must not contain more than one
endpoint
  gateway with `dns_resolution_binding_mode` set to `primary` targeting the same
service.

Additionally, if the VPC specified by the identifier in the URL has endpoint
gateways that have `dns_resolution_binding_mode` set to `per_resource_binding`,
then those endpoint gateways will participate in [DNS
sharing](/docs/vpc?topic=vpc-vpe-dns-sharing) with all VPCs in the connected
topology. If this VPC contains an endpoint gateway targeting a service that has
resource binding enabled, then for this request to succeed:
- The VPC in the topology with `dns.enable_hub` set to `true` must have an
endpoint
  gateway with the same `target` as the endpoint gateway in this VPC, and with
  `dns_resolution_binding_mode` set to `primary`.
- No other VPC in the topology can have an endpoint gateway with a resource
binding
  using the same `service_endpoint` as a resource binding for the endpoint gateway
in
  this VPC.

See [About DNS sharing for VPE gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) for
more information.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • vpc (VPCIdentity)

    The VPC to bind this VPC to for DNS resolution. The VPC must be different from the VPC specified in the URL, must have ‘dns.enable_hub` set to `true`, and may be in a different account (subject to IAM policies).

    Additionally, the VPC specified in the URL (this VPC) must have ‘dns.enable_hub` set to `false` and a `dns.resolution_binding_count` of zero.

  • name (String) (defaults to: nil)

    The name for this DNS resolution binding. The name must not be used by another DNS resolution binding for the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
# File 'lib/ibm_vpc/vpc_v1.rb', line 18143

def create_vpc_dns_resolution_binding(vpc_id:, vpc:, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("vpc must be provided") if vpc.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpc_dns_resolution_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "vpc" => vpc,
    "name" => name
  }

  method_url = "/vpcs/%s/dns_resolution_bindings" % [ERB::Util.url_encode(vpc_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_vpc_route(vpc_id:, destination:, zone:, action: nil, advertise: nil, name: nil, next_hop: nil, priority: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a route in a VPC’s default routing table. This request creates a new route in the VPC’s default routing table. The route

prototype object is structured in the same way as a retrieved route, and contains
the information necessary to create the new route. The request will fail if the
new route will cause a loop.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • destination (String)

    The destination CIDR of the route. The host identifier in the CIDR must be zero.

    At most two routes per ‘zone` in a table can have the same `destination` and `priority`, and only if both routes have an `action` of `deliver` and the `next_hop` is an IP address.

  • zone (ZoneIdentity)

    The zone to apply the route to.

    If subnets are attached to the route’s routing table, egress traffic from those subnets in this zone will be subject to this route. If this route’s routing table has any of ‘route_direct_link_ingress`, `route_internet_ingress`, `route_transit_gateway_ingress` or `route_vpc_zone_ingress` set to`true`, traffic from those ingress sources arriving in this zone will be subject to this route.

  • action (String) (defaults to: nil)

    The action to perform with a packet matching the route:

    • ‘delegate`: delegate to system-provided routes

    • ‘delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound

    routes

    • ‘deliver`: deliver the packet to the specified `next_hop`

    • ‘drop`: drop the packet.

  • advertise (Boolean) (defaults to: nil)

    Indicates whether this route will be advertised to the ingress sources specified by the ‘advertise_routes_to` routing table property.

    All routes in a routing table with the same ‘destination` and `zone` must have the same `advertise` value.

  • name (String) (defaults to: nil)

    The name for this route. The name must not be used by another route in the routing table. Names starting with ‘ibm-` are reserved for system-provided routes, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • next_hop (RouteNextHopPrototype) (defaults to: nil)

    If ‘action` is `deliver`, the next hop that packets will be delivered to (must not be `0.0.0.0`). For other `action` values, it must be omitted or specified as `0.0.0.0`.

    At most two routes per ‘zone` in a table can have the same `destination` and `priority`, and only when each route has an `action` of `deliver` and `next_hop` is an IP address.

  • priority (Fixnum) (defaults to: nil)

    The priority of this route. Smaller values have higher priority.

    If a routing table contains multiple routes with the same ‘zone` and `destination`, the route with the highest priority (smallest value) is selected. If two routes have the same `destination` and `priority`, traffic is distributed between them.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
# File 'lib/ibm_vpc/vpc_v1.rb', line 18407

def create_vpc_route(vpc_id:, destination:, zone:, action: nil, advertise: nil, name: nil, next_hop: nil, priority: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("destination must be provided") if destination.nil?

  raise ArgumentError.new("zone must be provided") if zone.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpc_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "destination" => destination,
    "zone" => zone,
    "action" => action,
    "advertise" => advertise,
    "name" => name,
    "next_hop" => next_hop,
    "priority" => priority
  }

  method_url = "/vpcs/%s/routes" % [ERB::Util.url_encode(vpc_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_vpc_routing_table(vpc_id:, accept_routes_from: nil, advertise_routes_to: nil, name: nil, route_direct_link_ingress: nil, route_internet_ingress: nil, route_transit_gateway_ingress: nil, route_vpc_zone_ingress: nil, routes: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a routing table for a VPC. This request creates a routing table from a routing table prototype object. The

prototype object is structured in the same way as a retrieved routing table, and
contains the information necessary to create the new routing table.

At present, the routing table's `resource_group` will be inherited from its VPC,
but may be specifiable in the future.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • accept_routes_from (Array[ResourceFilter]) (defaults to: nil)

    The filters specifying the resources that may create routes in this routing table.

    If specified, ‘resource_type` must be `vpn_gateway` or `vpn_server`.

  • advertise_routes_to (Array[String]) (defaults to: nil)

    The ingress sources to advertise routes to. Routes in the table with ‘advertise` enabled will be advertised to these sources.

  • name (String) (defaults to: nil)

    The name for this routing table. The name must not be used by another routing table in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • route_direct_link_ingress (Boolean) (defaults to: nil)

    If set to ‘true`, this routing table will be used to route traffic that originates from [Direct Link](cloud.ibm.com/docs/dl) to this VPC. The VPC must not already have a routing table with this property set to `true`.

    Incoming traffic will be routed according to the routing table with one exception: routes with an ‘action` of `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route’s ‘zone` that is able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway connection, the packet will be dropped.

    If [Classic Access](cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is enabled for this VPC, and this property is set to ‘true`, its incoming traffic will also be routed according to this routing table.

  • route_internet_ingress (Boolean) (defaults to: nil)

    If set to ‘true`, this routing table will be used to route traffic that originates from the internet. For this to succeed, the VPC must not already have a routing table with this property set to `true`.

    Incoming traffic will be routed according to the routing table with two exceptions:

    • Traffic destined for IP addresses associated with public gateways will not be subject to routes in this routing table.

    • Routes with an ‘action` of `deliver` are treated as `drop` unless the `next_hop`

    is

    an IP address in a subnet in the route's `zone` that is able to accept traffic.
    Therefore, if an incoming packet matches a route with a `next_hop` of a VPN
    

    gateway

    connection, the packet will be dropped.
    
  • route_transit_gateway_ingress (Boolean) (defaults to: nil)

    If set to ‘true`, this routing table will be used to route traffic that originates from [Transit Gateway](cloud.ibm.com/docs/transit-gateway) to this VPC. The VPC must not already have a routing table with this property set to `true`.

    Incoming traffic will be routed according to the routing table with one exception: routes with an ‘action` of `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route’s ‘zone` that is able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway connection, the packet will be dropped.

  • route_vpc_zone_ingress (Boolean) (defaults to: nil)

    If set to ‘true`, this routing table will be used to route traffic that originates from subnets in other zones in this VPC. The VPC must not already have a routing table with this property set to `true`.

    Incoming traffic will be routed according to the routing table with one exception: routes with an ‘action` of `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route’s ‘zone` that is able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway connection, the packet will be dropped.

  • routes (Array[RoutePrototype]) (defaults to: nil)

    The prototype objects for routes to create for this routing table. If unspecified, the routing table will be created with no routes.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
# File 'lib/ibm_vpc/vpc_v1.rb', line 18687

def create_vpc_routing_table(vpc_id:, accept_routes_from: nil, advertise_routes_to: nil, name: nil, route_direct_link_ingress: nil, route_internet_ingress: nil, route_transit_gateway_ingress: nil, route_vpc_zone_ingress: nil, routes: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpc_routing_table")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "accept_routes_from" => accept_routes_from,
    "advertise_routes_to" => advertise_routes_to,
    "name" => name,
    "route_direct_link_ingress" => route_direct_link_ingress,
    "route_internet_ingress" => route_internet_ingress,
    "route_transit_gateway_ingress" => route_transit_gateway_ingress,
    "route_vpc_zone_ingress" => route_vpc_zone_ingress,
    "routes" => routes
  }

  method_url = "/vpcs/%s/routing_tables" % [ERB::Util.url_encode(vpc_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_vpc_routing_table_route(vpc_id:, routing_table_id:, destination:, zone:, action: nil, advertise: nil, name: nil, next_hop: nil, priority: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a route in a VPC routing table. This request creates a new VPC route from a VPC route prototype object. The

prototype object is structured in the same way as a retrieved VPC route and
contains the information necessary to create the route.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • routing_table_id (String)

    The routing table identifier.

  • destination (String)

    The destination CIDR of the route. The host identifier in the CIDR must be zero.

    At most two routes per ‘zone` in a table can have the same `destination` and `priority`, and only if both routes have an `action` of `deliver` and the `next_hop` is an IP address.

  • zone (ZoneIdentity)

    The zone to apply the route to.

    If subnets are attached to the route’s routing table, egress traffic from those subnets in this zone will be subject to this route. If this route’s routing table has any of ‘route_direct_link_ingress`, `route_internet_ingress`, `route_transit_gateway_ingress` or `route_vpc_zone_ingress` set to`true`, traffic from those ingress sources arriving in this zone will be subject to this route.

  • action (String) (defaults to: nil)

    The action to perform with a packet matching the route:

    • ‘delegate`: delegate to system-provided routes

    • ‘delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound

    routes

    • ‘deliver`: deliver the packet to the specified `next_hop`

    • ‘drop`: drop the packet.

  • advertise (Boolean) (defaults to: nil)

    Indicates whether this route will be advertised to the ingress sources specified by the ‘advertise_routes_to` routing table property.

    All routes in a routing table with the same ‘destination` and `zone` must have the same `advertise` value.

  • name (String) (defaults to: nil)

    The name for this route. The name must not be used by another route in the routing table. Names starting with ‘ibm-` are reserved for system-provided routes, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • next_hop (RouteNextHopPrototype) (defaults to: nil)

    If ‘action` is `deliver`, the next hop that packets will be delivered to (must not be `0.0.0.0`). For other `action` values, it must be omitted or specified as `0.0.0.0`.

    At most two routes per ‘zone` in a table can have the same `destination` and `priority`, and only when each route has an `action` of `deliver` and `next_hop` is an IP address.

  • priority (Fixnum) (defaults to: nil)

    The priority of this route. Smaller values have higher priority.

    If a routing table contains multiple routes with the same ‘zone` and `destination`, the route with the highest priority (smallest value) is selected. If two routes have the same `destination` and `priority`, traffic is distributed between them.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
# File 'lib/ibm_vpc/vpc_v1.rb', line 18960

def create_vpc_routing_table_route(vpc_id:, routing_table_id:, destination:, zone:, action: nil, advertise: nil, name: nil, next_hop: nil, priority: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("routing_table_id must be provided") if routing_table_id.nil?

  raise ArgumentError.new("destination must be provided") if destination.nil?

  raise ArgumentError.new("zone must be provided") if zone.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpc_routing_table_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "destination" => destination,
    "zone" => zone,
    "action" => action,
    "advertise" => advertise,
    "name" => name,
    "next_hop" => next_hop,
    "priority" => priority
  }

  method_url = "/vpcs/%s/routing_tables/%s/routes" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(routing_table_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_vpn_gateway(vpn_gateway_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a VPN gateway. This request creates a new VPN gateway.

Parameters:

  • vpn_gateway_prototype (VPNGatewayPrototype)

    The VPN gateway prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
# File 'lib/ibm_vpc/vpc_v1.rb', line 19707

def create_vpn_gateway(vpn_gateway_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_prototype must be provided") if vpn_gateway_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpn_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = vpn_gateway_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/vpn_gateways"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_vpn_gateway_connection(vpn_gateway_id:, vpn_gateway_connection_prototype:) ⇒ IBMCloudSdkCore::DetailedResponse

Create a connection for a VPN gateway. This request creates a new VPN gateway connection.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • vpn_gateway_connection_prototype (VPNGatewayConnectionPrototype)

    The VPN gateway connection prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
# File 'lib/ibm_vpc/vpc_v1.rb', line 20065

def create_vpn_gateway_connection(vpn_gateway_id:, vpn_gateway_connection_prototype:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("vpn_gateway_connection_prototype must be provided") if vpn_gateway_connection_prototype.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpn_gateway_connection")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = vpn_gateway_connection_prototype
  headers["Content-Type"] = "application/json"

  method_url = "/vpn_gateways/%s/connections" % [ERB::Util.url_encode(vpn_gateway_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#create_vpn_server(certificate:, client_authentication:, client_ip_pool:, subnets:, client_dns_server_ips: nil, client_idle_timeout: nil, enable_split_tunneling: nil, name: nil, port: nil, protocol: nil, resource_group: nil, security_groups: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a VPN server. This request creates a new VPN server.

Parameters:

  • certificate (CertificateInstanceIdentity)

    The certificate instance for this VPN server.

  • client_authentication (Array[VPNServerAuthenticationPrototype])

    The methods used to authenticate VPN clients to this VPN server. VPN clients must authenticate against all specified methods.

  • client_ip_pool (String)

    The VPN client IPv4 address pool, expressed in CIDR format. The request must not overlap with any existing address prefixes in the VPC or any of the following reserved address ranges:

    - `127.0.0.0/8` (IPv4 loopback addresses)
    - `161.26.0.0/16` (IBM services)
    - `166.8.0.0/14` (Cloud Service Endpoints)
    - `169.254.0.0/16` (IPv4 link-local addresses)
    - `224.0.0.0/4` (IPv4 multicast addresses)
    

    The prefix length of the client IP address pool’s CIDR must be between ‘/9` (8,388,608 addresses) and `/22` (1024 addresses). A CIDR block that contains twice the number of IP addresses that are required to enable the maximum number of concurrent connections is recommended.

  • subnets (Array[SubnetIdentity])

    The subnets to provision this VPN server in. Use subnets in different zones for high availability.

  • client_dns_server_ips (Array[IP]) (defaults to: nil)

    The DNS server addresses that will be provided to VPN clients connected to this VPN server.

  • client_idle_timeout (Fixnum) (defaults to: nil)

    The seconds a VPN client can be idle before this VPN server will disconnect it. Specify ‘0` to prevent the server from disconnecting idle clients.

  • enable_split_tunneling (Boolean) (defaults to: nil)

    Indicates whether the split tunneling is enabled on this VPN server.

  • name (String) (defaults to: nil)

    The name for this VPN server. The name must not be used by another VPN server in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.

  • port (Fixnum) (defaults to: nil)

    The port number to use for this VPN server.

  • protocol (String) (defaults to: nil)

    The transport protocol to use for this VPN server.

  • resource_group (ResourceGroupIdentity) (defaults to: nil)

    The resource group to use. If unspecified, the account’s [default resource group](cloud.ibm.com/apidocs/resource-manager#introduction) will be used.

  • security_groups (Array[SecurityGroupIdentity]) (defaults to: nil)

    The security groups to use for this VPN server. If unspecified, the VPC’s default security group is used.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
# File 'lib/ibm_vpc/vpc_v1.rb', line 20744

def create_vpn_server(certificate:, client_authentication:, client_ip_pool:, subnets:, client_dns_server_ips: nil, client_idle_timeout: nil, enable_split_tunneling: nil, name: nil, port: nil, protocol: nil, resource_group: nil, security_groups: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("certificate must be provided") if certificate.nil?

  raise ArgumentError.new("client_authentication must be provided") if client_authentication.nil?

  raise ArgumentError.new("client_ip_pool must be provided") if client_ip_pool.nil?

  raise ArgumentError.new("subnets must be provided") if subnets.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpn_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "certificate" => certificate,
    "client_authentication" => client_authentication,
    "client_ip_pool" => client_ip_pool,
    "subnets" => subnets,
    "client_dns_server_ips" => client_dns_server_ips,
    "client_idle_timeout" => client_idle_timeout,
    "enable_split_tunneling" => enable_split_tunneling,
    "name" => name,
    "port" => port,
    "protocol" => protocol,
    "resource_group" => resource_group,
    "security_groups" => security_groups
  }

  method_url = "/vpn_servers"

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#create_vpn_server_route(vpn_server_id:, destination:, action: nil, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Create a VPN route for a VPN server. This request creates a new VPN route in the VPN server. All VPN routes are

provided to the VPN client when the connection is established. Packets received
from the VPN client will be dropped by the VPN server if there is no VPN route
matching their specified destinations. All VPN routes must be unique within the
VPN server.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • destination (String)

    The destination to use for this VPN route in the VPN server. Must be unique within the VPN server. If an incoming packet does not match any destination, it will be dropped.

  • action (String) (defaults to: nil)

    The action to perform with a packet matching the VPN route:

    • ‘translate`: translate the source IP address to one of the private IP addresses

    of

    the VPN server, then deliver the packet to target.
    
    • ‘deliver`: deliver the packet to the target.

    • ‘drop`: drop the packet.

  • name (String) (defaults to: nil)

    The name for this VPN server route. The name must not be used by another route for the VPN server. If unspecified, the name will be a hyphenated list of randomly-selected words.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
# File 'lib/ibm_vpc/vpc_v1.rb', line 21185

def create_vpn_server_route(vpn_server_id:, destination:, action: nil, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  raise ArgumentError.new("destination must be provided") if destination.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpn_server_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "destination" => destination,
    "action" => action,
    "name" => name
  }

  method_url = "/vpn_servers/%s/routes" % [ERB::Util.url_encode(vpn_server_id)]

  response = request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#delete_backup_policy(id:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a backup policy. This request deletes a backup policy. This operation cannot be reversed.

If the request is accepted, the backup policy `status` will be set to `deleting`.
Once deletion processing completes, the backup policy will no longer be
retrievable.

Parameters:

  • id (String)

    The backup policy identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'lib/ibm_vpc/vpc_v1.rb', line 524

def delete_backup_policy(id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_backup_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/backup_policies/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_backup_policy_plan(backup_policy_id:, id:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a backup policy plan. This request deletes a backup policy plan. This operation cannot be reversed. Any

backups that have been created by the plan will remain but will no longer be
subject to the plan's deletion trigger. Any running jobs associated with the plan
will run to completion before the plan is deleted.

If the request is accepted, the backup policy plan `status` will be set to
`deleting`. Once deletion processing completes, the backup policy plan will no
longer be retrievable.

Parameters:

  • backup_policy_id (String)

    The backup policy identifier.

  • id (String)

    The backup policy plan identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/ibm_vpc/vpc_v1.rb', line 391

def delete_backup_policy_plan(backup_policy_id:, id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("backup_policy_id must be provided") if backup_policy_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_backup_policy_plan")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/backup_policies/%s/plans/%s" % [ERB::Util.url_encode(backup_policy_id), ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_bare_metal_server(id:) ⇒ nil

Delete a bare metal server. This request deletes a bare metal server. This operation cannot be reversed. Any

floating IPs associated with the bare metal server network interfaces are
implicitly disassociated.

Parameters:

  • id (String)

    The bare metal server identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
# File 'lib/ibm_vpc/vpc_v1.rb', line 1729

def delete_bare_metal_server(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_bare_metal_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_bare_metal_server_network_attachment(bare_metal_server_id:, id:) ⇒ nil

Delete a bare metal server network attachment. This request deletes a bare metal server network attachment. This operation cannot

be reversed. Any floating IPs associated with the bare metal server network
attachment are implicitly disassociated.

The bare metal server's primary network attachment cannot be deleted.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • id (String)

    The bare metal server network attachment identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
# File 'lib/ibm_vpc/vpc_v1.rb', line 1098

def delete_bare_metal_server_network_attachment(bare_metal_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_bare_metal_server_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_attachments/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_bare_metal_server_network_interface(bare_metal_server_id:, id:) ⇒ nil

Delete a bare metal server network interface. This request deletes a bare metal server network interface. This operation cannot

be reversed. Any floating IPs associated with the bare metal server network
interface are implicitly disassociated.  The primary bare metal server network
interface is not allowed to be deleted.

If this bare metal server has network attachments, this network interface is a
[read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface, and is not allowed to be deleted.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • id (String)

    The bare metal server network interface identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
1361
1362
1363
1364
1365
# File 'lib/ibm_vpc/vpc_v1.rb', line 1336

def delete_bare_metal_server_network_interface(bare_metal_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_bare_metal_server_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_interfaces/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_cluster_network(id:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a cluster network. This request deletes a cluster network. This operation cannot be reversed.

For this request to succeed, virtual server instances must not reside in this
cluster network.

Parameters:

  • id (String)

    The cluster network identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
# File 'lib/ibm_vpc/vpc_v1.rb', line 3052

def delete_cluster_network(id:, if_match: nil)
  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_cluster_network")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_networks/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_cluster_network_interface(cluster_network_id:, id:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a cluster network interface. This request deletes a cluster network interface. This operation cannot be

reversed. For this request to succeed,  the cluster network interface must not be
required by another resource, such as a cluster network attachment for a virtual
server instance.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • id (String)

    The cluster network interface identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
# File 'lib/ibm_vpc/vpc_v1.rb', line 2441

def delete_cluster_network_interface(cluster_network_id:, id:, if_match: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_cluster_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_networks/%s/interfaces/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_cluster_network_subnet(cluster_network_id:, id:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a cluster network subnet. This request deletes a cluster network subnet. This operation cannot be reversed.

For this request to succeed, this cluster subnet must not be attached to a cluster
network interface.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • id (String)

    The cluster network subnet identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


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

def delete_cluster_network_subnet(cluster_network_id:, id:, if_match: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_cluster_network_subnet")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_networks/%s/subnets/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a cluster network subnet reserved IP. This request deletes a cluster network subnet reserved IP. This operation cannot

be reversed.

For this request to succeed, the reserved IP must be unbound. A provider-owned
reserved IP is not allowed to be deleted.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • cluster_network_subnet_id (String)

    The cluster network subnet identifier.

  • id (String)

    The cluster network subnet reserved IP identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
# File 'lib/ibm_vpc/vpc_v1.rb', line 2777

def delete_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:, if_match: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_cluster_network_subnet_reserved_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_networks/%s/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id), ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_dedicated_host(id:) ⇒ nil

Delete a dedicated host. This request deletes a dedicated host. This operation cannot be reversed. For this

request to succeed, `instances` must be empty and `instance_placement_enabled`
must be `false`.

Parameters:

  • id (String)

    The dedicated host identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
# File 'lib/ibm_vpc/vpc_v1.rb', line 3679

def delete_dedicated_host(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_dedicated_host")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_dedicated_host_group(id:) ⇒ nil

Delete a dedicated host group. This request deletes a dedicated host group.

Parameters:

  • id (String)

    The dedicated host group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
# File 'lib/ibm_vpc/vpc_v1.rb', line 3276

def delete_dedicated_host_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_dedicated_host_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/dedicated_host/groups/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_endpoint_gateway(id:) ⇒ nil

Delete an endpoint gateway. This request deletes an endpoint gateway. This operation cannot be reversed.

Reserved IPs that were bound to the endpoint gateway will be released if their
`auto_delete` property is set to true.

If the VPC this endpoint gateway resides in has `dns.enable_hub` set to `true`,
then no other VPC in the [DNS sharing](/docs/vpc?topic=vpc-vpe-dns-sharing)
topology must contain an endpoint gateway with the same `target` service as this
endpoint gateway.

Parameters:

  • id (String)

    The endpoint gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
# File 'lib/ibm_vpc/vpc_v1.rb', line 4379

def delete_endpoint_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_endpoint_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_endpoint_gateway_resource_binding(endpoint_gateway_id:, id:) ⇒ nil

Delete a resource binding from an endpoint gateway. This request deletes the specified resource binding from the specified endpoint

gateway. This operation cannot be reversed.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • id (String)

    The resource binding identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
# File 'lib/ibm_vpc/vpc_v1.rb', line 4247

def delete_endpoint_gateway_resource_binding(endpoint_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_endpoint_gateway_resource_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/endpoint_gateways/%s/resource_bindings/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_floating_ip(id:) ⇒ nil

Delete a floating IP. This request disassociates (if associated) and releases a floating IP. This

operation cannot be reversed. For this request to succeed, the floating IP must
not be required by another resource, such as a public gateway.

Parameters:

  • id (String)

    The floating IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
# File 'lib/ibm_vpc/vpc_v1.rb', line 4597

def delete_floating_ip(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_flow_log_collector(id:) ⇒ nil

Delete a flow log collector. This request stops and deletes a flow log collector. This operation cannot be

reversed.

Collected flow logs remain available within the flow log collector's Cloud Object
Storage bucket.

Parameters:

  • id (String)

    The flow log collector identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
# File 'lib/ibm_vpc/vpc_v1.rb', line 4852

def delete_flow_log_collector(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_flow_log_collector")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_ike_policy(id:) ⇒ nil

Delete an IKE policy. This request deletes an IKE policy. This operation cannot be reversed. For this

request to succeed, there must not be any VPN gateway connections using this
policy.

Parameters:

  • id (String)

    The IKE policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
# File 'lib/ibm_vpc/vpc_v1.rb', line 19249

def delete_ike_policy(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_ike_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/ike_policies/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_image(id:) ⇒ nil

Delete an image. This request deletes an image. Any active image export jobs will be completed

first. This operation cannot be reversed. An image with `remote.account` set is
not allowed to be deleted. Additionally, an image cannot be deleted if it:
- has a `status` of `deleting`
- has a `status` of `pending` with a `status_reasons` code of
  `image_request_in_progress`
- has `catalog_offering.managed` set to `true`.

Parameters:

  • id (String)

    The image identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
# File 'lib/ibm_vpc/vpc_v1.rb', line 5233

def delete_image(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_image")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/images/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_image_export_job(image_id:, id:) ⇒ nil

Delete an image export job. This request deletes an image export job. This operation cannot be reversed. If

the job has not completed, the job will be canceled, and the incomplete exported
image object deleted. If the job has completed, the exported image object will not
be deleted.

Parameters:

  • image_id (String)

    The image identifier.

  • id (String)

    The image export job identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
# File 'lib/ibm_vpc/vpc_v1.rb', line 5629

def delete_image_export_job(image_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("image_id must be provided") if image_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_image_export_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/images/%s/export_jobs/%s" % [ERB::Util.url_encode(image_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance(id:, if_match: nil) ⇒ nil

Delete an instance. This request deletes an instance. This operation cannot be reversed. Any floating

IPs associated with instance network interfaces are implicitly disassociated. All
virtual network interfaces with `auto_delete` set to `true` targeting instance
network attachments on the instance are automatically deleted. All flow log
collectors with
`auto_delete` set to `true` targeting the instance, the instance network
attachments, the instance network interfaces, or the automatically deleted virtual
network interfaces are automatically deleted.

Parameters:

  • id (String)

    The virtual server instance identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
# File 'lib/ibm_vpc/vpc_v1.rb', line 7360

def delete_instance(id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_cluster_network_attachment(instance_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Delete an instance cluster network attachment. This request deletes an instance cluster network attachment. The instance must be

in a
`stopped` or `stopping` state to delete an instance cluster network attachment.

This operation cannot be reversed.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance cluster network attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
# File 'lib/ibm_vpc/vpc_v1.rb', line 7683

def delete_instance_cluster_network_attachment(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_cluster_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/cluster_network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_instance_group(id:) ⇒ nil

Delete an instance group. This request deletes an instance group. This operation cannot be reversed. Any

instances associated with the group will be deleted.

Parameters:

  • id (String)

    The instance group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
# File 'lib/ibm_vpc/vpc_v1.rb', line 5942

def delete_instance_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_group_load_balancer(instance_group_id:) ⇒ nil

Delete an instance group load balancer. This request unbinds the instance group from the load balancer pool, and deletes

the load balancer pool members.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
# File 'lib/ibm_vpc/vpc_v1.rb', line 6057

def delete_instance_group_load_balancer(instance_group_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_load_balancer")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/load_balancer" % [ERB::Util.url_encode(instance_group_id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_group_manager(instance_group_id:, id:) ⇒ nil

Delete an instance group manager. This request deletes an instance group manager. This operation cannot be reversed.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • id (String)

    The instance group manager identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
# File 'lib/ibm_vpc/vpc_v1.rb', line 6174

def delete_instance_group_manager(instance_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_manager")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/managers/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:) ⇒ nil

Delete specified instance group manager action. This request deletes an instance group manager action. This operation cannot be

reversed.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • id (String)

    The instance group manager action identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
# File 'lib/ibm_vpc/vpc_v1.rb', line 6386

def delete_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_manager_action")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/managers/%s/actions/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:) ⇒ nil

Delete an instance group manager policy. This request deletes an instance group manager policy. This operation cannot be

reversed.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • id (String)

    The instance group manager policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
# File 'lib/ibm_vpc/vpc_v1.rb', line 6605

def delete_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_manager_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/managers/%s/policies/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_group_membership(instance_group_id:, id:) ⇒ nil

Delete an instance group membership. This request deletes a memberships of an instance group. This operation cannot be

reversed. reversed. If the membership has `delete_instance_on_membership_delete`
set to `true`, the instance will also be deleted.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • id (String)

    The instance group membership identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
# File 'lib/ibm_vpc/vpc_v1.rb', line 6813

def delete_instance_group_membership(instance_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_membership")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/memberships/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_group_memberships(instance_group_id:) ⇒ nil

Delete memberships from an instance group. This request deletes memberships of an instance group. This operation cannot be

reversed. Memberships that have `delete_instance_on_membership_delete` set to
`true` will also have their instances deleted.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
# File 'lib/ibm_vpc/vpc_v1.rb', line 6736

def delete_instance_group_memberships(instance_group_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_group_memberships")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/memberships" % [ERB::Util.url_encode(instance_group_id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_network_attachment(instance_id:, id:) ⇒ nil

Delete an instance network attachment. This request deletes an instance network attachment. This operation cannot be

reversed. Any floating IPs associated with the instance network attachment are
implicitly disassociated. All flow log collectors with `auto_delete` set to `true`
targeting the instance network attachment are automatically deleted. The primary
instance network attachment is not allowed to be deleted.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance network attachment identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
# File 'lib/ibm_vpc/vpc_v1.rb', line 8084

def delete_instance_network_attachment(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_network_interface(instance_id:, id:) ⇒ nil

Delete an instance network interface. This request deletes an instance network interface. This operation cannot be

reversed. Any floating IPs associated with the instance network interface are
implicitly disassociated. All flow log collectors with `auto_delete` set to `true`
targeting the instance network interface are automatically deleted. The primary
instance network interface is not allowed to be deleted.

If this instance has network attachments, this network interface is a [read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface, and is not allowed to be deleted.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance network interface identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
# File 'lib/ibm_vpc/vpc_v1.rb', line 8342

def delete_instance_network_interface(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_interfaces/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_template(id:) ⇒ nil

Delete an instance template. This request deletes the instance template. This operation cannot be reversed.

Parameters:

  • id (String)

    The instance template identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
# File 'lib/ibm_vpc/vpc_v1.rb', line 7015

def delete_instance_template(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_template")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance/templates/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_instance_volume_attachment(instance_id:, id:) ⇒ nil

Delete a volume attachment. This request deletes a volume attachment. This operation cannot be reversed, but a

new volume attachment may subsequently be created for the volume.  For this
request to succeed, the volume must not be busy.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The volume attachment identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
# File 'lib/ibm_vpc/vpc_v1.rb', line 8825

def delete_instance_volume_attachment(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_volume_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/volume_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_ipsec_policy(id:) ⇒ nil

Delete an IPsec policy. This request deletes an IPsec policy. This operation cannot be reversed. For this

request to succeed, there must not be any VPN gateway connections using this
policy.

Parameters:

  • id (String)

    The IPsec policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
# File 'lib/ibm_vpc/vpc_v1.rb', line 19507

def delete_ipsec_policy(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_ipsec_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_key(id:) ⇒ nil

Delete a key. This request deletes a key. This operation cannot be reversed.

Parameters:

  • id (String)

    The key identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
# File 'lib/ibm_vpc/vpc_v1.rb', line 9050

def delete_key(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_key")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/keys/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_load_balancer(id:, if_match: nil) ⇒ nil

Delete a load balancer. This request deletes a load balancer. This operation cannot be reversed. A load

balancer cannot be deleted if its `provisioning_status` is `delete_pending` or it
is referenced by a resource.

Parameters:

  • id (String)

    The load balancer identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
# File 'lib/ibm_vpc/vpc_v1.rb', line 9381

def delete_load_balancer(id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_load_balancer_listener(load_balancer_id:, id:) ⇒ nil

Delete a load balancer listener. This request deletes a load balancer listener. This operation cannot be reversed.

For this operation to succeed, the listener must not be the target of another load
balancer listener.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • id (String)

    The listener identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
# File 'lib/ibm_vpc/vpc_v1.rb', line 9717

def delete_load_balancer_listener(load_balancer_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_listener")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) ⇒ nil

Delete a load balancer listener policy. Deletes a policy of the load balancer listener. This operation cannot be reversed.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • id (String)

    The policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
# File 'lib/ibm_vpc/vpc_v1.rb', line 9962

def delete_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_listener_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners/%s/policies/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:) ⇒ nil

Delete a load balancer listener policy rule. Deletes a rule from the load balancer listener policy. This operation cannot be

reversed.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • policy_id (String)

    The policy identifier.

  • id (String)

    The rule identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
# File 'lib/ibm_vpc/vpc_v1.rb', line 10213

def delete_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("policy_id must be provided") if policy_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_listener_policy_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners/%s/policies/%s/rules/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id), ERB::Util.url_encode(policy_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_load_balancer_pool(load_balancer_id:, id:) ⇒ nil

Delete a load balancer pool. This request deletes a load balancer pool. This operation cannot be reversed. The

pool must not currently be the default pool for any listener in the load balancer,
nor be the target pool in the failsafe policy for any other pool.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • id (String)

    The pool identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
# File 'lib/ibm_vpc/vpc_v1.rb', line 10483

def delete_load_balancer_pool(load_balancer_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_pool")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/pools/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) ⇒ nil

Delete a load balancer pool member. This request deletes a member from the pool. This operation cannot be reversed.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • pool_id (String)

    The pool identifier.

  • id (String)

    The member identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
# File 'lib/ibm_vpc/vpc_v1.rb', line 10770

def delete_load_balancer_pool_member(load_balancer_id:, pool_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("pool_id must be provided") if pool_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_pool_member")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/pools/%s/members/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(pool_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_network_acl(id:) ⇒ nil

Delete a network ACL. This request deletes a network ACL. This operation cannot be reversed. For this

request to succeed, the network ACL must not be the default network ACL for any
VPCs, and the network ACL must not be attached to any subnets.

Parameters:

  • id (String)

    The network ACL identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
# File 'lib/ibm_vpc/vpc_v1.rb', line 10988

def delete_network_acl(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_network_acl")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_network_acl_rule(network_acl_id:, id:) ⇒ nil

Delete a network ACL rule. This request deletes a rule. This operation cannot be reversed.

Parameters:

  • network_acl_id (String)

    The network ACL identifier.

  • id (String)

    The rule identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
# File 'lib/ibm_vpc/vpc_v1.rb', line 11190

def delete_network_acl_rule(network_acl_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_network_acl_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/network_acls/%s/rules/%s" % [ERB::Util.url_encode(network_acl_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_placement_group(id:) ⇒ nil

Delete a placement group. This request deletes a placement group. This operation cannot be reversed. For

this request to succeed, the placement group must not be associated with an
instance.

Parameters:

  • id (String)

    The placement group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
# File 'lib/ibm_vpc/vpc_v1.rb', line 11403

def delete_placement_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_placement_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/placement_groups/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_private_path_service_gateway(id:) ⇒ nil

Delete a private path service gateway. This request deletes a private path service gateway. For this request to succeed,

the value of `endpoint_gateway_count` must be `0`. This operation cannot be
reversed.

Parameters:

  • id (String)

    The private path service gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
# File 'lib/ibm_vpc/vpc_v1.rb', line 11640

def delete_private_path_service_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_private_path_service_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/private_path_service_gateways/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:) ⇒ nil

Delete an account policy for a private path service gateway. This request deletes an account policy. This operation cannot be reversed and it

does not affect the `status` of any existing endpoint gateway bindings.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • id (String)

    The account policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
# File 'lib/ibm_vpc/vpc_v1.rb', line 11869

def (private_path_service_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_private_path_service_gateway_account_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/private_path_service_gateways/%s/account_policies/%s" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_public_address_range(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a public address range. This request deletes a public address range. If the public address range is bound

to a
`target`, it will be unbound. This operation cannot be reversed.

Parameters:

  • id (String)

    The public address range identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
# File 'lib/ibm_vpc/vpc_v1.rb', line 12429

def delete_public_address_range(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_public_address_range")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/public_address_ranges/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_public_gateway(id:) ⇒ nil

Delete a public gateway. This request deletes a public gateway. This operation cannot be reversed. For this

request to succeed, the public gateway must not be attached to any subnets. The
public gateway's floating IP will be automatically unbound. If the floating IP was
created when the public gateway was created, it will be deleted.

Parameters:

  • id (String)

    The public gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
# File 'lib/ibm_vpc/vpc_v1.rb', line 12653

def delete_public_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_public_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/public_gateways/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_reservation(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a reservation. This request deletes a reservation. This operation cannot be reversed.

Reservations with a `status` of `active` are not allowed to be deleted.

Parameters:

  • id (String)

    The reservation identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
# File 'lib/ibm_vpc/vpc_v1.rb', line 12895

def delete_reservation(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_reservation")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/reservations/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_security_group(id:) ⇒ nil

Delete a security group. This request deletes a security group. A security group cannot be deleted if it is

referenced by any security group targets or rules. Additionally, a VPC's default
security group cannot be deleted. This operation cannot be reversed.

Parameters:

  • id (String)

    The security group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
# File 'lib/ibm_vpc/vpc_v1.rb', line 13157

def delete_security_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_security_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/security_groups/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_security_group_rule(security_group_id:, id:) ⇒ nil

Delete a security group rule. This request deletes a security group rule. This operation cannot be reversed.

Removing a security group rule will not end existing connections allowed by that
rule.

Parameters:

  • security_group_id (String)

    The security group identifier.

  • id (String)

    The rule identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
# File 'lib/ibm_vpc/vpc_v1.rb', line 13362

def delete_security_group_rule(security_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_security_group_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/security_groups/%s/rules/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_security_group_target_binding(security_group_id:, id:) ⇒ nil

Remove a target from a security group. This request removes a target from a security group. For this request to succeed,

the target must be attached to at least one other security group.  The specified
target identifier can be:

- A bare metal server network interface identifier
- A virtual network interface identifier
- A VPN server identifier
- A load balancer identifier
- An endpoint gateway identifier
- An instance network interface identifier

Security groups are stateful, so any changes to a target's security groups are
applied to new connections. Existing connections are not affected.

Parameters:

  • security_group_id (String)

    The security group identifier.

  • id (String)

    The security group target identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
# File 'lib/ibm_vpc/vpc_v1.rb', line 13539

def delete_security_group_target_binding(security_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_security_group_target_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_share(id:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a file share. This request deletes a share. This operation cannot be reversed. A share cannot be

deleted if it:
- has share mount targets
- has a `lifecycle_state` of `updating`
- has a replication operation in progress

If the request is accepted, the share `lifecycle_state` will be set to `deleting`.
Once deletion processing completes, it will no longer be retrievable.

Parameters:

  • id (String)

    The file share identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
# File 'lib/ibm_vpc/vpc_v1.rb', line 13852

def delete_share(id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_share")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_share_accessor_binding(share_id:, id:) ⇒ nil

Delete a file share accessor binding. This request deletes a share accessor binding. This operation cannot be reversed.

Parameters:

  • share_id (String)

    The file share identifier.

  • id (String)

    The file share accessor binding identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
# File 'lib/ibm_vpc/vpc_v1.rb', line 14015

def delete_share_accessor_binding(share_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_share_accessor_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s/accessor_bindings/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_share_mount_target(share_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a file share mount target. This request deletes a share mount target. This operation cannot be reversed.

If the request is accepted, the share mount target `lifecycle_state` will be set
to
`deleting`. Once deletion processing completes, it will no longer be retrievable.

Parameters:

  • share_id (String)

    The file share identifier.

  • id (String)

    The file share mount target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
# File 'lib/ibm_vpc/vpc_v1.rb', line 14250

def delete_share_mount_target(share_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_share_mount_target")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s/mount_targets/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_share_snapshot(share_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a share snapshot. This request deletes a share snapshot. This operation cannot be reversed. For this

request to succeed, the share must have a `replication_role` of `source` or
`none`.

If the request is accepted, the share snapshot `lifecycle_state` will be set to
`deleting`. Once deletion processing completes, the share snapshot will no longer
be retrievable.

Deleting a share snapshot will not affect any previously-accepted requests to
create a share from it.

If the share has a `replication_role` of `source`, the corresponding snapshot on
the replica share will be subsequently moved to a `lifecycle_state` of `deleting`.
If the data for the corresponding snapshot has already been synchronized via the
replication schedule determined by `replication_cron_spec`, the snapshot will
remain available in the replica share's `.snapshot` directory until the next
replication sync.

Parameters:

  • share_id (String)

    The file share identifier.

  • id (String)

    The share snapshot identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
# File 'lib/ibm_vpc/vpc_v1.rb', line 14506

def delete_share_snapshot(share_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_share_snapshot")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s/snapshots/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_share_source(share_id:) ⇒ nil

Split the source file share from a replica file share. This request removes the replication relationship between a source share and the

replica share specified by the identifier in the URL. The replication relationship
cannot be removed if a source share or the replica share has a `lifecycle_state`
of `updating`, or has a replication operation in progress.

This operation cannot be reversed.

Parameters:

  • share_id (String)

    The file share identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
# File 'lib/ibm_vpc/vpc_v1.rb', line 14638

def delete_share_source(share_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_share_source")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s/source" % [ERB::Util.url_encode(share_id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_snapshot(id:, if_match: nil) ⇒ nil

Delete a snapshot. This request deletes a snapshot. This operation cannot be reversed.

Parameters:

  • id (String)

    The snapshot identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
# File 'lib/ibm_vpc/vpc_v1.rb', line 15116

def delete_snapshot(id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_snapshot")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/snapshots/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_snapshot_clone(id:, zone_name:) ⇒ nil

Delete a snapshot clone. This request deletes a snapshot clone. This operation cannot be reversed, but an

equivalent clone may be recreated from the snapshot.

Parameters:

  • id (String)

    The snapshot identifier.

  • zone_name (String)

    The zone name.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
# File 'lib/ibm_vpc/vpc_v1.rb', line 15272

def delete_snapshot_clone(id:, zone_name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("zone_name must be provided") if zone_name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_snapshot_clone")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/snapshots/%s/clones/%s" % [ERB::Util.url_encode(id), ERB::Util.url_encode(zone_name)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_snapshot_consistency_group(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a snapshot consistency group. This request deletes snapshot consistency group. This operation cannot be

reversed. If the `delete_snapshots_on_delete` property is `true`, all snapshots in
the consistency group will also be deleted.

Parameters:

  • id (String)

    The snapshot consistency group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
# File 'lib/ibm_vpc/vpc_v1.rb', line 14808

def delete_snapshot_consistency_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_snapshot_consistency_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/snapshot_consistency_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_snapshots(source_volume_id:) ⇒ nil

Delete a filtered collection of snapshots. This request deletes snapshots that match the specified filter. This operation

cannot be reversed.

Parameters:

  • source_volume_id (String)

    Filters the collection to resources with a ‘source_volume.id` property matching the specified identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
# File 'lib/ibm_vpc/vpc_v1.rb', line 14929

def delete_snapshots(source_volume_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("source_volume_id must be provided") if source_volume_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_snapshots")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "source_volume.id" => source_volume_id
  }

  method_url = "/snapshots"

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_subnet(id:) ⇒ nil

Delete a subnet. This request deletes a subnet. This operation cannot be reversed. For this request

to succeed, the subnet must not be referenced by any bare metal server network
interfaces, instance network interfaces, virtual network interfaces, VPN gateways,
or load balancers. A delete operation automatically detaches the subnet from any
network ACLs, public gateways, or endpoint gateways. All flow log collectors with
`auto_delete` set to `true` targeting the subnet or any resource in the subnet are
automatically deleted.

Parameters:

  • id (String)

    The subnet identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
# File 'lib/ibm_vpc/vpc_v1.rb', line 15540

def delete_subnet(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_subnet")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/subnets/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_subnet_reserved_ip(subnet_id:, id:) ⇒ nil

Delete a reserved IP. This request releases a reserved IP. This operation cannot be reversed.

For this request to succeed, the reserved IP must not be required by another
resource, such as a bare metal server network interface, instance network
interface or virtual network interface for which it is the primary IP. A
provider-owned reserved IP is not allowed to be deleted.

Parameters:

  • subnet_id (String)

    The subnet identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
# File 'lib/ibm_vpc/vpc_v1.rb', line 16058

def delete_subnet_reserved_ip(subnet_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("subnet_id must be provided") if subnet_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_subnet_reserved_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(subnet_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_virtual_network_interfaces(id:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a virtual network interface. This request deletes a virtual network interface. This operation cannot be

reversed. For this request to succeed, the virtual network interface must not be
required by another resource, such as the primary network attachment for an
instance.

Parameters:

  • id (String)

    The virtual network interface identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
# File 'lib/ibm_vpc/vpc_v1.rb', line 16348

def delete_virtual_network_interfaces(id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_virtual_network_interfaces")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/virtual_network_interfaces/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_volume(id:, if_match: nil) ⇒ nil

Delete a volume. This request deletes a volume. This operation cannot be reversed. For this request

to succeed, the volume must not be attached to any instances.

Parameters:

  • id (String)

    The volume identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
# File 'lib/ibm_vpc/vpc_v1.rb', line 17007

def delete_volume(id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_volume")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/volumes/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_volume_job(volume_id:, id:) ⇒ nil

Delete a volume job. This request deletes a volume job. This operation cannot be reversed. If the job

has not completed, the job will be canceled, and the incomplete volume job will be
deleted.

Parameters:

  • volume_id (String)

    The volume identifier.

  • id (String)

    The volume job identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
# File 'lib/ibm_vpc/vpc_v1.rb', line 17265

def delete_volume_job(volume_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("volume_id must be provided") if volume_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_volume_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/volumes/%s/jobs/%s" % [ERB::Util.url_encode(volume_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpc(id:, if_match: nil) ⇒ nil

Delete a VPC. This request deletes a VPC. This operation cannot be reversed.

For this request to succeed:
- Instances, subnets, public gateways, endpoint gateways, and private path service
  gateways must not reside in this VPC
- The VPC must not be providing DNS resolution for any other VPCs
- If `dns.enable_hub` is `true`, `dns.resolution_binding_count` must be zero

All security groups and network ACLs associated with the VPC are automatically
deleted. All flow log collectors with `auto_delete` set to `true` targeting the
VPC or any resource in the VPC are automatically deleted. All public address
ranges attached to the VPC are automatically detached.

Parameters:

  • id (String)

    The VPC identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
# File 'lib/ibm_vpc/vpc_v1.rb', line 17567

def delete_vpc(id:, if_match: nil)
  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpc")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpc_address_prefix(vpc_id:, id:) ⇒ nil

Delete an address prefix. This request deletes a prefix. This operation cannot be reversed. The request will

fail if any subnets use addresses from this prefix.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The prefix identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
# File 'lib/ibm_vpc/vpc_v1.rb', line 17904

def delete_vpc_address_prefix(vpc_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpc_address_prefix")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/address_prefixes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpc_dns_resolution_binding(vpc_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a DNS resolution binding. This request deletes a DNS resolution binding. This operation cannot be reversed.

For this request to succeed, the VPC specified by the identifier in the URL must
not have
`dns.resolver.type` set to `delegated`.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The DNS resolution binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
# File 'lib/ibm_vpc/vpc_v1.rb', line 18191

def delete_vpc_dns_resolution_binding(vpc_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpc_dns_resolution_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/dns_resolution_bindings/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#delete_vpc_route(vpc_id:, id:) ⇒ nil

Delete a VPC route. This request deletes a route. This operation cannot be reversed.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The route identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
# File 'lib/ibm_vpc/vpc_v1.rb', line 18458

def delete_vpc_route(vpc_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpc_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/routes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpc_routing_table(vpc_id:, id:, if_match: nil) ⇒ nil

Delete a VPC routing table. This request deletes a routing table. A routing table cannot be deleted if it is

associated with any subnets in the VPC. Additionally, a VPC's default routing
table cannot be deleted. This operation cannot be reversed.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The routing table identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
# File 'lib/ibm_vpc/vpc_v1.rb', line 18739

def delete_vpc_routing_table(vpc_id:, id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpc_routing_table")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/routing_tables/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpc_routing_table_route(vpc_id:, routing_table_id:, id:) ⇒ nil

Delete a VPC routing table route. This request deletes a VPC route. This operation cannot be reversed. Only VPC

routes with an `origin` of `user` are allowed to be deleted.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • routing_table_id (String)

    The routing table identifier.

  • id (String)

    The VPC routing table route identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
# File 'lib/ibm_vpc/vpc_v1.rb', line 19015

def delete_vpc_routing_table_route(vpc_id:, routing_table_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("routing_table_id must be provided") if routing_table_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpc_routing_table_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/routing_tables/%s/routes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(routing_table_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpn_gateway(id:) ⇒ nil

Delete a VPN gateway. This request deletes a VPN gateway. This operation cannot be reversed. For this

request to succeed, the VPN gateway must not have a `status` of `pending`, and
there must not be any VPC routes using the VPN gateway's connections as a next
hop.

Parameters:

  • id (String)

    The VPN gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
# File 'lib/ibm_vpc/vpc_v1.rb', line 19749

def delete_vpn_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpn_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpn_gateway_connection(vpn_gateway_id:, id:, if_match: nil) ⇒ nil

Delete a VPN gateway connection. This request deletes a VPN gateway connection. This operation cannot be reversed.

For this request to succeed, there must not be VPC routes using this VPN
connection as a next hop.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
# File 'lib/ibm_vpc/vpc_v1.rb', line 20111

def delete_vpn_gateway_connection(vpn_gateway_id:, id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpn_gateway_connection")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpn_server(id:, if_match: nil) ⇒ nil

Delete a VPN server. This request deletes a VPN server. This operation cannot be reversed.

Parameters:

  • id (String)

    The VPN server identifier.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
# File 'lib/ibm_vpc/vpc_v1.rb', line 20803

def delete_vpn_server(id:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpn_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_servers/%s" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpn_server_client(vpn_server_id:, id:) ⇒ nil

Delete a VPN client. This request disconnects and deletes the VPN client from the VPN server. The VPN

client may reconnect unless its authentication permissions for the configured
authentication methods (such as its client certificate) have been revoked.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • id (String)

    The VPN client identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
# File 'lib/ibm_vpc/vpc_v1.rb', line 21005

def delete_vpn_server_client(vpn_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpn_server_client")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_servers/%s/clients/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#delete_vpn_server_route(vpn_server_id:, id:) ⇒ nil

Delete a VPN route. This request deletes a VPN route. This operation cannot be reversed.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • id (String)

    The VPN route identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
# File 'lib/ibm_vpc/vpc_v1.rb', line 21230

def delete_vpn_server_route(vpn_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpn_server_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_servers/%s/routes/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#deny_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:, set_account_policy: nil) ⇒ nil

Deny an endpoint gateway binding for a private path service gateway. This request denies a ‘pending` endpoint gateway request, and optionally sets the

policy to deny future requests from the same account.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • id (String)

    The endpoint gateway binding identifier.

  • set_account_policy (Boolean) (defaults to: nil)

    Indicates whether this will become the access policy for any ‘pending` and future endpoint gateway bindings from the same account.

    If set to ‘true`:

    • If the account has an existing access policy, that policy will be updated to

    ‘deny`.

    Otherwise, a new `deny` access policy will be created for the account.
    
    • All ‘pending` endpoint gateway bindings for the account will be denied.

    If set to ‘false`:

    • No access policies will be created or updated

    • All ‘pending` endpoint gateway bindings for the account will remain `pending`.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
# File 'lib/ibm_vpc/vpc_v1.rb', line 12100

def deny_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:, set_account_policy: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "deny_private_path_service_gateway_endpoint_gateway_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "set_account_policy" => 
  }

  method_url = "/private_path_service_gateways/%s/endpoint_gateway_bindings/%s/deny" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: false
  )
  nil
end

#deprecate_image(id:) ⇒ nil

Deprecate an image. This request deprecates an image, resulting in its ‘status` becoming `deprecated`

and
`deprecation_at` being set to the current date and time.

The image must:
- have a `status` of `available`
- have `catalog_offering.managed` set to `false`
- not have `deprecation_at` set

An image with `remote.account` set is not allowed to be deprecated.

Parameters:

  • id (String)

    The image identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
# File 'lib/ibm_vpc/vpc_v1.rb', line 5398

def deprecate_image(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "deprecate_image")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/images/%s/deprecate" % [ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#disconnect_vpn_client(vpn_server_id:, id:) ⇒ nil

Disconnect a VPN client. This request disconnects the specified VPN client, and deletes the client

according to the VPN server's auto-deletion policy. The VPN client may reconnect
unless its authentication permissions for the configured authentication methods
(such as its client certificate) have been revoked.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • id (String)

    The VPN client identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
# File 'lib/ibm_vpc/vpc_v1.rb', line 21084

def disconnect_vpn_client(vpn_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "disconnect_vpn_client")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_servers/%s/clients/%s/disconnect" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#failover_share(share_id:, fallback_policy: nil, timeout: nil) ⇒ nil

Failover to replica file share. This request triggers a failover to the replica file share specified by the

identifier in the URL. The failover cannot be started if a source share or the
replica share has a `lifecycle_state` of `updating`, or has a replication
operation in progress.

If `fallback_policy` is specified as `split`, and the request is accepted but the
failover operation cannot be performed, a split will be triggered.

Parameters:

  • share_id (String)

    The file share identifier.

  • fallback_policy (String) (defaults to: nil)

    The action to take if the failover request is accepted but cannot be performed or times out:

    • ‘fail`: Fail the operation, resulting in the replication relationship being

    unchanged.

    • ‘split`: Split the replica from its source, resulting in two individual

    read-write

    file shares. Because the final sync was not completed, the replica may be
    out-of-date. This occurs in disaster recovery scenarios where the source is
    

    known to

    be unreachable.
    
  • timeout (Fixnum) (defaults to: nil)

    The failover timeout in seconds.

    If the timeout is reached, the ‘fallback_policy` will be triggered.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
# File 'lib/ibm_vpc/vpc_v1.rb', line 14110

def failover_share(share_id:, fallback_policy: nil, timeout: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "failover_share")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "fallback_policy" => fallback_policy,
    "timeout" => timeout
  }

  method_url = "/shares/%s/failover" % [ERB::Util.url_encode(share_id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: false
  )
  nil
end

#get_backup_policy(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a backup policy. This request retrieves a single backup policy specified by the identifier in the

URL.

Parameters:

  • id (String)

    The backup policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'lib/ibm_vpc/vpc_v1.rb', line 561

def get_backup_policy(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_backup_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/backup_policies/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_backup_policy_job(backup_policy_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a backup policy job. This request retrieves a single backup policy job specified by the identifier in

the URL.

Parameters:

  • backup_policy_id (String)

    The backup policy identifier.

  • id (String)

    The backup policy job identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/ibm_vpc/vpc_v1.rb', line 232

def get_backup_policy_job(backup_policy_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("backup_policy_id must be provided") if backup_policy_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_backup_policy_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/backup_policies/%s/jobs/%s" % [ERB::Util.url_encode(backup_policy_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_backup_policy_plan(backup_policy_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a backup policy plan. This request retrieves a single backup policy plan specified by the identifier in

the URL.

Parameters:

  • backup_policy_id (String)

    The backup policy identifier.

  • id (String)

    The backup policy plan identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/ibm_vpc/vpc_v1.rb', line 431

def get_backup_policy_plan(backup_policy_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("backup_policy_id must be provided") if backup_policy_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_backup_policy_plan")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/backup_policies/%s/plans/%s" % [ERB::Util.url_encode(backup_policy_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_bare_metal_server(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a bare metal server. This request retrieves a single bare metal server specified by the identifier in

the URL.

Parameters:

  • id (String)

    The bare metal server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
# File 'lib/ibm_vpc/vpc_v1.rb', line 1765

def get_bare_metal_server(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_bare_metal_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_bare_metal_server_disk(bare_metal_server_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a bare metal server disk. This request retrieves a single disk specified by the identifier in the URL.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • id (String)

    The bare metal server disk identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
# File 'lib/ibm_vpc/vpc_v1.rb', line 918

def get_bare_metal_server_disk(bare_metal_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_bare_metal_server_disk")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/disks/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_bare_metal_server_initialization(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve initialization configuration for a bare metal server. This request retrieves configuration used to initialize the bare metal server,

such as the image used, SSH keys, and any configured usernames and passwords.
These can subsequently be changed on the server and therefore may not be current.

Parameters:

  • id (String)

    The bare metal server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
# File 'lib/ibm_vpc/vpc_v1.rb', line 1892

def get_bare_metal_server_initialization(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_bare_metal_server_initialization")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/initialization" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_bare_metal_server_network_attachment(bare_metal_server_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a bare metal server network attachment. This request retrieves a single bare metal server network attachment specified by

the identifier in the URL.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • id (String)

    The bare metal server network attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
# File 'lib/ibm_vpc/vpc_v1.rb', line 1137

def get_bare_metal_server_network_attachment(bare_metal_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_bare_metal_server_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_attachments/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_bare_metal_server_network_interface(bare_metal_server_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a bare metal server network interface. This request retrieves a single bare metal server network interface specified by

the identifier in the URL.

If this bare metal server has network attachments, the retrieved network interface
is a [read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • id (String)

    The bare metal server network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'lib/ibm_vpc/vpc_v1.rb', line 1381

def get_bare_metal_server_network_interface(bare_metal_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_bare_metal_server_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_interfaces/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_bare_metal_server_network_interface_floating_ip(bare_metal_server_id:, network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve associated floating IP. This request retrieves a specified floating IP if it is associated with the bare

metal server network interface specified in the URL.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • network_interface_id (String)

    The bare metal server network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File 'lib/ibm_vpc/vpc_v1.rb', line 1557

def get_bare_metal_server_network_interface_floating_ip(bare_metal_server_id:, network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_bare_metal_server_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_bare_metal_server_network_interface_ip(bare_metal_server_id:, network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve the primary reserved IP. This request retrieves the primary reserved IP for a bare metal server network

interface.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • network_interface_id (String)

    The bare metal server network interface identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
# File 'lib/ibm_vpc/vpc_v1.rb', line 1688

def get_bare_metal_server_network_interface_ip(bare_metal_server_id:, network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_bare_metal_server_network_interface_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_interfaces/%s/ips/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_bare_metal_server_profile(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a bare metal server profile. This request retrieves a single bare metal server profile specified by the name in

the URL.

Parameters:

  • name (String)

    The bare metal server profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
# File 'lib/ibm_vpc/vpc_v1.rb', line 686

def get_bare_metal_server_profile(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_bare_metal_server_profile")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_server/profiles/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_cluster_network(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a cluster network. This request retrieves a single cluster network specified by the identifier in the

URL.

Parameters:

  • id (String)

    The cluster network identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
# File 'lib/ibm_vpc/vpc_v1.rb', line 3089

def get_cluster_network(id:)
  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_networks/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_cluster_network_interface(cluster_network_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a cluster network interface. This request retrieves a single cluster network interface specified by the

identifier in the URL.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • id (String)

    The cluster network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
# File 'lib/ibm_vpc/vpc_v1.rb', line 2481

def get_cluster_network_interface(cluster_network_id:, id:)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_networks/%s/interfaces/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_cluster_network_profile(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a cluster network profile. This request retrieves a single cluster network profile specified by the name in

the URL.

Parameters:

  • name (String)

    The cluster network profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2155
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 2155

def get_cluster_network_profile(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network_profile")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_network/profiles/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_cluster_network_subnet(cluster_network_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a cluster network subnet. This request retrieves a single cluster network subnet specified by the identifier

in the URL.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • id (String)

    The cluster network subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
# File 'lib/ibm_vpc/vpc_v1.rb', line 2959

def get_cluster_network_subnet(cluster_network_id:, id:)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network_subnet")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_networks/%s/subnets/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a cluster network subnet reserved IP. This request retrieves a single cluster network subnet reserved IP specified by

the identifier in the URL.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • cluster_network_subnet_id (String)

    The cluster network subnet identifier.

  • id (String)

    The cluster network subnet reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
# File 'lib/ibm_vpc/vpc_v1.rb', line 2820

def get_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network_subnet_reserved_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/cluster_networks/%s/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_dedicated_host(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a dedicated host. This request retrieves a single dedicated host specified by the identifiers in the

URL.

Parameters:

  • id (String)

    The dedicated host identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
# File 'lib/ibm_vpc/vpc_v1.rb', line 3715

def get_dedicated_host(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_dedicated_host")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_dedicated_host_disk(dedicated_host_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a dedicated host disk. This request retrieves a single dedicated host disk specified by the identifier in

the URL.

Parameters:

  • dedicated_host_id (String)

    The dedicated host identifier.

  • id (String)

    The dedicated host disk identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
# File 'lib/ibm_vpc/vpc_v1.rb', line 3594

def get_dedicated_host_disk(dedicated_host_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("dedicated_host_id must be provided") if dedicated_host_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_dedicated_host_disk")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/dedicated_hosts/%s/disks/%s" % [ERB::Util.url_encode(dedicated_host_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_dedicated_host_group(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a dedicated host group. This request retrieves a single dedicated host group specified by the identifier

in the URL.

Parameters:

  • id (String)

    The dedicated host group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
# File 'lib/ibm_vpc/vpc_v1.rb', line 3312

def get_dedicated_host_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_dedicated_host_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/dedicated_host/groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_dedicated_host_profile(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a dedicated host profile. This request retrieves a single dedicated host profile specified by the name in

the URL.

Parameters:

  • name (String)

    The dedicated host profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
# File 'lib/ibm_vpc/vpc_v1.rb', line 3432

def get_dedicated_host_profile(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_dedicated_host_profile")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/dedicated_host/profiles/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_endpoint_gateway(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an endpoint gateway. This request retrieves a single endpoint gateway specified by the identifier in

the URL.

Parameters:

  • id (String)

    The endpoint gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
# File 'lib/ibm_vpc/vpc_v1.rb', line 4415

def get_endpoint_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_endpoint_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_endpoint_gateway_ip(endpoint_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a reserved IP bound to an endpoint gateway. This request retrieves the specified reserved IP address if it is bound to the

endpoint gateway specified in the URL.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
# File 'lib/ibm_vpc/vpc_v1.rb', line 4062

def get_endpoint_gateway_ip(endpoint_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_endpoint_gateway_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_endpoint_gateway_resource_binding(endpoint_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an endpoint gateway resource binding. This request retrieves a single endpoint gateway resource binding specified by the

identifier in the URL.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • id (String)

    The resource binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
# File 'lib/ibm_vpc/vpc_v1.rb', line 4286

def get_endpoint_gateway_resource_binding(endpoint_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_endpoint_gateway_resource_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/endpoint_gateways/%s/resource_bindings/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_floating_ip(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a floating IP. This request retrieves a single floating IP specified by the identifier in the

URL.

Parameters:

  • id (String)

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
# File 'lib/ibm_vpc/vpc_v1.rb', line 4633

def get_floating_ip(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_flow_log_collector(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a flow log collector. This request retrieves a single flow log collector specified by the identifier in

the URL.

Parameters:

  • id (String)

    The flow log collector identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
# File 'lib/ibm_vpc/vpc_v1.rb', line 4888

def get_flow_log_collector(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_flow_log_collector")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_ike_policy(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an IKE policy. This request retrieves a single IKE policy specified by the identifier in the URL.

Parameters:

  • id (String)

    The IKE policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
# File 'lib/ibm_vpc/vpc_v1.rb', line 19284

def get_ike_policy(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_ike_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/ike_policies/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_image(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an image. This request retrieves a single image specified by the identifier in the URL.

Parameters:

  • id (String)

    The image identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
# File 'lib/ibm_vpc/vpc_v1.rb', line 5268

def get_image(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_image")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/images/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_image_export_job(image_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an image export job. This request retrieves a single image export job specified by the identifier in

the URL.

Parameters:

  • image_id (String)

    The image identifier.

  • id (String)

    The image export job identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
# File 'lib/ibm_vpc/vpc_v1.rb', line 5668

def get_image_export_job(image_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("image_id must be provided") if image_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_image_export_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/images/%s/export_jobs/%s" % [ERB::Util.url_encode(image_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance. This request retrieves a single instance specified by the identifier in the URL.

Parameters:

  • id (String)

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
# File 'lib/ibm_vpc/vpc_v1.rb', line 7396

def get_instance(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_cluster_network_attachment(instance_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance cluster network attachment. This request retrieves a single instance cluster network attachment specified by

the identifier in the URL.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance cluster network attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
# File 'lib/ibm_vpc/vpc_v1.rb', line 7722

def get_instance_cluster_network_attachment(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_cluster_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/cluster_network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_disk(instance_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance disk. This request retrieves a single instance disk specified by the identifier in the

URL.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance disk identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
# File 'lib/ibm_vpc/vpc_v1.rb', line 7898

def get_instance_disk(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_disk")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/disks/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_group(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance group. This request retrieves a single instance group specified by identifier in the URL.

Parameters:

  • id (String)

    The instance group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
# File 'lib/ibm_vpc/vpc_v1.rb', line 5977

def get_instance_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_group_manager(instance_group_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance group manager. This request retrieves a single instance group manager specified by identifier in

the URL.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • id (String)

    The instance group manager identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
# File 'lib/ibm_vpc/vpc_v1.rb', line 6213

def get_instance_group_manager(instance_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_group_manager")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/managers/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve specified instance group manager action. This request retrieves a single instance group manager action specified by

identifier in the URL.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • id (String)

    The instance group manager action identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
# File 'lib/ibm_vpc/vpc_v1.rb', line 6428

def get_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_group_manager_action")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/managers/%s/actions/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance group manager policy. This request retrieves a single instance group manager policy specified by

identifier in the URL.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • id (String)

    The instance group manager policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
# File 'lib/ibm_vpc/vpc_v1.rb', line 6647

def get_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_group_manager_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/managers/%s/policies/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_group_membership(instance_group_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance group membership. This request retrieves a single instance group membership specified by identifier

in the URL.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • id (String)

    The instance group membership identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
# File 'lib/ibm_vpc/vpc_v1.rb', line 6852

def get_instance_group_membership(instance_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_group_membership")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance_groups/%s/memberships/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_initialization(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve initialization configuration for an instance. This request retrieves configuration used to initialize the instance, such as SSH

keys and the Windows administrator password. These can subsequently be changed on
the instance and therefore may not be current.

Parameters:

  • id (String)

    The instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
# File 'lib/ibm_vpc/vpc_v1.rb', line 7484

def get_instance_initialization(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_initialization")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/initialization" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_network_attachment(instance_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance network attachment. This request retrieves a single instance network attachment specified by the

identifier in the URL.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance network attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
# File 'lib/ibm_vpc/vpc_v1.rb', line 8123

def get_instance_network_attachment(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_network_interface(instance_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance network interface. This request retrieves a single instance network interface specified by the

identifier in the URL.

If this instance has network attachments, the retrieved network interface is a
[read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
# File 'lib/ibm_vpc/vpc_v1.rb', line 8387

def get_instance_network_interface(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_interfaces/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_network_interface_floating_ip(instance_id:, network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve associated floating IP. This request retrieves a specified floating IP address if it is associated with

the instance network interface and instance specified in the URL.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • network_interface_id (String)

    The instance network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
# File 'lib/ibm_vpc/vpc_v1.rb', line 8560

def get_instance_network_interface_floating_ip(instance_id:, network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_network_interface_ip(instance_id:, network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve the primary reserved IP. This request retrieves the primary reserved IP for an instance network interface.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • network_interface_id (String)

    The instance network interface identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
# File 'lib/ibm_vpc/vpc_v1.rb', line 8691

def get_instance_network_interface_ip(instance_id:, network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_network_interface_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_interfaces/%s/ips/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_profile(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance profile. This request retrieves a single instance profile specified by the name in the URL.

Parameters:

  • name (String)

    The instance profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
# File 'lib/ibm_vpc/vpc_v1.rb', line 7169

def get_instance_profile(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_profile")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance/profiles/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_template(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an instance template. This request retrieves a single instance template specified by the identifier in

the URL.

Parameters:

  • id (String)

    The instance template identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
# File 'lib/ibm_vpc/vpc_v1.rb', line 7051

def get_instance_template(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_template")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance/templates/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_instance_volume_attachment(instance_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a volume attachment. This request retrieves a single volume attachment specified by the identifier in

the URL.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The volume attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
# File 'lib/ibm_vpc/vpc_v1.rb', line 8864

def get_instance_volume_attachment(instance_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_volume_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/volume_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_ipsec_policy(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an IPsec policy. This request retrieves a single IPsec policy specified by the identifier in the

URL.

Parameters:

  • id (String)

    The IPsec policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
# File 'lib/ibm_vpc/vpc_v1.rb', line 19543

def get_ipsec_policy(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_ipsec_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_key(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a key. This request retrieves a single key specified by the identifier in the URL.

Parameters:

  • id (String)

    The key identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
# File 'lib/ibm_vpc/vpc_v1.rb', line 9085

def get_key(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_key")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/keys/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_load_balancer(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a load balancer. This request retrieves a single load balancer specified by the identifier in the

URL path.

Parameters:

  • id (String)

    The load balancer identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
# File 'lib/ibm_vpc/vpc_v1.rb', line 9418

def get_load_balancer(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_load_balancer_listener(load_balancer_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a load balancer listener. This request retrieves a single listener specified by the identifier in the URL

path.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • id (String)

    The listener identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
# File 'lib/ibm_vpc/vpc_v1.rb', line 9756

def get_load_balancer_listener(load_balancer_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_listener")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a load balancer listener policy. Retrieve a single policy specified by the identifier in the URL path.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • id (String)

    The policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
# File 'lib/ibm_vpc/vpc_v1.rb', line 10003

def get_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_listener_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners/%s/policies/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a load balancer listener policy rule. Retrieves a single rule specified by the identifier in the URL path.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • policy_id (String)

    The policy identifier.

  • id (String)

    The rule identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
# File 'lib/ibm_vpc/vpc_v1.rb', line 10257

def get_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("policy_id must be provided") if policy_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_listener_policy_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners/%s/policies/%s/rules/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id), ERB::Util.url_encode(policy_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_load_balancer_pool(load_balancer_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a load balancer pool. This request retrieves a single pool specified by the identifier in the URL path.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • id (String)

    The pool identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
# File 'lib/ibm_vpc/vpc_v1.rb', line 10521

def get_load_balancer_pool(load_balancer_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_pool")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/pools/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a load balancer pool member. This request retrieves a single member specified by the identifier in the URL

path.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • pool_id (String)

    The pool identifier.

  • id (String)

    The member identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
# File 'lib/ibm_vpc/vpc_v1.rb', line 10812

def get_load_balancer_pool_member(load_balancer_id:, pool_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("pool_id must be provided") if pool_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_pool_member")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/pools/%s/members/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(pool_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_load_balancer_profile(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a load balancer profile. This request retrieves a load balancer profile specified by the name in the URL.

Parameters:

  • name (String)

    The load balancer profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
# File 'lib/ibm_vpc/vpc_v1.rb', line 9203

def get_load_balancer_profile(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_profile")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancer/profiles/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_load_balancer_statistics(id:) ⇒ IBMCloudSdkCore::DetailedResponse

List statistics of a load balancer. This request lists statistics of a load balancer.

Parameters:

  • id (String)

    The load balancer identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
# File 'lib/ibm_vpc/vpc_v1.rb', line 9501

def get_load_balancer_statistics(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_statistics")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/statistics" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_network_acl(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a network ACL. This request retrieves a single network ACL specified by the identifier in the

URL.

Parameters:

  • id (String)

    The network ACL identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
# File 'lib/ibm_vpc/vpc_v1.rb', line 11024

def get_network_acl(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_network_acl")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_network_acl_rule(network_acl_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a network ACL rule. This request retrieves a single rule specified by the identifier in the URL.

Parameters:

  • network_acl_id (String)

    The network ACL identifier.

  • id (String)

    The rule identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
# File 'lib/ibm_vpc/vpc_v1.rb', line 11228

def get_network_acl_rule(network_acl_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_network_acl_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/network_acls/%s/rules/%s" % [ERB::Util.url_encode(network_acl_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_network_interface_floating_ip(virtual_network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve associated floating IP. This request retrieves a specified floating IP if it is associated with the

virtual network interface specified in the URL.

Parameters:

  • virtual_network_interface_id (String)

    The virtual network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
# File 'lib/ibm_vpc/vpc_v1.rb', line 16554

def get_network_interface_floating_ip(virtual_network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("virtual_network_interface_id must be provided") if virtual_network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/virtual_network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(virtual_network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_operating_system(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an operating system. This request retrieves a single operating system specified by the name in the URL.

Parameters:

  • name (String)

    The operating system name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
# File 'lib/ibm_vpc/vpc_v1.rb', line 5788

def get_operating_system(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_operating_system")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/operating_systems/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_placement_group(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a placement group. This request retrieves a single placement group specified by identifier in the

URL.

Parameters:

  • id (String)

    The placement group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
# File 'lib/ibm_vpc/vpc_v1.rb', line 11439

def get_placement_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_placement_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/placement_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_private_path_service_gateway(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a private path service gateway. This request retrieves the private path service gateway specified by the

identifier in the URL.

Parameters:

  • id (String)

    The private path service gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
# File 'lib/ibm_vpc/vpc_v1.rb', line 11676

def get_private_path_service_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_private_path_service_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/private_path_service_gateways/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an account policy for a private path service gateway. This request retrieves a single account policy specified by the identifier in the

URL.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • id (String)

    The account policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
# File 'lib/ibm_vpc/vpc_v1.rb', line 11908

def (private_path_service_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_private_path_service_gateway_account_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/private_path_service_gateways/%s/account_policies/%s" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an endpoint gateway binding for a private path service gateway. This request retrieves a single endpoint gateway binding specified by the

identifier in the URL.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • id (String)

    The endpoint gateway binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
# File 'lib/ibm_vpc/vpc_v1.rb', line 12049

def get_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_private_path_service_gateway_endpoint_gateway_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/private_path_service_gateways/%s/endpoint_gateway_bindings/%s" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_public_address_range(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a public address range. This request retrieves a single public address range specified by the identifier

in the URL.

Parameters:

  • id (String)

    The public address range identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
# File 'lib/ibm_vpc/vpc_v1.rb', line 12465

def get_public_address_range(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_public_address_range")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/public_address_ranges/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_public_gateway(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a public gateway. This request retrieves a single public gateway specified by the identifier in the

URL.

Parameters:

  • id (String)

    The public gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
# File 'lib/ibm_vpc/vpc_v1.rb', line 12689

def get_public_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_public_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/public_gateways/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_region(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a region. This request retrieves a single region specified by the name in the URL.

Parameters:

  • name (String)

    The region name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
# File 'lib/ibm_vpc/vpc_v1.rb', line 5008

def get_region(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_region")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/regions/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_region_zone(region_name:, name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a zone. This request retrieves a single zone specified by the region and zone names in the

URL.

Parameters:

  • region_name (String)

    The region name.

  • name (String)

    The zone name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
# File 'lib/ibm_vpc/vpc_v1.rb', line 5082

def get_region_zone(region_name:, name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("region_name must be provided") if region_name.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_region_zone")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/regions/%s/zones/%s" % [ERB::Util.url_encode(region_name), ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_reservation(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a reservation. This request retrieves a single reservation specified by identifier in the URL.

Parameters:

  • id (String)

    The reservation identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
# File 'lib/ibm_vpc/vpc_v1.rb', line 12930

def get_reservation(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_reservation")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/reservations/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_security_group(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a security group. This request retrieves a single security group specified by the identifier in the

URL path.

Parameters:

  • id (String)

    The security group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
# File 'lib/ibm_vpc/vpc_v1.rb', line 13193

def get_security_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_security_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/security_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_security_group_rule(security_group_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a security group rule. This request retrieves a single security group rule specified by the identifier in

the URL path.

Parameters:

  • security_group_id (String)

    The security group identifier.

  • id (String)

    The rule identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
# File 'lib/ibm_vpc/vpc_v1.rb', line 13401

def get_security_group_rule(security_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_security_group_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/security_groups/%s/rules/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_security_group_target(security_group_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a security group target. This request retrieves a single target specified by the identifier in the URL

path. The target must be an existing target of the security group.

Parameters:

  • security_group_id (String)

    The security group identifier.

  • id (String)

    The security group target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
# File 'lib/ibm_vpc/vpc_v1.rb', line 13578

def get_security_group_target(security_group_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_security_group_target")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_share(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a file share. This request retrieves a single file share specified by the identifier in the URL.

Parameters:

  • id (String)

    The file share identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
# File 'lib/ibm_vpc/vpc_v1.rb', line 13888

def get_share(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_share")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_share_accessor_binding(share_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a file share accessor binding. This request retrieves a single accessor binding specified by the identifier in

the URL.

Parameters:

  • share_id (String)

    The file share identifier.

  • id (String)

    The file share accessor binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
# File 'lib/ibm_vpc/vpc_v1.rb', line 14054

def get_share_accessor_binding(share_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_share_accessor_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s/accessor_bindings/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_share_mount_target(share_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a file share mount target. This request retrieves a single share mount target specified by the identifier in

the URL.

Parameters:

  • share_id (String)

    The file share identifier.

  • id (String)

    The file share mount target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
# File 'lib/ibm_vpc/vpc_v1.rb', line 14289

def get_share_mount_target(share_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_share_mount_target")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s/mount_targets/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_share_profile(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a file share profile. This request retrieves a single file share profile specified by the name in the

URL.

Parameters:

  • name (String)

    The file share profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
# File 'lib/ibm_vpc/vpc_v1.rb', line 13713

def get_share_profile(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_share_profile")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/share/profiles/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_share_snapshot(share_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a share snapshot. This request retrieves a single share snapshot specified by the identifier in the

URL.

Parameters:

  • share_id (String)

    The file share identifier.

  • id (String)

    The share snapshot identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
# File 'lib/ibm_vpc/vpc_v1.rb', line 14545

def get_share_snapshot(share_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_share_snapshot")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s/snapshots/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_share_source(share_id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve the source file share for a replica file share. This request retrieves the source file share associated with the replica file

share specified by the identifier in the URL.

Parameters:

  • share_id (String)

    The file share identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
# File 'lib/ibm_vpc/vpc_v1.rb', line 14674

def get_share_source(share_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_share_source")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/shares/%s/source" % [ERB::Util.url_encode(share_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_snapshot(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a snapshot. This request retrieves a single snapshot specified by the identifier in the URL.

Parameters:

  • id (String)

    The snapshot identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
# File 'lib/ibm_vpc/vpc_v1.rb', line 15152

def get_snapshot(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_snapshot")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/snapshots/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_snapshot_clone(id:, zone_name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a snapshot clone. This request retrieves a single clone specified by the snapshot identifier and

zone name in the URL.

Parameters:

  • id (String)

    The snapshot identifier.

  • zone_name (String)

    The zone name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
# File 'lib/ibm_vpc/vpc_v1.rb', line 15311

def get_snapshot_clone(id:, zone_name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("zone_name must be provided") if zone_name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_snapshot_clone")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/snapshots/%s/clones/%s" % [ERB::Util.url_encode(id), ERB::Util.url_encode(zone_name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_snapshot_consistency_group(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a snapshot consistency group. This request retrieves a single snapshot consistency group specified by the

identifier in the URL.

Parameters:

  • id (String)

    The snapshot consistency group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
# File 'lib/ibm_vpc/vpc_v1.rb', line 14844

def get_snapshot_consistency_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_snapshot_consistency_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/snapshot_consistency_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_subnet(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a subnet. This request retrieves a single subnet specified by the identifier in the URL.

Parameters:

  • id (String)

    The subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
# File 'lib/ibm_vpc/vpc_v1.rb', line 15575

def get_subnet(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_subnet")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/subnets/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_subnet_network_acl(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a subnet’s attached network ACL. This request retrieves the network ACL attached to the subnet specified by the

identifier in the URL.

Parameters:

  • id (String)

    The subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
# File 'lib/ibm_vpc/vpc_v1.rb', line 15655

def get_subnet_network_acl(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_subnet_network_acl")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/subnets/%s/network_acl" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_subnet_public_gateway(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a subnet’s attached public gateway. This request retrieves the public gateway attached to the subnet specified by the

identifier in the URL.

Parameters:

  • id (String)

    The subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
# File 'lib/ibm_vpc/vpc_v1.rb', line 15770

def get_subnet_public_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_subnet_public_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/subnets/%s/public_gateway" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_subnet_reserved_ip(subnet_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a reserved IP. This request retrieves a single reserved IP specified by the identifier in the

URL.

Parameters:

  • subnet_id (String)

    The subnet identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
# File 'lib/ibm_vpc/vpc_v1.rb', line 16097

def get_subnet_reserved_ip(subnet_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("subnet_id must be provided") if subnet_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_subnet_reserved_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(subnet_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_subnet_routing_table(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a subnet’s attached routing table. This request retrieves the routing table attached to the subnet specified by the

identifier in the URL.

Parameters:

  • id (String)

    The subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
# File 'lib/ibm_vpc/vpc_v1.rb', line 15850

def get_subnet_routing_table(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_subnet_routing_table")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/subnets/%s/routing_table" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_virtual_network_interface(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a virtual network interface. This request retrieves a single virtual network interface specified by the

identifier in the URL.

Parameters:

  • id (String)

    The virtual network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
# File 'lib/ibm_vpc/vpc_v1.rb', line 16385

def get_virtual_network_interface(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_virtual_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/virtual_network_interfaces/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_virtual_network_interface_ip(virtual_network_interface_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve bound reserved IP. This request retrieves the specified reserved IP address if it is bound to the

virtual network interface specified in the URL.

Parameters:

  • virtual_network_interface_id (String)

    The virtual network interface identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
# File 'lib/ibm_vpc/vpc_v1.rb', line 16736

def get_virtual_network_interface_ip(virtual_network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("virtual_network_interface_id must be provided") if virtual_network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_virtual_network_interface_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/virtual_network_interfaces/%s/ips/%s" % [ERB::Util.url_encode(virtual_network_interface_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_volume(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a volume. This request retrieves a single volume specified by the identifier in the URL.

Parameters:

  • id (String)

    The volume identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
# File 'lib/ibm_vpc/vpc_v1.rb', line 17043

def get_volume(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_volume")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/volumes/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_volume_job(volume_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a volume job. This request retrieves a single volume job specified by the identifier in the URL.

Parameters:

  • volume_id (String)

    The volume identifier.

  • id (String)

    The volume job identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
# File 'lib/ibm_vpc/vpc_v1.rb', line 17303

def get_volume_job(volume_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("volume_id must be provided") if volume_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_volume_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/volumes/%s/jobs/%s" % [ERB::Util.url_encode(volume_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_volume_profile(name:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a volume profile. This request retrieves a single volume profile specified by the name in the URL.

Parameters:

  • name (String)

    The volume profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
# File 'lib/ibm_vpc/vpc_v1.rb', line 16859

def get_volume_profile(name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("name must be provided") if name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_volume_profile")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/volume/profiles/%s" % [ERB::Util.url_encode(name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPC. This request retrieves a single VPC specified by the identifier in the URL.

Parameters:

  • id (String)

    The VPC identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
# File 'lib/ibm_vpc/vpc_v1.rb', line 17603

def get_vpc(id:)
  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc_address_prefix(vpc_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve an address prefix. This request retrieves a single prefix specified by the identifier in the URL.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The prefix identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
# File 'lib/ibm_vpc/vpc_v1.rb', line 17942

def get_vpc_address_prefix(vpc_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc_address_prefix")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/address_prefixes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc_default_network_acl(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPC’s default network ACL. This request retrieves the default network ACL for the VPC specified by the

identifier in the URL. The default network ACL is applied to any new subnets in
the VPC which do not specify a network ACL.

Parameters:

  • id (String)

    The VPC identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
# File 'lib/ibm_vpc/vpc_v1.rb', line 17687

def get_vpc_default_network_acl(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc_default_network_acl")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/default_network_acl" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc_default_routing_table(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPC’s default routing table. This request retrieves the default routing table for the VPC specified by the

identifier in the URL. The default routing table is associated with any subnets in
the VPC which have not been explicitly associated with another routing table.

Parameters:

  • id (String)

    The VPC identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
# File 'lib/ibm_vpc/vpc_v1.rb', line 17724

def get_vpc_default_routing_table(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc_default_routing_table")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/default_routing_table" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc_default_security_group(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPC’s default security group. This request retrieves the default security group for the VPC specified by the

identifier in the URL. Resources created in this VPC that allow a security group
to be optionally specified will use this security group by default.

Parameters:

  • id (String)

    The VPC identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
# File 'lib/ibm_vpc/vpc_v1.rb', line 17761

def get_vpc_default_security_group(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc_default_security_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/default_security_group" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc_dns_resolution_binding(vpc_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a DNS resolution binding. This request retrieves a single DNS resolution binding specified by the identifier

in the URL.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The DNS resolution binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
# File 'lib/ibm_vpc/vpc_v1.rb', line 18230

def get_vpc_dns_resolution_binding(vpc_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc_dns_resolution_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/dns_resolution_bindings/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc_route(vpc_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPC route. This request retrieves a single route specified by the identifier in the URL.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The route identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
# File 'lib/ibm_vpc/vpc_v1.rb', line 18496

def get_vpc_route(vpc_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/routes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc_routing_table(vpc_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPC routing table. This request retrieves a single routing table specified by the identifier in the

URL.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The routing table identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
# File 'lib/ibm_vpc/vpc_v1.rb', line 18779

def get_vpc_routing_table(vpc_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc_routing_table")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/routing_tables/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpc_routing_table_route(vpc_id:, routing_table_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPC routing table route. This request retrieves a single VPC route specified by the identifier in the URL

path.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • routing_table_id (String)

    The routing table identifier.

  • id (String)

    The VPC routing table route identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
# File 'lib/ibm_vpc/vpc_v1.rb', line 19057

def get_vpc_routing_table_route(vpc_id:, routing_table_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("routing_table_id must be provided") if routing_table_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpc_routing_table_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpcs/%s/routing_tables/%s/routes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(routing_table_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpn_gateway(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPN gateway. This request retrieves a single VPN gateway specified by the identifier in the

URL.

Parameters:

  • id (String)

    The VPN gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
# File 'lib/ibm_vpc/vpc_v1.rb', line 19785

def get_vpn_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpn_gateway_connection(vpn_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPN gateway connection. This request retrieves a single VPN gateway connection specified by the identifier

in the URL.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
# File 'lib/ibm_vpc/vpc_v1.rb', line 20151

def get_vpn_gateway_connection(vpn_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_gateway_connection")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpn_gateway_service_connection(vpn_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPN gateway service connection. This request retrieves VPN gateway service connection specified by the identifier

in the URL.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway service connection identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
# File 'lib/ibm_vpc/vpc_v1.rb', line 20625

def get_vpn_gateway_service_connection(vpn_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_gateway_service_connection")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/service_connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpn_server(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPN server. This request retrieves a single VPN server specified by the identifier in the URL.

Parameters:

  • id (String)

    The VPN server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
# File 'lib/ibm_vpc/vpc_v1.rb', line 20839

def get_vpn_server(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_servers/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpn_server_client(vpn_server_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPN client. This request retrieves a single VPN client specified by the identifier in the URL.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • id (String)

    The VPN client identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
# File 'lib/ibm_vpc/vpc_v1.rb', line 21043

def get_vpn_server_client(vpn_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_server_client")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_servers/%s/clients/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#get_vpn_server_client_configuration(id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve client configuration. This request retrieves OpenVPN client configuration on a single VPN server

specified by the identifier in the URL. This configuration includes directives
compatible with OpenVPN releases 2.4 and 2.5.

Parameters:

  • id (String)

    The VPN server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
# File 'lib/ibm_vpc/vpc_v1.rb', line 20922

def get_vpn_server_client_configuration(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_server_client_configuration")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_servers/%s/client_configuration" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  response
end

#get_vpn_server_route(vpn_server_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a VPN route. This request retrieves a single VPN route specified by the identifier in the URL.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • id (String)

    The VPN route identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
# File 'lib/ibm_vpc/vpc_v1.rb', line 21268

def get_vpn_server_route(vpn_server_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_server_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_servers/%s/routes/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_backup_policies(start: nil, limit: nil, resource_group_id: nil, name: nil, tag: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List backup policies. This request lists backup policies in the region. Backup policies control which

sources are selected for backup and include a set of backup policy plans that
provide the backup schedules and deletion triggers.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • tag (String) (defaults to: nil)

    Filters the collection to resources with an item in the ‘tags` property matching the exact specified tag.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


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
115
116
117
118
119
# File 'lib/ibm_vpc/vpc_v1.rb', line 89

def list_backup_policies(start: nil, limit: nil, resource_group_id: nil, name: nil, tag: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_backup_policies")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "tag" => tag
  }

  method_url = "/backup_policies"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_backup_policy_jobs(backup_policy_id:, status: nil, backup_policy_plan_id: nil, start: nil, limit: nil, sort: nil, source_id: nil, target_snapshots_id: nil, target_snapshots_crn: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List jobs for a backup policy. This request retrieves jobs for a backup policy. A backup job represents the

execution of a backup policy plan for a resource matching the policy's criteria.

Parameters:

  • backup_policy_id (String)

    The backup policy identifier.

  • status (String) (defaults to: nil)

    Filters the collection to backup policy jobs with a ‘status` property matching the specified value.

  • backup_policy_plan_id (String) (defaults to: nil)

    Filters the collection to backup policy jobs with a ‘backup_policy_plan.id` property matching the specified identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • source_id (String) (defaults to: nil)

    Filters the collection to backup policy jobs with a ‘source.id` property matching the specified identifier.

  • target_snapshots_id (String) (defaults to: nil)

    Filters the collection to backup policy jobs with an item in the ‘target_snapshots` property with an `id` property matching the specified identifier.

  • target_snapshots_crn (String) (defaults to: nil)

    Filters the collection to backup policy jobs with an item in the ‘target_snapshots` property with a `crn` property matching the specified CRN.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/ibm_vpc/vpc_v1.rb', line 187

def list_backup_policy_jobs(backup_policy_id:, status: nil, backup_policy_plan_id: nil, start: nil, limit: nil, sort: nil, source_id: nil, target_snapshots_id: nil, target_snapshots_crn: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("backup_policy_id must be provided") if backup_policy_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_backup_policy_jobs")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "status" => status,
    "backup_policy_plan.id" => backup_policy_plan_id,
    "start" => start,
    "limit" => limit,
    "sort" => sort,
    "source.id" => source_id,
    "target_snapshots[].id" => target_snapshots_id,
    "target_snapshots[].crn" => target_snapshots_crn
  }

  method_url = "/backup_policies/%s/jobs" % [ERB::Util.url_encode(backup_policy_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_backup_policy_plans(backup_policy_id:, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List plans for a backup policy. This request retrieves plans for a backup policy. Backup plans provide the backup

schedule and deletion triggers.

Parameters:

  • backup_policy_id (String)

    The backup policy identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# File 'lib/ibm_vpc/vpc_v1.rb', line 272

def list_backup_policy_plans(backup_policy_id:, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("backup_policy_id must be provided") if backup_policy_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_backup_policy_plans")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "name" => name
  }

  method_url = "/backup_policies/%s/plans" % [ERB::Util.url_encode(backup_policy_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_bare_metal_server_disks(bare_metal_server_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List disks on a bare metal server. This request lists disks on a bare metal server. A disk is a block device that

is locally attached to the physical server.  By default, the listed disks are
sorted by their `created_at` property values, with the newest disk first.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
# File 'lib/ibm_vpc/vpc_v1.rb', line 882

def list_bare_metal_server_disks(bare_metal_server_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_bare_metal_server_disks")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/disks" % [ERB::Util.url_encode(bare_metal_server_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_bare_metal_server_network_attachments(bare_metal_server_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List network attachments on a bare metal server. This request lists network attachments on a bare metal server. A bare metal server

network attachment is an abstract representation of a network device and attaches
a bare metal server to a single subnet. Each network interface on a bare metal
server can attach to any subnet in the zone, including subnets that are already
attached to the bare metal server.

The network attachments will be sorted by their `created_at` property values, with
newest network attachments first. Network attachments with identical `created_at`
property values will in turn be sorted by ascending `name` property values.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
# File 'lib/ibm_vpc/vpc_v1.rb', line 1011

def list_bare_metal_server_network_attachments(bare_metal_server_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_bare_metal_server_network_attachments")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/bare_metal_servers/%s/network_attachments" % [ERB::Util.url_encode(bare_metal_server_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_bare_metal_server_network_interface_floating_ips(bare_metal_server_id:, network_interface_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List floating IPs associated with a bare metal server network interface. This request lists floating IPs associated with a bare metal server network

interface.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • network_interface_id (String)

    The bare metal server network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
# File 'lib/ibm_vpc/vpc_v1.rb', line 1475

def list_bare_metal_server_network_interface_floating_ips(bare_metal_server_id:, network_interface_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_bare_metal_server_network_interface_floating_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_interfaces/%s/floating_ips" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(network_interface_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_bare_metal_server_network_interface_ips(bare_metal_server_id:, network_interface_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List the primary reserved IP for a bare metal server network interface. This request lists the primary reserved IP for a bare metal server network

interface.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • network_interface_id (String)

    The bare metal server network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
# File 'lib/ibm_vpc/vpc_v1.rb', line 1648

def list_bare_metal_server_network_interface_ips(bare_metal_server_id:, network_interface_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_bare_metal_server_network_interface_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_interfaces/%s/ips" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(network_interface_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_bare_metal_server_network_interfaces(bare_metal_server_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List network interfaces on a bare metal server. This request lists network interfaces on a bare metal server. A bare metal server

network interface is an abstract representation of a network device and attaches a
bare metal server to a single subnet. Each network interface on a bare metal
server can attach to any subnet in the zone, including subnets that are already
attached to the bare metal server.

If this bare metal server has network attachments, each returned network interface
is a [read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'lib/ibm_vpc/vpc_v1.rb', line 1235

def list_bare_metal_server_network_interfaces(bare_metal_server_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_bare_metal_server_network_interfaces")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/bare_metal_servers/%s/network_interfaces" % [ERB::Util.url_encode(bare_metal_server_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_bare_metal_server_profiles(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List bare metal server profiles. This request lists [bare metal server

profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile)
available in the region. A bare metal server profile specifies the performance
characteristics and pricing model for a bare metal server.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
# File 'lib/ibm_vpc/vpc_v1.rb', line 650

def list_bare_metal_server_profiles(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_bare_metal_server_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/bare_metal_server/profiles"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_bare_metal_servers(start: nil, limit: nil, resource_group_id: nil, name: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List bare metal servers. This request lists bare metal servers in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • reservation_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘reservation.id` property matching the specified identifier.

  • reservation_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘reservation.crn` property matching the specified identifier.

  • reservation_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘reservation.name` property matching the specified identifier.

  • vpc_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.id` property matching the specified identifier.

  • vpc_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.crn` property matching the specified CRN.

  • vpc_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


738
739
740
741
742
743
744
745
746
747
748
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 738

def list_bare_metal_servers(start: nil, limit: nil, resource_group_id: nil, name: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_bare_metal_servers")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "reservation.id" => reservation_id,
    "reservation.crn" => reservation_crn,
    "reservation.name" => reservation_name,
    "vpc.id" => vpc_id,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_name
  }

  method_url = "/bare_metal_servers"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_cluster_network_interfaces(cluster_network_id:, start: nil, limit: nil, name: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List cluster network interfaces. This request lists cluster network interfaces in the region. A cluster network

interface is a logical abstraction of a cluster network interface in a subnet, and
may be attached to a target resource.

The cluster network interfaces will be sorted by their `created_at` property
values, with newest cluster network interfaces first. Cluster network interfaces
with identical
`created_at` property values will in turn be sorted by ascending `name` property
values.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
# File 'lib/ibm_vpc/vpc_v1.rb', line 2328

def list_cluster_network_interfaces(cluster_network_id:, start: nil, limit: nil, name: nil, sort: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_network_interfaces")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "name" => name,
    "sort" => sort
  }

  method_url = "/cluster_networks/%s/interfaces" % [ERB::Util.url_encode(cluster_network_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_cluster_network_profiles(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List cluster network profiles. This request lists cluster network profiles available in the region. A cluster

network profile specifies the performance characteristics and capabilities for a
cluster network.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
# File 'lib/ibm_vpc/vpc_v1.rb', line 2119

def list_cluster_network_profiles(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_network_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/cluster_network/profiles"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_cluster_network_subnet_reserved_ips(cluster_network_id:, cluster_network_subnet_id:, start: nil, limit: nil, name: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List cluster network subnet reserved IPs. This request lists cluster network subnet reserved IPs in the cluster network.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • cluster_network_subnet_id (String)

    The cluster network subnet identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
# File 'lib/ibm_vpc/vpc_v1.rb', line 2674

def list_cluster_network_subnet_reserved_ips(cluster_network_id:, cluster_network_subnet_id:, start: nil, limit: nil, name: nil, sort: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_network_subnet_reserved_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "name" => name,
    "sort" => sort
  }

  method_url = "/cluster_networks/%s/subnets/%s/reserved_ips" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_cluster_network_subnets(cluster_network_id:, start: nil, limit: nil, name: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List cluster network subnets. This request lists cluster network subnets in the cluster network. A cluster

network subnet provides network routing between other cluster network subnets
within a cluster network.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


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

def list_cluster_network_subnets(cluster_network_id:, start: nil, limit: nil, name: nil, sort: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_network_subnets")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "name" => name,
    "sort" => sort
  }

  method_url = "/cluster_networks/%s/subnets" % [ERB::Util.url_encode(cluster_network_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_cluster_networks(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List cluster networks. This request lists [cluster

networks](https://cloud.ibm.com/docs/vpc?topic=vpc-about-cluster-network) in the
region. A cluster network is a grouping of resources in a separate networking
space for high performance computing and networking.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • vpc_id (String) (defaults to: nil)

    Filters the collection to cluster networks with a ‘vpc.id` property matching the specified id.

  • vpc_crn (String) (defaults to: nil)

    Filters the collection to cluster networks with a ‘vpc.crn` property matching the specified CRN.

  • vpc_name (String) (defaults to: nil)

    Filters the collection to cluster networks with a ‘vpc.name` property matching the specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
# File 'lib/ibm_vpc/vpc_v1.rb', line 2209

def list_cluster_networks(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_networks")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "sort" => sort,
    "vpc.id" => vpc_id,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_name
  }

  method_url = "/cluster_networks"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_dedicated_host_disks(dedicated_host_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List disks on a dedicated host. This request lists disks on a dedicated host. A disk is a physical device that is

locally attached to the compute node. By default, the listed disks are sorted by
their
`created_at` property values, with the newest disk first.

Parameters:

  • dedicated_host_id (String)

    The dedicated host identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
# File 'lib/ibm_vpc/vpc_v1.rb', line 3557

def list_dedicated_host_disks(dedicated_host_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("dedicated_host_id must be provided") if dedicated_host_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_dedicated_host_disks")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/dedicated_hosts/%s/disks" % [ERB::Util.url_encode(dedicated_host_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_dedicated_host_groups(start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List dedicated host groups. This request lists dedicated host groups in the region. Each dedicated host must

belong to exactly one group, which controls placement of instances. Dedicated host
groups do not span zones.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • zone_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘zone.name` property matching the exact specified name.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
# File 'lib/ibm_vpc/vpc_v1.rb', line 3183

def list_dedicated_host_groups(start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_dedicated_host_groups")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "zone.name" => zone_name,
    "name" => name
  }

  method_url = "/dedicated_host/groups"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_dedicated_host_profiles(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List dedicated host profiles. This request lists provisionable [dedicated host

profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) in the region. A
dedicated host profile specifies the hardware characteristics for a dedicated
host.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
# File 'lib/ibm_vpc/vpc_v1.rb', line 3396

def list_dedicated_host_profiles(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_dedicated_host_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/dedicated_host/profiles"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_dedicated_hosts(dedicated_host_group_id: nil, start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List dedicated hosts. This request lists dedicated hosts in the region.

Parameters:

  • dedicated_host_group_id (String) (defaults to: nil)

    Filters the collection to dedicated hosts with a ‘group.id` property matching the specified identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • zone_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘zone.name` property matching the exact specified name.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
# File 'lib/ibm_vpc/vpc_v1.rb', line 3476

def list_dedicated_hosts(dedicated_host_group_id: nil, start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_dedicated_hosts")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "dedicated_host_group.id" => dedicated_host_group_id,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "zone.name" => zone_name,
    "name" => name
  }

  method_url = "/dedicated_hosts"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_endpoint_gateway_ips(endpoint_gateway_id:, start: nil, limit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List reserved IPs bound to an endpoint gateway. This request lists reserved IPs bound to an endpoint gateway.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
# File 'lib/ibm_vpc/vpc_v1.rb', line 3982

def list_endpoint_gateway_ips(endpoint_gateway_id:, start: nil, limit: nil, sort: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_endpoint_gateway_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "sort" => sort
  }

  method_url = "/endpoint_gateways/%s/ips" % [ERB::Util.url_encode(endpoint_gateway_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_endpoint_gateway_resource_bindings(endpoint_gateway_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List resource bindings for an endpoint gateway. This request lists resource bindings for an endpoint gateway. A resource binding

is an association between the endpoint gateway and a resource in the endpoint
gateway's `target` service. The resource binding provides a fully qualified domain
name for the
`service_endpoint` to access the resource from the endpoint gateway's VPC.

The resource bindings will be sorted by their `created_at` property values, with
newest resource bindings first. Resource bindings with identical `created_at`
property values will in turn be sorted by ascending `name` property values.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
# File 'lib/ibm_vpc/vpc_v1.rb', line 4152

def list_endpoint_gateway_resource_bindings(endpoint_gateway_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_endpoint_gateway_resource_bindings")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/endpoint_gateways/%s/resource_bindings" % [ERB::Util.url_encode(endpoint_gateway_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_endpoint_gateways(name: nil, start: nil, limit: nil, resource_group_id: nil, lifecycle_state: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, dns_resolution_binding_mode: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List endpoint gateways. This request lists endpoint gateways in the region. An endpoint gateway maps one

or more reserved IPs in a VPC to a target outside the VPC.

The endpoint gateways will be sorted by their `created_at` property values, with
newest endpoint gateway first. Endpoint gateways with identical `created_at`
property values will in turn be sorted by ascending `name` property values.

Parameters:

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • lifecycle_state (Array[String]) (defaults to: nil)

    Filters the collection to resources with a ‘lifecycle_state` property matching one of the specified comma-separated values.

  • vpc_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.id` property matching the specified identifier.

  • vpc_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.crn` property matching the specified CRN.

  • vpc_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.name` property matching the exact specified name.

  • dns_resolution_binding_mode (Array[String]) (defaults to: nil)

    Filters the collection to endpoint gateways with a ‘dns_resolution_binding_mode` property matching one of the specified comma-separated values.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
# File 'lib/ibm_vpc/vpc_v1.rb', line 3817

def list_endpoint_gateways(name: nil, start: nil, limit: nil, resource_group_id: nil, lifecycle_state: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, dns_resolution_binding_mode: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_endpoint_gateways")
  headers.merge!(sdk_headers)
  lifecycle_state *= "," unless lifecycle_state.nil?
  dns_resolution_binding_mode *= "," unless dns_resolution_binding_mode.nil?

  params = {
    "version" => @version,
    "generation" => @generation,
    "name" => name,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "lifecycle_state" => lifecycle_state,
    "vpc.id" => vpc_id,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_name,
    "dns_resolution_binding_mode" => dns_resolution_binding_mode
  }

  method_url = "/endpoint_gateways"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_floating_ips(start: nil, limit: nil, resource_group_id: nil, sort: nil, target_id: nil, target_crn: nil, target_name: nil, target_resource_type: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List floating IPs. This request lists floating IPs in the region. Floating IPs allow inbound and

outbound traffic from the Internet to an instance.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • target_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.id` property matching the specified identifier.

  • target_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.crn` property matching the specified CRN.

  • target_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.name` property matching the exact specified name.

  • target_resource_type (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.resource_type` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
# File 'lib/ibm_vpc/vpc_v1.rb', line 4515

def list_floating_ips(start: nil, limit: nil, resource_group_id: nil, sort: nil, target_id: nil, target_crn: nil, target_name: nil, target_resource_type: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_floating_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "sort" => sort,
    "target.id" => target_id,
    "target.crn" => target_crn,
    "target.name" => target_name,
    "target.resource_type" => target_resource_type
  }

  method_url = "/floating_ips"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_flow_log_collectors(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, target_id: nil, target_resource_type: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List flow log collectors. This request lists flow log collectors in the region. A [flow log

collector](https://cloud.ibm.com/docs/vpc?topic=vpc-flow-logs) summarizes TCP and
UDP data sent over the instance network interfaces and instance network
attachments contained within its target. The collected flow logs are written to a
cloud object storage bucket, where they can be
[viewed](https://cloud.ibm.com/docs/vpc?topic=vpc-fl-analyze).

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • vpc_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.id` property matching the specified identifier.

  • vpc_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.crn` property matching the specified CRN.

  • vpc_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.name` property matching the exact specified name.

  • target_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.id` property matching the specified identifier.

  • target_resource_type (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.resource_type` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
# File 'lib/ibm_vpc/vpc_v1.rb', line 4733

def list_flow_log_collectors(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, target_id: nil, target_resource_type: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_flow_log_collectors")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "vpc.id" => vpc_id,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_name,
    "target.id" => target_id,
    "target.resource_type" => target_resource_type
  }

  method_url = "/flow_log_collectors"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_ike_policies(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List IKE policies. This request lists IKE policies in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
# File 'lib/ibm_vpc/vpc_v1.rb', line 19151

def list_ike_policies(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ike_policies")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/ike_policies"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_ike_policy_connections(id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List VPN gateway connections that use a specified IKE policy. This request lists VPN gateway connections that use an IKE policy.

Parameters:

  • id (String)

    The IKE policy identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
# File 'lib/ibm_vpc/vpc_v1.rb', line 19363

def list_ike_policy_connections(id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ike_policy_connections")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/ike_policies/%s/connections" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_image_bare_metal_server_profiles(id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List bare metal server profiles compatible with an image. This request lists bare metal server profiles compatible with an image’s

`allowed_use.bare_metal_server`, `operating_system.architecture` and
`user_data_format` properties, sorted by ascending `name` property values.

Parameters:

  • id (String)

    The image identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
# File 'lib/ibm_vpc/vpc_v1.rb', line 5352

def list_image_bare_metal_server_profiles(id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_image_bare_metal_server_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/images/%s/bare_metal_server_profiles" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_image_export_jobs(image_id:, name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List export jobs for an image. This request lists export jobs for an image. Each job tracks the exporting of the

image to another location, such as a bucket within cloud object storage.

The jobs will be sorted by their `created_at` property values, with newest jobs
first. Jobs with identical `created_at` property values will in turn be sorted by
ascending
`name` property values.

Parameters:

  • image_id (String)

    The image identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
# File 'lib/ibm_vpc/vpc_v1.rb', line 5526

def list_image_export_jobs(image_id:, name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("image_id must be provided") if image_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_image_export_jobs")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "name" => name
  }

  method_url = "/images/%s/export_jobs" % [ERB::Util.url_encode(image_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_image_instance_profiles(id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List instance profiles compatible with an image. This request lists instance profiles compatible with an image’s

`allowed_use.instance`, `operating_system.architecture` and
`user_data_format` properties, sorted by ascending `name` property values.

Parameters:

  • id (String)

    The image identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
# File 'lib/ibm_vpc/vpc_v1.rb', line 5437

def list_image_instance_profiles(id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_image_instance_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/images/%s/instance_profiles" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, status: nil, visibility: nil, user_data_format: nil, remote_account_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List images. This request lists images available in the region. An image provides source data

for a volume. Images are either system-provided, or created from another source,
such as importing from Cloud Object Storage.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • status (Array[String]) (defaults to: nil)

    Filters the collection to images with a ‘status` property matching one of the specified comma-separated values.

  • visibility (String) (defaults to: nil)

    Filters the collection to images with a ‘visibility` property matching the specified value.

  • user_data_format (Array[String]) (defaults to: nil)

    Filters the collection to images with a ‘user_data_format` property matching one of the specified comma-separated values.

  • remote_account_id (String) (defaults to: nil)

    Filters the collection to images with a ‘remote.account.id` property matching the specified account identifier.

    This parameter also supports the values null and not:null which filter the collection to resources which have no remote account identifier or any remote account identifier, respectively.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
# File 'lib/ibm_vpc/vpc_v1.rb', line 5141

def list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, status: nil, visibility: nil, user_data_format: nil, remote_account_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_images")
  headers.merge!(sdk_headers)
  status *= "," unless status.nil?
  user_data_format *= "," unless user_data_format.nil?

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "status" => status,
    "visibility" => visibility,
    "user_data_format" => user_data_format,
    "remote.account.id" => 
  }

  method_url = "/images"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_cluster_network_attachments(instance_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List cluster network attachments on an instance. This request lists cluster network attachments on an instance. A cluster network

attachment represents a device on the instance to which a cluster network
interface is attached.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
# File 'lib/ibm_vpc/vpc_v1.rb', line 7570

def list_instance_cluster_network_attachments(instance_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_cluster_network_attachments")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/instances/%s/cluster_network_attachments" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_disks(instance_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List disks on an instance. This request lists disks on an instance. A disk is a block device that is locally

attached to the instance's physical host and is also referred to as instance
storage. By default, the listed disks are sorted by their `created_at` property
values, with the newest disk first.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
# File 'lib/ibm_vpc/vpc_v1.rb', line 7861

def list_instance_disks(instance_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_disks")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/disks" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_group_manager_actions(instance_group_id:, instance_group_manager_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List actions for an instance group manager. This request lists instance group actions for an instance group manager.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
# File 'lib/ibm_vpc/vpc_v1.rb', line 6299

def list_instance_group_manager_actions(instance_group_id:, instance_group_manager_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_group_manager_actions")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/instance_groups/%s/managers/%s/actions" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_group_manager_policies(instance_group_id:, instance_group_manager_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List policies for an instance group manager. This request lists policies for an instance group manager.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
# File 'lib/ibm_vpc/vpc_v1.rb', line 6518

def list_instance_group_manager_policies(instance_group_id:, instance_group_manager_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_group_manager_policies")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/instance_groups/%s/managers/%s/policies" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_group_managers(instance_group_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List managers for an instance group. This request lists managers for an instance group.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
# File 'lib/ibm_vpc/vpc_v1.rb', line 6094

def list_instance_group_managers(instance_group_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_group_managers")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/instance_groups/%s/managers" % [ERB::Util.url_encode(instance_group_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_group_memberships(instance_group_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List memberships for an instance group. This request lists instance group memberships for an instance group.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
# File 'lib/ibm_vpc/vpc_v1.rb', line 6773

def list_instance_group_memberships(instance_group_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_group_memberships")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/instance_groups/%s/memberships" % [ERB::Util.url_encode(instance_group_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_groups(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List instance groups. This request lists instance groups in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
# File 'lib/ibm_vpc/vpc_v1.rb', line 5827

def list_instance_groups(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_groups")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/instance_groups"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_network_attachments(instance_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List network attachments on an instance. This request lists network attachments on an instance. A network attachment

represents a device on the instance to which a virtual network interface is
attached.

The network attachments will be sorted by their `created_at` property values, with
newest network attachments first. Network attachments with identical `created_at`
property values will in turn be sorted by ascending `name` property values.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
# File 'lib/ibm_vpc/vpc_v1.rb', line 7986

def list_instance_network_attachments(instance_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_network_attachments")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_attachments" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_network_interface_floating_ips(instance_id:, network_interface_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List floating IPs associated with an instance network interface. This request lists floating IPs associated with an instance network interface.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • network_interface_id (String)

    The instance network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
# File 'lib/ibm_vpc/vpc_v1.rb', line 8478

def list_instance_network_interface_floating_ips(instance_id:, network_interface_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_network_interface_floating_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_interfaces/%s/floating_ips" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(network_interface_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_network_interface_ips(instance_id:, network_interface_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List the primary reserved IP for an instance network interface. This request lists the primary reserved IP for an instance network interface.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • network_interface_id (String)

    The instance network interface identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
# File 'lib/ibm_vpc/vpc_v1.rb', line 8650

def list_instance_network_interface_ips(instance_id:, network_interface_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_network_interface_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/instances/%s/network_interfaces/%s/ips" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(network_interface_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_network_interfaces(instance_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List network interfaces on an instance. This request lists network interfaces on an instance. An instance network

interface is an abstract representation of a network device and attaches an
instance to a single subnet. Each network interface on an instance can attach to
any subnet in the zone, including subnets that are already attached to the
instance. Multiple network interfaces on the instance may also attach to the same
subnet.

If this instance has network attachments, each returned network interface is a
[read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
# File 'lib/ibm_vpc/vpc_v1.rb', line 8219

def list_instance_network_interfaces(instance_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_network_interfaces")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_interfaces" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_profilesIBMCloudSdkCore::DetailedResponse

List instance profiles. This request lists provisionable [instance

profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) in the region. An
instance profile specifies the performance characteristics and pricing model for
an instance.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
# File 'lib/ibm_vpc/vpc_v1.rb', line 7136

def list_instance_profiles
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance/profiles"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_templatesIBMCloudSdkCore::DetailedResponse

List instance templates. This request lists instance templates in the region.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
# File 'lib/ibm_vpc/vpc_v1.rb', line 6937

def list_instance_templates
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_templates")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instance/templates"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instance_volume_attachments(instance_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List volumes attachments on an instance. This request lists volume attachments on an instance. A volume attachment connects

a volume to an instance. Each instance may have many volume attachments but each
volume attachment connects exactly one instance to exactly one volume.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
# File 'lib/ibm_vpc/vpc_v1.rb', line 8732

def list_instance_volume_attachments(instance_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_volume_attachments")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/volume_attachments" % [ERB::Util.url_encode(instance_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, availability_class: nil, cluster_network_id: nil, cluster_network_crn: nil, cluster_network_name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: nil, instance_group_membership_instance_group_id: nil, instance_group_membership_instance_group_crn: nil, placement_group_id: nil, placement_group_crn: nil, placement_group_name: nil, reservation_affinity_policy: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List instances. This request lists instances in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • availability_class (String) (defaults to: nil)

    Filters the collection to instances with an ‘availability.class` property matching the specified value.

  • cluster_network_id (String) (defaults to: nil)

    Filters the collection to instances with a ‘cluster_network.id` property matching the specified identifier.

  • cluster_network_crn (String) (defaults to: nil)

    Filters the collection to instances with a ‘cluster_network.crn` property matching the specified CRN.

  • cluster_network_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘cluster_network.name` property matching the exact specified name.

  • dedicated_host_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘dedicated_host.id` property matching the specified identifier.

  • dedicated_host_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘dedicated_host.crn` property matching the specified CRN.

  • dedicated_host_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘dedicated_host.name` property matching the exact specified name.

  • instance_group_membership_instance_group_id (String) (defaults to: nil)

    Filters the collection to instances with an ‘instance_group_membership.instance_group.id` property matching the specified instance group identifier.

  • instance_group_membership_instance_group_crn (String) (defaults to: nil)

    Filters the collection to instances with an ‘instance_group_membership.instance_group.crn` property matching the specified instance group CRN.

  • placement_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘placement_target.id` property matching the specified placement group identifier.

  • placement_group_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘placement_target.crn` property matching the specified placement group CRN.

  • placement_group_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘placement_target.name` property matching the exact specified placement group name.

  • reservation_affinity_policy (String) (defaults to: nil)

    Filters the collection to instances with a ‘reservation_affinity.policy` property matching the specified value.

  • reservation_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘reservation.id` property matching the specified identifier.

  • reservation_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘reservation.crn` property matching the specified identifier.

  • reservation_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘reservation.name` property matching the specified identifier.

  • vpc_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.id` property matching the specified identifier.

  • vpc_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.crn` property matching the specified CRN.

  • vpc_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
# File 'lib/ibm_vpc/vpc_v1.rb', line 7249

def list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, availability_class: nil, cluster_network_id: nil, cluster_network_crn: nil, cluster_network_name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: nil, instance_group_membership_instance_group_id: nil, instance_group_membership_instance_group_crn: nil, placement_group_id: nil, placement_group_crn: nil, placement_group_name: nil, reservation_affinity_policy: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instances")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "availability.class" => availability_class,
    "cluster_network.id" => cluster_network_id,
    "cluster_network.crn" => cluster_network_crn,
    "cluster_network.name" => cluster_network_name,
    "dedicated_host.id" => dedicated_host_id,
    "dedicated_host.crn" => dedicated_host_crn,
    "dedicated_host.name" => dedicated_host_name,
    "instance_group_membership.instance_group.id" => instance_group_membership_instance_group_id,
    "instance_group_membership.instance_group.crn" => instance_group_membership_instance_group_crn,
    "placement_group.id" => placement_group_id,
    "placement_group.crn" => placement_group_crn,
    "placement_group.name" => placement_group_name,
    "reservation_affinity.policy" => reservation_affinity_policy,
    "reservation.id" => reservation_id,
    "reservation.crn" => reservation_crn,
    "reservation.name" => reservation_name,
    "vpc.id" => vpc_id,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_name
  }

  method_url = "/instances"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_ipsec_policies(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List IPsec policies. This request lists IPsec policies in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
# File 'lib/ibm_vpc/vpc_v1.rb', line 19401

def list_ipsec_policies(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ipsec_policies")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/ipsec_policies"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_ipsec_policy_connections(id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List VPN gateway connections that use a specified IPsec policy. This request lists VPN gateway connections that use an IPsec policy.

Parameters:

  • id (String)

    The IPsec policy identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
# File 'lib/ibm_vpc/vpc_v1.rb', line 19622

def list_ipsec_policy_connections(id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ipsec_policy_connections")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/ipsec_policies/%s/connections" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_keys(start: nil, limit: nil, resource_group_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List keys. This request lists keys in the region. A key contains a public SSH key which may

be installed on instances when they are created. Private keys are not stored.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
# File 'lib/ibm_vpc/vpc_v1.rb', line 8956

def list_keys(start: nil, limit: nil, resource_group_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_keys")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id
  }

  method_url = "/keys"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_load_balancer_listener_policies(load_balancer_id:, listener_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List policies for a load balancer listener. This request lists policies for a load balancer listener. A policy consists of

rules to match against each incoming request, and an action to apply to the
request if a rule matches.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
# File 'lib/ibm_vpc/vpc_v1.rb', line 9841

def list_load_balancer_listener_policies(load_balancer_id:, listener_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancer_listener_policies")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners/%s/policies" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_load_balancer_listener_policy_rules(load_balancer_id:, listener_id:, policy_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List rules of a load balancer listener policy. This request lists rules of a load balancer listener policy.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • policy_id (String)

    The policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
# File 'lib/ibm_vpc/vpc_v1.rb', line 10094

def list_load_balancer_listener_policy_rules(load_balancer_id:, listener_id:, policy_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("policy_id must be provided") if policy_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancer_listener_policy_rules")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners/%s/policies/%s/rules" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id), ERB::Util.url_encode(policy_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_load_balancer_listeners(load_balancer_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List listeners for a load balancer. This request lists listeners for a load balancer.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
# File 'lib/ibm_vpc/vpc_v1.rb', line 9536

def list_load_balancer_listeners(load_balancer_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancer_listeners")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/listeners" % [ERB::Util.url_encode(load_balancer_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_load_balancer_pool_members(load_balancer_id:, pool_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List members of a load balancer pool. This request lists members of a load balancer pool.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • pool_id (String)

    The pool identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
# File 'lib/ibm_vpc/vpc_v1.rb', line 10604

def list_load_balancer_pool_members(load_balancer_id:, pool_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("pool_id must be provided") if pool_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancer_pool_members")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/pools/%s/members" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(pool_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_load_balancer_pools(load_balancer_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List pools of a load balancer. This request lists pools of a load balancer.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
# File 'lib/ibm_vpc/vpc_v1.rb', line 10349

def list_load_balancer_pools(load_balancer_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancer_pools")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/load_balancers/%s/pools" % [ERB::Util.url_encode(load_balancer_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_load_balancer_profiles(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List load balancer profiles. This request lists load balancer profiles available in the region. A load balancer

profile specifies the performance characteristics and pricing model for a load
balancer.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
# File 'lib/ibm_vpc/vpc_v1.rb', line 9168

def list_load_balancer_profiles(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancer_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/load_balancer/profiles"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_load_balancers(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List load balancers. This request lists load balancers in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
# File 'lib/ibm_vpc/vpc_v1.rb', line 9239

def list_load_balancers(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancers")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/load_balancers"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_network_acl_rules(network_acl_id:, start: nil, limit: nil, direction: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List rules for a network ACL. This request lists rules for a network ACL. These rules can allow or deny traffic

between a source CIDR block and a destination CIDR block over a particular
protocol and port range.

Parameters:

  • network_acl_id (String)

    The network ACL identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • direction (String) (defaults to: nil)

    Filters the collection to rules with a ‘direction` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
# File 'lib/ibm_vpc/vpc_v1.rb', line 11107

def list_network_acl_rules(network_acl_id:, start: nil, limit: nil, direction: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_network_acl_rules")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "direction" => direction
  }

  method_url = "/network_acls/%s/rules" % [ERB::Util.url_encode(network_acl_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_network_acls(start: nil, limit: nil, resource_group_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List network ACLs. This request lists network ACLs in the region. A network ACL defines a set of

packet filtering rules for traffic in and out of the subnets the network ACL is
attached to. No traffic is allowed by default. Both allow and deny rules can be
defined, and rules are stateless so that reverse traffic in response to allowed
traffic is not automatically allowed.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
# File 'lib/ibm_vpc/vpc_v1.rb', line 10909

def list_network_acls(start: nil, limit: nil, resource_group_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_network_acls")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id
  }

  method_url = "/network_acls"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_network_interface_floating_ips(virtual_network_interface_id:, start: nil, limit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List floating IPs associated with a virtual network interface. This request lists floating IPs associated with a virtual network interface.

Parameters:

  • virtual_network_interface_id (String)

    The virtual network interface identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-name` sorts the collection by the `name` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
# File 'lib/ibm_vpc/vpc_v1.rb', line 16475

def list_network_interface_floating_ips(virtual_network_interface_id:, start: nil, limit: nil, sort: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("virtual_network_interface_id must be provided") if virtual_network_interface_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_network_interface_floating_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "sort" => sort
  }

  method_url = "/virtual_network_interfaces/%s/floating_ips" % [ERB::Util.url_encode(virtual_network_interface_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_operating_systems(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List operating systems. This request lists operating systems in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
# File 'lib/ibm_vpc/vpc_v1.rb', line 5753

def list_operating_systems(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_operating_systems")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/operating_systems"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_placement_groups(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List placement groups. This request lists placement groups in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
# File 'lib/ibm_vpc/vpc_v1.rb', line 11317

def list_placement_groups(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_placement_groups")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/placement_groups"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_private_path_service_gateway_account_policies(private_path_service_gateway_id:, start: nil, limit: nil, account_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List account policies for a private path service gateway. This request lists account policies for a private path service gateway. Each

policy defines how requests to use the private path service gateway from that
account will be handled.

The account policies will be sorted by their `created_at` property values, with
newest account policies first. Account policies with identical `created_at`
property values will in turn be sorted by ascending `id` property values.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • account_id (String) (defaults to: nil)

    Filters the collection to resources with an ‘account.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
# File 'lib/ibm_vpc/vpc_v1.rb', line 11766

def (private_path_service_gateway_id:, start: nil, limit: nil, account_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_private_path_service_gateway_account_policies")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "account.id" => 
  }

  method_url = "/private_path_service_gateways/%s/account_policies" % [ERB::Util.url_encode(private_path_service_gateway_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_private_path_service_gateway_endpoint_gateway_bindings(private_path_service_gateway_id:, start: nil, limit: nil, status: nil, account_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List endpoint gateway bindings for a private path service gateway. This request lists endpoint gateway bindings for a private path service gateway.

Each endpoint gateway binding is implicitly created when an endpoint gateway is
created targeting the private path service gateway. The associated account policy
is applied to all new endpoint gateway bindings. If an associated account policy
doesn't exist, the private path service gateway's `default_access_policy` is used.

The endpoint gateway bindings will be sorted by their `created_at` property
values, with newest endpoint gateway bindings first. Endpoint gateway bindings
with identical
`created_at` property values will in turn be sorted by ascending `name` property
values.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • status (String) (defaults to: nil)

    Filters the collection to endpoint gateway bindings with a ‘status` property matching the specified value.

  • account_id (String) (defaults to: nil)

    Filters the collection to resources with an ‘account.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
# File 'lib/ibm_vpc/vpc_v1.rb', line 12008

def list_private_path_service_gateway_endpoint_gateway_bindings(private_path_service_gateway_id:, start: nil, limit: nil, status: nil, account_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_private_path_service_gateway_endpoint_gateway_bindings")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "status" => status,
    "account.id" => 
  }

  method_url = "/private_path_service_gateways/%s/endpoint_gateway_bindings" % [ERB::Util.url_encode(private_path_service_gateway_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_private_path_service_gateways(start: nil, limit: nil, resource_group_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List private path service gateways. This request lists private path service gateways in the region. Private path

service gateways allow
[service
providers](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components)
to make their services available using
[private path
connectivity](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components).
Private path service gateways are used to facilitate and manage the private path
connectivity between private path network load balancers and their associated
endpoint gateways.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
# File 'lib/ibm_vpc/vpc_v1.rb', line 11533

def list_private_path_service_gateways(start: nil, limit: nil, resource_group_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_private_path_service_gateways")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id
  }

  method_url = "/private_path_service_gateways"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_public_address_ranges(start: nil, limit: nil, resource_group_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List public address ranges. This request lists [public address

ranges](https://cloud.ibm.com/docs/vpc?topic=vpc-about-par) in the region. A
public address range is a contiguous block of public IP addresses that can be
bound to a `target` that specifies a `vpc` and a `zone`. Incoming traffic for
these IP addresses will be routed according to the VPC's ingress routing table.

The public address ranges will be sorted by their `created_at` property values,
with newest public address ranges first. Public address ranges with identical
`created_at` property values will in turn be sorted by ascending `id` property
values.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
# File 'lib/ibm_vpc/vpc_v1.rb', line 12336

def list_public_address_ranges(start: nil, limit: nil, resource_group_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_public_address_ranges")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id
  }

  method_url = "/public_address_ranges"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_public_gateways(start: nil, limit: nil, resource_group_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List public gateways. This request lists public gateways in the region. A public gateway is a virtual

network device associated with a VPC, which allows access to the Internet. A
public gateway resides in a zone and can be connected to subnets in the same zone
only.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
# File 'lib/ibm_vpc/vpc_v1.rb', line 12554

def list_public_gateways(start: nil, limit: nil, resource_group_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_public_gateways")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id
  }

  method_url = "/public_gateways"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_region_zones(region_name:) ⇒ IBMCloudSdkCore::DetailedResponse

List zones in a region. This request lists zones in a region. Zones represent logically-isolated data

centers with high-bandwidth and low-latency interconnects to other zones in the
same region. Faults in a zone do not affect other zones.

Parameters:

  • region_name (String)

    The region name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
# File 'lib/ibm_vpc/vpc_v1.rb', line 5045

def list_region_zones(region_name:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("region_name must be provided") if region_name.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_region_zones")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/regions/%s/zones" % [ERB::Util.url_encode(region_name)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_regionsIBMCloudSdkCore::DetailedResponse

List regions. This request lists regions. Each region is a separate geographic area that

contains multiple isolated zones. Resources can be provisioned into one or more
zones in a region. Each zone is isolated, but connected to other zones in the same
region with low-latency and high-bandwidth links. Regions represent the top-level
of fault isolation available. Resources deployed within a single region also
benefit from the low latency afforded by geographic proximity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
# File 'lib/ibm_vpc/vpc_v1.rb', line 4975

def list_regions
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_regions")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/regions"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_reservations(start: nil, limit: nil, name: nil, profile_resource_type: nil, affinity_policy: nil, resource_group_id: nil, zone_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List reservations. This request lists reservations in the region. A reservation provides reserved

capacity for a specified profile in a specified zone. A reservation can also
include a long-term committed use discount.

The reservations will be sorted by their `created_at` property values, with newest
reservations first. Reservations with identical `created_at` property values will
in turn be sorted by ascending `name` property values.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • profile_resource_type (String) (defaults to: nil)

    Filters the collection of resources with a ‘profile.resource_type` property matching the specified value.

  • affinity_policy (String) (defaults to: nil)

    Filters the collection to reservations with an ‘affinity_policy` property matching the specified value.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • zone_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘zone.name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
# File 'lib/ibm_vpc/vpc_v1.rb', line 12786

def list_reservations(start: nil, limit: nil, name: nil, profile_resource_type: nil, affinity_policy: nil, resource_group_id: nil, zone_name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_reservations")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "name" => name,
    "profile.resource_type" => profile_resource_type,
    "affinity_policy" => affinity_policy,
    "resource_group.id" => resource_group_id,
    "zone.name" => zone_name
  }

  method_url = "/reservations"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_security_group_rules(security_group_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List rules in a security group. This request lists rules in a security group. These rules define what traffic the

security group permits. Security group rules are stateful, such that reverse
traffic in response to allowed traffic is automatically permitted.

Parameters:

  • security_group_id (String)

    The security group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
# File 'lib/ibm_vpc/vpc_v1.rb', line 13274

def list_security_group_rules(security_group_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_security_group_rules")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/security_groups/%s/rules" % [ERB::Util.url_encode(security_group_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_security_group_targets(security_group_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List targets associated with a security group. This request lists targets associated with a security group, to which the rules in

the security group are applied.

Parameters:

  • security_group_id (String)

    The security group identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
# File 'lib/ibm_vpc/vpc_v1.rb', line 13489

def list_security_group_targets(security_group_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_security_group_targets")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/security_groups/%s/targets" % [ERB::Util.url_encode(security_group_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_security_groups(start: nil, limit: nil, resource_group_id: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List security groups. This request lists security groups in the region. A security group defines a set

of packet filtering rules to allow traffic in and out of the resources targeted by
the security group. No traffic is allowed by default. Security group rules are
stateful so that reverse traffic in response to allowed traffic is automatically
allowed.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • vpc_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.id` property matching the specified identifier.

  • vpc_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.crn` property matching the specified CRN.

  • vpc_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
# File 'lib/ibm_vpc/vpc_v1.rb', line 13061

def list_security_groups(start: nil, limit: nil, resource_group_id: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_security_groups")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "vpc.id" => vpc_id,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_name
  }

  method_url = "/security_groups"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_share_accessor_bindings(id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List accessor bindings for a file share. This request lists accessor bindings for a share. Each accessor binding identifies

a resource (possibly in another account) with access to this file share including
its snapshots.

The share accessor bindings will be sorted by their `created_at` property values,
with newest bindings first.

Parameters:

  • id (String)

    The file share identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
# File 'lib/ibm_vpc/vpc_v1.rb', line 13977

def list_share_accessor_bindings(id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_share_accessor_bindings")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/shares/%s/accessor_bindings" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_share_mount_targets(share_id:, name: nil, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List mount targets for a file share. This request lists mount targets for a file share. A mount target is a network

endpoint at which a file share may be mounted. The file share can be mounted by
clients in the same VPC and zone after creating share mount targets.

The share mount targets will be sorted by their `created_at` property values, with
newest targets first.

Parameters:

  • share_id (String)

    The file share identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
# File 'lib/ibm_vpc/vpc_v1.rb', line 14160

def list_share_mount_targets(share_id:, name: nil, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_share_mount_targets")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "name" => name,
    "start" => start,
    "limit" => limit
  }

  method_url = "/shares/%s/mount_targets" % [ERB::Util.url_encode(share_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_share_profiles(start: nil, limit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List file share profiles. This request lists [file share

profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles)
available in the region. A file share profile specifies the performance
characteristics and pricing model for a file share.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
# File 'lib/ibm_vpc/vpc_v1.rb', line 13676

def list_share_profiles(start: nil, limit: nil, sort: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_share_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "sort" => sort
  }

  method_url = "/share/profiles"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_share_snapshots(share_id:, backup_policy_plan_id: nil, name: nil, start: nil, limit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List file share snapshots. This request lists snapshots for the specified file share, or across all

accessible file shares. A snapshot preserves the data of a share at the time the
snapshot was captured.

If the file share is a replica, the list will contain snapshots corresponding to
snapshots on the source.

Parameters:

  • share_id (String)

    The file share identifier, or ‘-` to wildcard all accessible file shares.

  • backup_policy_plan_id (String) (defaults to: nil)

    Filters the collection to backup policy jobs with a ‘backup_policy_plan.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
# File 'lib/ibm_vpc/vpc_v1.rb', line 14390

def list_share_snapshots(share_id:, backup_policy_plan_id: nil, name: nil, start: nil, limit: nil, sort: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_share_snapshots")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "backup_policy_plan.id" => backup_policy_plan_id,
    "name" => name,
    "start" => start,
    "limit" => limit,
    "sort" => sort
  }

  method_url = "/shares/%s/snapshots" % [ERB::Util.url_encode(share_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_shares(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, replication_role: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List file shares. This request lists file shares in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • replication_role (String) (defaults to: nil)

    Filters the collection to file shares with a ‘replication_role` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
# File 'lib/ibm_vpc/vpc_v1.rb', line 13760

def list_shares(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, replication_role: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_shares")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "sort" => sort,
    "replication_role" => replication_role
  }

  method_url = "/shares"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_snapshot_clones(id:) ⇒ IBMCloudSdkCore::DetailedResponse

List clones for a snapshot. This request lists clones for a snapshot. Use a clone to quickly restore a

snapshot within the clone's zone.

Parameters:

  • id (String)

    The snapshot identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
# File 'lib/ibm_vpc/vpc_v1.rb', line 15235

def list_snapshot_clones(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_snapshot_clones")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/snapshots/%s/clones" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_snapshot_consistency_groups(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, backup_policy_plan_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List snapshot consistency groups. This request lists snapshot consistency groups in the region. A snapshot

consistency group is a collection of individual snapshots taken at the same time.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • backup_policy_plan_id (String) (defaults to: nil)

    Filters the collection to backup policy jobs with a ‘backup_policy_plan.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
# File 'lib/ibm_vpc/vpc_v1.rb', line 14725

def list_snapshot_consistency_groups(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, backup_policy_plan_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_snapshot_consistency_groups")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "sort" => sort,
    "backup_policy_plan.id" => backup_policy_plan_id
  }

  method_url = "/snapshot_consistency_groups"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_snapshot_instance_profiles(id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List instance profiles compatible with a snapshot. This request lists instance profiles compatible with a snapshot’s

`allowed_use.instance`, `operating_system.architecture` and
`operating_system.user_data_format` properties, sorted by ascending `name`
property values. The specified snapshot must be bootable.

Parameters:

  • id (String)

    The snapshot identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
# File 'lib/ibm_vpc/vpc_v1.rb', line 15393

def list_snapshot_instance_profiles(id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_snapshot_instance_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/snapshots/%s/instance_profiles" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_snapshots(start: nil, limit: nil, tag: nil, resource_group_id: nil, name: nil, source_volume_id: nil, source_volume_crn: nil, source_image_id: nil, source_image_crn: nil, sort: nil, backup_policy_plan_id: nil, copies_id: nil, copies_name: nil, copies_crn: nil, copies_remote_region_name: nil, source_snapshot_id: nil, source_snapshot_remote_region_name: nil, source_volume_remote_region_name: nil, source_image_remote_region_name: nil, clones_zone_name: nil, snapshot_consistency_group_id: nil, snapshot_consistency_group_crn: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List snapshots. This request lists snapshots in the region. A snapshot preserves the data of a

volume at the time the snapshot is created.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • tag (String) (defaults to: nil)

    Filters the collection to resources with an item in the ‘tags` property matching the exact specified tag.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • source_volume_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘source_volume.id` property matching the specified identifier.

  • source_volume_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘source_volume.crn` property matching the specified CRN.

  • source_image_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘source_image.id` property matching the specified identifier.

    This parameter also supports the values ‘null` and `not:null` which filter the collection to resources which have no source image or any existent source image, respectively.

  • source_image_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘source_image.crn` property matching the specified CRN.

    This parameter also supports the values ‘null` and `not:null` which filter the collection to resources which have no source image or any existent source image, respectively.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • backup_policy_plan_id (String) (defaults to: nil)

    Filters the collection to backup policy jobs with a ‘backup_policy_plan.id` property matching the specified identifier.

  • copies_id (String) (defaults to: nil)

    Filters the collection to snapshots with an item in the ‘copies` property with an `id` property matching the specified identifier.

  • copies_name (String) (defaults to: nil)

    Filters the collection to snapshots with an item in the ‘copies` property with a `name` property matching the exact specified name.

  • copies_crn (String) (defaults to: nil)

    Filters the collection to snapshots with an item in the ‘copies` property with a `crn` property matching the specified CRN.

  • copies_remote_region_name (String) (defaults to: nil)

    Filters the collection to snapshots with an item in the ‘copies` property with a `remote.region.name` property matching the exact specified name.

  • source_snapshot_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘source_snapshot.id` property matching the specified identifier.

  • source_snapshot_remote_region_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘source_snapshot.remote.region.name` property matching the exact specified name.

  • source_volume_remote_region_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘source_volume.remote.region.name` property matching the exact specified name.

  • source_image_remote_region_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘source_image.remote.region.name` property matching the exact specified name.

  • clones_zone_name (String) (defaults to: nil)

    Filters the collection to snapshots with an item in the ‘clones` property with a `zone.name` property matching the exact specified name.

  • snapshot_consistency_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘snapshot_consistency_group.id` property matching the specified identifier.

  • snapshot_consistency_group_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘snapshot_consistency_group.crn` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
# File 'lib/ibm_vpc/vpc_v1.rb', line 15018

def list_snapshots(start: nil, limit: nil, tag: nil, resource_group_id: nil, name: nil, source_volume_id: nil, source_volume_crn: nil, source_image_id: nil, source_image_crn: nil, sort: nil, backup_policy_plan_id: nil, copies_id: nil, copies_name: nil, copies_crn: nil, copies_remote_region_name: nil, source_snapshot_id: nil, source_snapshot_remote_region_name: nil, source_volume_remote_region_name: nil, source_image_remote_region_name: nil, clones_zone_name: nil, snapshot_consistency_group_id: nil, snapshot_consistency_group_crn: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_snapshots")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "tag" => tag,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "source_volume.id" => source_volume_id,
    "source_volume.crn" => source_volume_crn,
    "source_image.id" => source_image_id,
    "source_image.crn" => source_image_crn,
    "sort" => sort,
    "backup_policy_plan.id" => backup_policy_plan_id,
    "copies[].id" => copies_id,
    "copies[].name" => copies_name,
    "copies[].crn" => copies_crn,
    "copies[].remote.region.name" => copies_remote_region_name,
    "source_snapshot.id" => source_snapshot_id,
    "source_snapshot.remote.region.name" => source_snapshot_remote_region_name,
    "source_volume.remote.region.name" => source_volume_remote_region_name,
    "source_image.remote.region.name" => source_image_remote_region_name,
    "clones[].zone.name" => clones_zone_name,
    "snapshot_consistency_group.id" => snapshot_consistency_group_id,
    "snapshot_consistency_group.crn" => snapshot_consistency_group_crn
  }

  method_url = "/snapshots"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_subnet_reserved_ips(subnet_id:, start: nil, limit: nil, sort: nil, target_id: nil, target_crn: nil, target_name: nil, target_resource_type: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List reserved IPs in a subnet. This request lists reserved IPs in a subnet. A reserved IP resource will exist for

every address in the subnet which is not available for use.

Parameters:

  • subnet_id (String)

    The subnet identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • target_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.id` property matching the specified identifier.

  • target_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.crn` property matching the specified CRN.

  • target_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.name` property matching the exact specified name.

  • target_resource_type (String) (defaults to: nil)

    Filters the collection to resources with a ‘target.resource_type` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
# File 'lib/ibm_vpc/vpc_v1.rb', line 15948

def list_subnet_reserved_ips(subnet_id:, start: nil, limit: nil, sort: nil, target_id: nil, target_crn: nil, target_name: nil, target_resource_type: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("subnet_id must be provided") if subnet_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_subnet_reserved_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "sort" => sort,
    "target.id" => target_id,
    "target.crn" => target_crn,
    "target.name" => target_name,
    "target.resource_type" => target_resource_type
  }

  method_url = "/subnets/%s/reserved_ips" % [ERB::Util.url_encode(subnet_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_subnets(start: nil, limit: nil, resource_group_id: nil, zone_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, routing_table_id: nil, routing_table_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List subnets. This request lists subnets in the region. Subnets are contiguous ranges of IP

addresses specified in CIDR block notation. Each subnet is within a particular
zone and cannot span multiple zones or regions.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • zone_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘zone.name` property matching the exact specified name.

  • vpc_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.id` property matching the specified identifier.

  • vpc_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.crn` property matching the specified CRN.

  • vpc_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.name` property matching the exact specified name.

  • routing_table_id (String) (defaults to: nil)

    Filters the collection to subnets with a ‘routing_table.id` property matching the specified identifier.

  • routing_table_name (String) (defaults to: nil)

    Filters the collection to subnets with a ‘routing_table.name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
# File 'lib/ibm_vpc/vpc_v1.rb', line 15450

def list_subnets(start: nil, limit: nil, resource_group_id: nil, zone_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, routing_table_id: nil, routing_table_name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_subnets")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "zone.name" => zone_name,
    "vpc.id" => vpc_id,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_name,
    "routing_table.id" => routing_table_id,
    "routing_table.name" => routing_table_name
  }

  method_url = "/subnets"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_virtual_network_interface_ips(virtual_network_interface_id:, start: nil, limit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List reserved IPs bound to a virtual network interface. This request lists reserved IPs bound to a virtual network interface.

Parameters:

  • virtual_network_interface_id (String)

    The virtual network interface identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-name` sorts the collection by the `name` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
# File 'lib/ibm_vpc/vpc_v1.rb', line 16654

def list_virtual_network_interface_ips(virtual_network_interface_id:, start: nil, limit: nil, sort: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("virtual_network_interface_id must be provided") if virtual_network_interface_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_virtual_network_interface_ips")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "sort" => sort
  }

  method_url = "/virtual_network_interfaces/%s/ips" % [ERB::Util.url_encode(virtual_network_interface_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_virtual_network_interfaces(start: nil, limit: nil, resource_group_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List virtual network interfaces. This request lists virtual network interfaces in the region. A virtual network

interface is a logical abstraction of a virtual network interface in a subnet, and
may be attached to a target resource.

The virtual network interfaces will be sorted by their `created_at` property
values, with newest virtual network interfaces first. Virtual network interfaces
with identical
`created_at` property values will in turn be sorted by ascending `name` property
values.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
# File 'lib/ibm_vpc/vpc_v1.rb', line 16197

def list_virtual_network_interfaces(start: nil, limit: nil, resource_group_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_virtual_network_interfaces")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id
  }

  method_url = "/virtual_network_interfaces"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_volume_instance_profiles(id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List instance profiles compatible with a volume. This request lists instance profiles compatible with a volume’s

`allowed_use.instance`, `operating_system.architecture` and
`operating_system.user_data_format` properties, sorted by ascending `name`
property values. The specified volume must be bootable (have an `operating_system`
property).

Parameters:

  • id (String)

    The volume identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
# File 'lib/ibm_vpc/vpc_v1.rb', line 17131

def list_volume_instance_profiles(id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_volume_instance_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/volumes/%s/instance_profiles" % [ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_volume_jobs(volume_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List jobs for a volume. This request lists jobs for a volume. Each job represents an action performed on

the volume and includes metadata such as:

- `job_type`: Currently, only the `migrate` job type is supported.
- `status`: Indicates the current state of the job (e.g., queued, running,
   succeeded, failed).

The jobs will be sorted by their `created_at` property values, with newest jobs
first.

Parameters:

  • volume_id (String)

    The volume identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
# File 'lib/ibm_vpc/vpc_v1.rb', line 17178

def list_volume_jobs(volume_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("volume_id must be provided") if volume_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_volume_jobs")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/volumes/%s/jobs" % [ERB::Util.url_encode(volume_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_volume_profiles(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List volume profiles. This request lists [volume

profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles)
available in the region. A volume profile specifies the performance
characteristics and pricing model for a volume.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
# File 'lib/ibm_vpc/vpc_v1.rb', line 16824

def list_volume_profiles(start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_volume_profiles")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/volume/profiles"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_volumes(start: nil, limit: nil, attachment_state: nil, encryption: nil, name: nil, operating_system_family: nil, operating_system_architecture: nil, storage_generation: nil, tag: nil, zone_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List volumes. This request lists volumes in the region. Volumes are network-connected block

storage devices that may be attached to one or more instances in the same region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • attachment_state (String) (defaults to: nil)

    Filters the collection to volumes with an ‘attachment_state` property matching the specified value.

  • encryption (String) (defaults to: nil)

    Filters the collection to resources with an ‘encryption` property matching the specified value.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • operating_system_family (String) (defaults to: nil)

    Filters the collection to resources with an ‘operating_system.family` property matching the specified operating system family.

    This parameter also supports the values ‘null` and `not:null` which filter the collection to resources which have no operating system or any operating system, respectively.

  • operating_system_architecture (String) (defaults to: nil)

    Filters the collection to resources with an ‘operating_system.architecture` property matching the specified operating system architecture.

    This parameter also supports the values ‘null` and `not:null` which filter the collection to resources which have no operating system or any operating system, respectively.

  • storage_generation (Fixnum) (defaults to: nil)

    Filters the collection to volumes with a ‘storage_generation` property matching the specified value.

  • tag (String) (defaults to: nil)

    Filters the collection to resources with an item in the ‘tags` property matching the exact specified tag.

  • zone_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘zone.name` property matching the exact specified name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
# File 'lib/ibm_vpc/vpc_v1.rb', line 16920

def list_volumes(start: nil, limit: nil, attachment_state: nil, encryption: nil, name: nil, operating_system_family: nil, operating_system_architecture: nil, storage_generation: nil, tag: nil, zone_name: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_volumes")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "attachment_state" => attachment_state,
    "encryption" => encryption,
    "name" => name,
    "operating_system.family" => operating_system_family,
    "operating_system.architecture" => operating_system_architecture,
    "storage_generation" => storage_generation,
    "tag" => tag,
    "zone.name" => zone_name
  }

  method_url = "/volumes"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpc_address_prefixes(vpc_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List address prefixes for a VPC. This request lists address pool prefixes for a VPC.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
# File 'lib/ibm_vpc/vpc_v1.rb', line 17798

def list_vpc_address_prefixes(vpc_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpc_address_prefixes")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/vpcs/%s/address_prefixes" % [ERB::Util.url_encode(vpc_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpc_dns_resolution_bindings(vpc_id:, sort: nil, start: nil, limit: nil, name: nil, vpc_crn: nil, vpc_name: nil, account_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List DNS resolution bindings for a VPC. This request lists DNS resolution bindings for a VPC. A DNS resolution binding

represents an association with another VPC for centralizing DNS name resolution.

If the VPC specified by the identifier in the URL is a DNS hub VPC (has
`dns.enable_hub` set to `true`) then there is one binding for each VPC bound to
the hub VPC. The endpoint gateways in the bound VPCs can allow (using
`dns_resolution_binding_mode`) the hub VPC to centralize resolution of their DNS
names.

If the VPC specified by the identifier in the URL is not a DNS hub VPC, then there
is at most one binding (to a hub VPC). The endpoint gateways in the VPC specified
by the identifier in the URL can allow (using `dns_resolution_binding_mode`) its
hub VPC to centralize resolution of their DNS names.

To make use of centralized DNS resolution, a VPC bound to a DNS hub VPC must
delegate DNS resolution to its hub VPC by setting `dns.resolver.type` to
`delegate`.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • vpc_crn (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.crn` property matching the specified CRN.

  • vpc_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.name` property matching the exact specified name.

  • account_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘vpc.remote.account.id` property matching the specified account identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
# File 'lib/ibm_vpc/vpc_v1.rb', line 18057

def list_vpc_dns_resolution_bindings(vpc_id:, sort: nil, start: nil, limit: nil, name: nil, vpc_crn: nil, vpc_name: nil, account_id: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpc_dns_resolution_bindings")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "sort" => sort,
    "start" => start,
    "limit" => limit,
    "name" => name,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_name,
    "account.id" => 
  }

  method_url = "/vpcs/%s/dns_resolution_bindings" % [ERB::Util.url_encode(vpc_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpc_routes(vpc_id:, zone_name: nil, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List routes in a VPC’s default routing table. This request lists routes in the VPC’s default routing table. Each route is

zone-specific and directs any packets matching its destination CIDR block to a
`next_hop` IP address. The most specific route matching a packet's destination
will be used. If multiple equally-specific routes exist, traffic will be
distributed across them.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • zone_name (String) (defaults to: nil)

    Filters the collection to resources with a ‘zone.name` property matching the exact specified name.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
# File 'lib/ibm_vpc/vpc_v1.rb', line 18323

def list_vpc_routes(vpc_id:, zone_name: nil, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpc_routes")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "zone.name" => zone_name,
    "start" => start,
    "limit" => limit
  }

  method_url = "/vpcs/%s/routes" % [ERB::Util.url_encode(vpc_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpc_routing_table_routes(vpc_id:, routing_table_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List routes in a VPC routing table. This request lists routes in a VPC routing table. If subnets are associated with

this routing table, delivery of packets sent on a subnet is performed according to
the action of the most specific matching route in the table (provided the subnet
and route are in the same zone). If multiple equally-specific routes exist, the
route with the highest priority will be used. If two matching routes have the same
destination and priority, traffic will be distributed between them. If no routes
match, delivery will be controlled by the system's built-in routes.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • routing_table_id (String)

    The routing table identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
# File 'lib/ibm_vpc/vpc_v1.rb', line 18875

def list_vpc_routing_table_routes(vpc_id:, routing_table_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("routing_table_id must be provided") if routing_table_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpc_routing_table_routes")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/vpcs/%s/routing_tables/%s/routes" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(routing_table_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpc_routing_tables(vpc_id:, start: nil, limit: nil, is_default: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List routing tables for a VPC. This request lists routing tables for a VPC. Each subnet in a VPC is associated

with a routing table, which controls delivery of packets sent on that subnet
according to the action of the most specific matching route in the table. If
multiple equally-specific routes exist, traffic will be distributed across them.
If no routes match, delivery will be controlled by the system's built-in routes.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • is_default (Boolean) (defaults to: nil)

    Filters the collection to routing tables with an ‘is_default` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
# File 'lib/ibm_vpc/vpc_v1.rb', line 18588

def list_vpc_routing_tables(vpc_id:, start: nil, limit: nil, is_default: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpc_routing_tables")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "is_default" => is_default
  }

  method_url = "/vpcs/%s/routing_tables" % [ERB::Util.url_encode(vpc_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpcs(start: nil, limit: nil, resource_group_id: nil, classic_access: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List VPCs. This request lists VPCs in the region. A VPC is a virtual network that belongs to

an account and provides logical isolation from other networks. A VPC is made up of
resources in one or more zones. VPCs are regional, and each VPC can contain
resources in multiple zones in a region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • classic_access (Boolean) (defaults to: nil)

    Filters the collection to VPCs with a ‘classic_access` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
# File 'lib/ibm_vpc/vpc_v1.rb', line 17436

def list_vpcs(start: nil, limit: nil, resource_group_id: nil, classic_access: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpcs")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "classic_access" => classic_access
  }

  method_url = "/vpcs"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_gateway_advertised_cidrs(vpn_gateway_id:) ⇒ IBMCloudSdkCore::DetailedResponse

List advertised CIDRs for a VPN gateway. This request lists advertised CIDRs for a VPN gateway.

This request is only supported for route mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
# File 'lib/ibm_vpc/vpc_v1.rb', line 19864

def list_vpn_gateway_advertised_cidrs(vpn_gateway_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_advertised_cidrs")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/advertised_cidrs" % [ERB::Util.url_encode(vpn_gateway_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_gateway_connections(vpn_gateway_id:, start: nil, limit: nil, status: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List connections of a VPN gateway. This request lists connections of a VPN gateway.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • status (String) (defaults to: nil)

    Filters the collection to VPN gateway connections with a ‘status` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
# File 'lib/ibm_vpc/vpc_v1.rb', line 20026

def list_vpn_gateway_connections(vpn_gateway_id:, start: nil, limit: nil, status: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_connections")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "status" => status
  }

  method_url = "/vpn_gateways/%s/connections" % [ERB::Util.url_encode(vpn_gateway_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_gateway_connections_local_cidrs(vpn_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

List local CIDRs for a VPN gateway connection. This request lists local CIDRs for a VPN gateway connection.

This request is only supported for policy mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
# File 'lib/ibm_vpc/vpc_v1.rb', line 20239

def list_vpn_gateway_connections_local_cidrs(vpn_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_connections_local_cidrs")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s/local/cidrs" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_gateway_connections_peer_cidrs(vpn_gateway_id:, id:) ⇒ IBMCloudSdkCore::DetailedResponse

List peer CIDRs for a VPN gateway connection. This request lists peer CIDRs for a VPN gateway connection.

This request is only supported for policy mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
# File 'lib/ibm_vpc/vpc_v1.rb', line 20411

def list_vpn_gateway_connections_peer_cidrs(vpn_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_connections_peer_cidrs")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_gateway_service_connections(vpn_gateway_id:, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List VPN gateway service connections. This request lists service connections on a VPN gateway. The VPN gateway service

connections will be sorted by ascending `created_at` property values. A VPN
gateway service connection connects services such as transit gateway to a VPN
gateway. This facilitates the propagation of routes learned from VPN gateway peer
connections to the connected service (for example, a transit gateway).

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
# File 'lib/ibm_vpc/vpc_v1.rb', line 20586

def list_vpn_gateway_service_connections(vpn_gateway_id:, start: nil, limit: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_service_connections")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit
  }

  method_url = "/vpn_gateways/%s/service_connections" % [ERB::Util.url_encode(vpn_gateway_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_gateways(start: nil, limit: nil, resource_group_id: nil, sort: nil, mode: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List VPN gateways. This request lists VPN gateways in the region.

Parameters:

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

  • mode (String) (defaults to: nil)

    Filters the collection to VPN gateways with a ‘mode` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
# File 'lib/ibm_vpc/vpc_v1.rb', line 19669

def list_vpn_gateways(start: nil, limit: nil, resource_group_id: nil, sort: nil, mode: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateways")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "sort" => sort,
    "mode" => mode
  }

  method_url = "/vpn_gateways"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_server_clients(vpn_server_id:, start: nil, limit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List VPN clients for a VPN server. This request retrieves connected VPN clients, and any disconnected VPN clients

that the VPN server has not yet deleted based on its auto-deletion policy.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
# File 'lib/ibm_vpc/vpc_v1.rb', line 20964

def list_vpn_server_clients(vpn_server_id:, start: nil, limit: nil, sort: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_server_clients")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "sort" => sort
  }

  method_url = "/vpn_servers/%s/clients" % [ERB::Util.url_encode(vpn_server_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_server_routes(vpn_server_id:, start: nil, limit: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List VPN routes for a VPN server. This request lists VPN routes in a VPN server. All VPN routes are provided to the

VPN client when the connection is established.  Packets received from the VPN
client will be dropped by the VPN server if there is no VPN route matching their
specified destinations. All VPN routes must be unique within the VPN server.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
# File 'lib/ibm_vpc/vpc_v1.rb', line 21131

def list_vpn_server_routes(vpn_server_id:, start: nil, limit: nil, sort: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_server_routes")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "sort" => sort
  }

  method_url = "/vpn_servers/%s/routes" % [ERB::Util.url_encode(vpn_server_id)]

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#list_vpn_servers(name: nil, start: nil, limit: nil, resource_group_id: nil, sort: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List VPN servers. This request lists VPN servers.

Parameters:

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

  • start (String) (defaults to: nil)

    A server-provided token determining what resource to start the page on.

  • limit (Fixnum) (defaults to: nil)

    The number of resources to return on a page.

  • resource_group_id (String) (defaults to: nil)

    Filters the collection to resources with a ‘resource_group.id` property matching the specified identifier.

  • sort (String) (defaults to: nil)

    Sorts the returned collection by the specified property name in ascending order. A ‘-` may be prepended to the name to sort in descending order. For example, the value `-created_at` sorts the collection by the `created_at` property in descending order, and the value `name` sorts it by the `name` property in ascending order.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
# File 'lib/ibm_vpc/vpc_v1.rb', line 20675

def list_vpn_servers(name: nil, start: nil, limit: nil, resource_group_id: nil, sort: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_servers")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation,
    "name" => name,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "sort" => sort
  }

  method_url = "/vpn_servers"

  response = request(
    method: "GET",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: true
  )
  response
end

#obsolete_image(id:) ⇒ nil

Obsolete an image. This request obsoletes an image, resulting in its ‘status` becoming `obsolete` and

`obsolescence_at` being set to the current date and time.

The image must:
- have a `status` of `available` or `deprecated`
- have `catalog_offering.managed` set to `false`
- not have `deprecation_at` set in the future
- not have `obsolescence_at` set

An image with `remote.account` set is not allowed to be obsoleted.

Parameters:

  • id (String)

    The image identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
# File 'lib/ibm_vpc/vpc_v1.rb', line 5483

def obsolete_image(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "obsolete_image")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/images/%s/obsolete" % [ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#permit_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:, set_account_policy: nil) ⇒ nil

Permit an endpoint gateway binding for a private path service gateway. This request permits a ‘pending` endpoint gateway request, and optionally sets the

policy to permit future requests from the same account.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • id (String)

    The endpoint gateway binding identifier.

  • set_account_policy (Boolean) (defaults to: nil)

    Indicates whether this will become the access policy for any ‘pending` and future endpoint gateway bindings from the same account.

    If set to ‘true`:

    • If the account has an existing access policy, that policy will be updated to ‘permit`. Otherwise, a new `permit` access policy will be created for the

    account.

    • All ‘pending` endpoint gateway bindings for the account will be permitted.

    If set to ‘false`:

    • No access policies will be created or updated

    • All ‘pending` endpoint gateway bindings for the account will remain `pending`.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
# File 'lib/ibm_vpc/vpc_v1.rb', line 12158

def permit_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:, set_account_policy: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "permit_private_path_service_gateway_endpoint_gateway_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "set_account_policy" => 
  }

  method_url = "/private_path_service_gateways/%s/endpoint_gateway_bindings/%s/permit" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: false
  )
  nil
end

#publish_private_path_service_gateway(private_path_service_gateway_id:) ⇒ nil

Publish a private path service gateway. This request publishes a private path service gateway, allowing any account to

request access to it.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
# File 'lib/ibm_vpc/vpc_v1.rb', line 12201

def publish_private_path_service_gateway(private_path_service_gateway_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "publish_private_path_service_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/private_path_service_gateways/%s/publish" % [ERB::Util.url_encode(private_path_service_gateway_id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#remove_bare_metal_server_network_interface_floating_ip(bare_metal_server_id:, network_interface_id:, id:) ⇒ nil

Disassociate a floating IP from a bare metal server network interface. This request disassociates the specified floating IP from the specified bare metal

server network interface.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • network_interface_id (String)

    The bare metal server network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
# File 'lib/ibm_vpc/vpc_v1.rb', line 1515

def remove_bare_metal_server_network_interface_floating_ip(bare_metal_server_id:, network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_bare_metal_server_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(network_interface_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#remove_endpoint_gateway_ip(endpoint_gateway_id:, id:) ⇒ nil

Unbind a reserved IP from an endpoint gateway. This request unbinds the specified reserved IP from the specified endpoint

gateway. If the reserved IP has `auto_delete` set to `true`, the reserved IP will
be deleted.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
# File 'lib/ibm_vpc/vpc_v1.rb', line 4023

def remove_endpoint_gateway_ip(endpoint_gateway_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_endpoint_gateway_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#remove_instance_network_interface_floating_ip(instance_id:, network_interface_id:, id:) ⇒ nil

Disassociate a floating IP from an instance network interface. This request disassociates the specified floating IP from the specified instance

network interface.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • network_interface_id (String)

    The instance network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
# File 'lib/ibm_vpc/vpc_v1.rb', line 8518

def remove_instance_network_interface_floating_ip(instance_id:, network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("network_interface_id must be provided") if network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_instance_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/instances/%s/network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(network_interface_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#remove_network_interface_floating_ip(virtual_network_interface_id:, id:) ⇒ nil

Disassociate a floating IP from a virtual network interface. This request disassociates the specified floating IP from the specified virtual

network interface.

Parameters:

  • virtual_network_interface_id (String)

    The virtual network interface identifier.

  • id (String)

    The floating IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
# File 'lib/ibm_vpc/vpc_v1.rb', line 16515

def remove_network_interface_floating_ip(virtual_network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("virtual_network_interface_id must be provided") if virtual_network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_network_interface_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/virtual_network_interfaces/%s/floating_ips/%s" % [ERB::Util.url_encode(virtual_network_interface_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#remove_virtual_network_interface_ip(virtual_network_interface_id:, id:) ⇒ nil

Unbind a reserved IP from a virtual network interface. This request unbinds the specified reserved IP from the specified virtual network

interface. If the reserved IP has `auto_delete` set to `true`, the reserved IP
will be deleted.

The reserved IP for the `primary_ip` cannot be unbound.

Parameters:

  • virtual_network_interface_id (String)

    The virtual network interface identifier.

  • id (String)

    The reserved IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
# File 'lib/ibm_vpc/vpc_v1.rb', line 16697

def remove_virtual_network_interface_ip(virtual_network_interface_id:, id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("virtual_network_interface_id must be provided") if virtual_network_interface_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_virtual_network_interface_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/virtual_network_interfaces/%s/ips/%s" % [ERB::Util.url_encode(virtual_network_interface_id), ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#remove_vpn_gateway_advertised_cidr(vpn_gateway_id:, cidr:) ⇒ nil

Remove an advertised CIDR from a VPN gateway. This request removes a CIDR from a VPN gateway advertised CIDRs.

This request is only supported for route mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
# File 'lib/ibm_vpc/vpc_v1.rb', line 19902

def remove_vpn_gateway_advertised_cidr(vpn_gateway_id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_vpn_gateway_advertised_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/advertised_cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(cidr)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#remove_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) ⇒ nil

Remove a local CIDR from a VPN gateway connection. This request removes a CIDR from a VPN gateway connection.

This request is only supported for policy mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
# File 'lib/ibm_vpc/vpc_v1.rb', line 20280

def remove_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_vpn_gateway_connections_local_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#remove_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) ⇒ nil

Remove a peer CIDR from a VPN gateway connection. This request removes a CIDR from a VPN gateway connection.

This request is only supported for policy mode VPN gateways.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

  • cidr (String)

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
# File 'lib/ibm_vpc/vpc_v1.rb', line 20452

def remove_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("cidr must be provided") if cidr.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_vpn_gateway_connections_peer_cidr")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#replace_bare_metal_server_initialization(id:, image:, keys:, default_trusted_profile: nil, user_data: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Reinitialize a bare metal server. This request reinitializes a bare metal server with the specified image and SSH

keys. The server must be stopped. Upon successful reinitiatilization, the bare
metal server will be started automatically.

For this request to succeed, the properties of the server which would result from
the reinitialization must adhere to the specified image's `allowed_use` property.

Parameters:

  • id (String)

    The bare metal server identifier.

  • image (ImageIdentity)

    The image to be used when provisioning the bare metal server.

  • keys (Array[KeyIdentity])

    The public SSH keys to install on the bare metal server. Keys will be made available to the bare metal server as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as SSH authorized keys for the [default user](cloud.ibm.com/docs/vpc?topic=vpc-vsi_is_connecting_linux#determining-default-user-account).

    For Windows images, at least one key must be specified, and one will be selected to encrypt the administrator password. Keys are optional for other images, but if no keys are specified, the bare metal server will be inaccessible unless the specified image provides another means of access.

  • default_trusted_profile (BareMetalServerInitializationDefaultTrustedProfilePrototype) (defaults to: nil)

    The default trusted profile to be used when initializing the bare metal server.

    If unspecified, no default trusted profile will be made available.

  • user_data (String) (defaults to: nil)

    The user data to be made available when initializing the bare metal server.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
# File 'lib/ibm_vpc/vpc_v1.rb', line 1947

def replace_bare_metal_server_initialization(id:, image:, keys:, default_trusted_profile: nil, user_data: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("image must be provided") if image.nil?

  raise ArgumentError.new("keys must be provided") if keys.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "replace_bare_metal_server_initialization")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "image" => image,
    "keys" => keys,
    "default_trusted_profile" => default_trusted_profile,
    "user_data" => user_data
  }

  method_url = "/bare_metal_servers/%s/initialization" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:) ⇒ IBMCloudSdkCore::DetailedResponse

Replace load balancer pool members. This request replaces the existing members of the load balancer pool with new

members created from the collection of member prototype objects.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • pool_id (String)

    The pool identifier.

  • members (Array[LoadBalancerPoolMemberPrototype])

    The member prototype objects for this pool.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
# File 'lib/ibm_vpc/vpc_v1.rb', line 10724

def replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("pool_id must be provided") if pool_id.nil?

  raise ArgumentError.new("members must be provided") if members.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "replace_load_balancer_pool_members")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "members" => members
  }

  method_url = "/load_balancers/%s/pools/%s/members" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(pool_id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: true
  )
  response
end

#replace_subnet_network_acl(id:, network_acl_identity:) ⇒ IBMCloudSdkCore::DetailedResponse

Replace the network ACL for a subnet. This request replaces the existing network ACL for a subnet with the network ACL

specified in the request body.

Parameters:

  • id (String)

    The subnet identifier.

  • network_acl_identity (NetworkACLIdentity)

    The network ACL identity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
# File 'lib/ibm_vpc/vpc_v1.rb', line 15692

def replace_subnet_network_acl(id:, network_acl_identity:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("network_acl_identity must be provided") if network_acl_identity.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "replace_subnet_network_acl")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = network_acl_identity
  headers["Content-Type"] = "application/json"

  method_url = "/subnets/%s/network_acl" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#replace_subnet_routing_table(id:, routing_table_identity:) ⇒ IBMCloudSdkCore::DetailedResponse

Replace the routing table for a subnet. This request replaces the existing routing table for a subnet with the routing

table specified in the request body.

For this request to succeed, the routing table `route_direct_link_ingress`,
`route_internet_ingress`, `route_transit_gateway_ingress`, and
`route_vpc_zone_ingress` properties must be `false`.

Parameters:

  • id (String)

    The subnet identifier.

  • routing_table_identity (RoutingTableIdentity)

    The routing table identity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
# File 'lib/ibm_vpc/vpc_v1.rb', line 15891

def replace_subnet_routing_table(id:, routing_table_identity:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("routing_table_identity must be provided") if routing_table_identity.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "replace_subnet_routing_table")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = routing_table_identity
  headers["Content-Type"] = "application/json"

  method_url = "/subnets/%s/routing_table" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#restart_bare_metal_server(id:) ⇒ nil

Restart a bare metal server. This request immediately restarts a bare metal server. For this request to

succeed, the server must have a `status` of `running`.

Parameters:

  • id (String)

    The bare metal server identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
2022
# File 'lib/ibm_vpc/vpc_v1.rb', line 1995

def restart_bare_metal_server(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "restart_bare_metal_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/restart" % [ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#revoke_account_for_private_path_service_gateway(private_path_service_gateway_id:, account:) ⇒ nil

Revoke access to a private path service gateway for an account. This request revokes a consumer account. This operation cannot be reversed. The

`status` of all endpoint gateway bindings associated with the specified private
path service gateway become `denied`. If the specified account has an existing
access policy, that policy will be updated to `denied`. Otherwise, a new `deny`
access policy will be created for the account.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • account (AccountIdentity)

    The account that will be revoked access to the private path service gateway.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
# File 'lib/ibm_vpc/vpc_v1.rb', line 12241

def (private_path_service_gateway_id:, account:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  raise ArgumentError.new("account must be provided") if .nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "revoke_account_for_private_path_service_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "account" => 
  }

  method_url = "/private_path_service_gateways/%s/revoke_account" % [ERB::Util.url_encode(private_path_service_gateway_id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: false
  )
  nil
end

#set_subnet_public_gateway(id:, public_gateway_identity:) ⇒ IBMCloudSdkCore::DetailedResponse

Attach a public gateway to a subnet. This request attaches the public gateway, specified in the request body, to the

subnet specified by the subnet identifier in the URL. The public gateway must have
the same VPC and zone as the subnet.

Parameters:

  • id (String)

    The subnet identifier.

  • public_gateway_identity (PublicGatewayIdentity)

    The public gateway identity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
# File 'lib/ibm_vpc/vpc_v1.rb', line 15808

def set_subnet_public_gateway(id:, public_gateway_identity:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("public_gateway_identity must be provided") if public_gateway_identity.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "set_subnet_public_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = public_gateway_identity
  headers["Content-Type"] = "application/json"

  method_url = "/subnets/%s/public_gateway" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PUT",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#start_bare_metal_server(id:) ⇒ nil

Start a bare metal server. This request starts a bare metal server. It will run immediately provided the

server is stopped.

Parameters:

  • id (String)

    The bare metal server identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
# File 'lib/ibm_vpc/vpc_v1.rb', line 2031

def start_bare_metal_server(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "start_bare_metal_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/bare_metal_servers/%s/start" % [ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#stop_bare_metal_server(id:, type:) ⇒ nil

Stop a bare metal server. This request stops a bare metal server. It will run immediately provided the

server is running. Note: A soft stop may not complete as it relies on the
operating system to perform the operation.

Parameters:

  • id (String)

    The bare metal server identifier.

  • type (String)

    The type of stop operation:

    • ‘soft`: signal running operating system to quiesce and shutdown cleanly

    • ‘hard`: immediately stop the server.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
# File 'lib/ibm_vpc/vpc_v1.rb', line 2071

def stop_bare_metal_server(id:, type:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("type must be provided") if type.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "stop_bare_metal_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "type" => type
  }

  method_url = "/bare_metal_servers/%s/stop" % [ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: false
  )
  nil
end

#unpublish_private_path_service_gateway(private_path_service_gateway_id:) ⇒ nil

Unpublish a private path service gateway. This request unpublishes a private path service gateway. For this request to

succeed, any existing access from other accounts must first be revoked. Once
unpublished, access will again be restricted to the account that created this
private path service gateway.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
# File 'lib/ibm_vpc/vpc_v1.rb', line 12286

def unpublish_private_path_service_gateway(private_path_service_gateway_id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "unpublish_private_path_service_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/private_path_service_gateways/%s/unpublish" % [ERB::Util.url_encode(private_path_service_gateway_id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#unset_subnet_public_gateway(id:) ⇒ nil

Detach a public gateway from a subnet. This request detaches the public gateway from the subnet specified by the subnet

identifier in the URL.

Parameters:

  • id (String)

    The subnet identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
# File 'lib/ibm_vpc/vpc_v1.rb', line 15734

def unset_subnet_public_gateway(id:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "unset_subnet_public_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  method_url = "/subnets/%s/public_gateway" % [ERB::Util.url_encode(id)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
end

#update_backup_policy(id:, backup_policy_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a backup policy. This request updates a backup policy with the information in a provided backup

policy patch. The backup policy patch object is structured in the same way as a
retrieved backup policy and contains only the information to be updated.

Parameters:

  • id (String)

    The backup policy identifier.

  • backup_policy_patch (Hash)

    The backup policy patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
# File 'lib/ibm_vpc/vpc_v1.rb', line 601

def update_backup_policy(id:, backup_policy_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("backup_policy_patch must be provided") if backup_policy_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_backup_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = backup_policy_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/backup_policies/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_backup_policy_plan(backup_policy_id:, id:, backup_policy_plan_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a backup policy plan. This request updates a backup policy plan with the information in a provided plan

patch. The plan patch object is structured in the same way as a retrieved backup
policy plan and can contains only the information to be updated.

Parameters:

  • backup_policy_id (String)

    The backup policy identifier.

  • id (String)

    The backup policy plan identifier.

  • backup_policy_plan_patch (Hash)

    The backup policy plan patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/ibm_vpc/vpc_v1.rb', line 474

def update_backup_policy_plan(backup_policy_id:, id:, backup_policy_plan_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("backup_policy_id must be provided") if backup_policy_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("backup_policy_plan_patch must be provided") if backup_policy_plan_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_backup_policy_plan")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = backup_policy_plan_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/backup_policies/%s/plans/%s" % [ERB::Util.url_encode(backup_policy_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_bare_metal_server(id:, bare_metal_server_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a bare metal server. This request updates a bare metal server with the information in a provided patch.

The bare metal server patch object is structured in the same way as a retrieved
bare metal server and contains only the information to be updated.

For this request to succeed, the properties in the request must adhere to the
`allowed_use` property of the disk referenced in the server's `boot_target`.

Parameters:

  • id (String)

    The bare metal server identifier.

  • bare_metal_server_patch (Hash)

    The bare metal server patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
# File 'lib/ibm_vpc/vpc_v1.rb', line 1806

def update_bare_metal_server(id:, bare_metal_server_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("bare_metal_server_patch must be provided") if bare_metal_server_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_bare_metal_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = bare_metal_server_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/bare_metal_servers/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_bare_metal_server_disk(bare_metal_server_id:, id:, bare_metal_server_disk_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a bare metal server disk. This request updates the bare metal server disk with the information in a provided

patch.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • id (String)

    The bare metal server disk identifier.

  • bare_metal_server_disk_patch (Hash)

    The bare metal server disk patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
# File 'lib/ibm_vpc/vpc_v1.rb', line 958

def update_bare_metal_server_disk(bare_metal_server_id:, id:, bare_metal_server_disk_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("bare_metal_server_disk_patch must be provided") if bare_metal_server_disk_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_bare_metal_server_disk")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = bare_metal_server_disk_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/bare_metal_servers/%s/disks/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_bare_metal_server_network_attachment(bare_metal_server_id:, id:, bare_metal_server_network_attachment_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a bare metal server network attachment. This request updates a bare metal server network attachment with the information

provided in a bare metal server network attachment patch object. The bare metal
server network attachment patch object is structured in the same way as a
retrieved bare metal server network attachment and contains only the information
to be updated.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • id (String)

    The bare metal server network attachment identifier.

  • bare_metal_server_network_attachment_patch (Hash)

    The bare metal server network attachment patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/ibm_vpc/vpc_v1.rb', line 1180

def update_bare_metal_server_network_attachment(bare_metal_server_id:, id:, bare_metal_server_network_attachment_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("bare_metal_server_network_attachment_patch must be provided") if bare_metal_server_network_attachment_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_bare_metal_server_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = bare_metal_server_network_attachment_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/bare_metal_servers/%s/network_attachments/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_bare_metal_server_network_interface(bare_metal_server_id:, id:, bare_metal_server_network_interface_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a bare metal server network interface. This request updates a bare metal server network interface with the information

provided in a bare metal server network interface patch object. The bare metal
server network interface patch object is structured in the same way as a retrieved
bare metal server network interface and needs to contain only the information to
be updated.

If this bare metal server has network attachments, this network interface is a
[read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface, and is not allowed to be updated.

Parameters:

  • bare_metal_server_id (String)

    The bare metal server identifier.

  • id (String)

    The bare metal server network interface identifier.

  • bare_metal_server_network_interface_patch (Hash)

    The bare metal server network interface patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


1430
1431
1432
1433
1434
1435
1436
1437
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 1430

def update_bare_metal_server_network_interface(bare_metal_server_id:, id:, bare_metal_server_network_interface_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("bare_metal_server_id must be provided") if bare_metal_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("bare_metal_server_network_interface_patch must be provided") if bare_metal_server_network_interface_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_bare_metal_server_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = bare_metal_server_network_interface_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/bare_metal_servers/%s/network_interfaces/%s" % [ERB::Util.url_encode(bare_metal_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_cluster_network(id:, cluster_network_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a cluster. This request updates a cluster network with the information provided in a cluster

network patch object. The patch object is structured in the same way as a
retrieved cluster network and needs to contain only the information to be updated.

Parameters:

  • id (String)

    The cluster network identifier.

  • cluster_network_patch (Hash)

    The cluster network patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
# File 'lib/ibm_vpc/vpc_v1.rb', line 3129

def update_cluster_network(id:, cluster_network_patch:, if_match: nil)
  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("cluster_network_patch must be provided") if cluster_network_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_cluster_network")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = cluster_network_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/cluster_networks/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_cluster_network_interface(cluster_network_id:, id:, cluster_network_interface_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a cluster network interface. This request updates a cluster network interface with the information provided in

a cluster network interface patch object. The patch object is structured in the
same way as a retrieved cluster network interface and needs to contain only the
information to be updated.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • id (String)

    The cluster network interface identifier.

  • cluster_network_interface_patch (Hash)

    The cluster network interface patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
# File 'lib/ibm_vpc/vpc_v1.rb', line 2525

def update_cluster_network_interface(cluster_network_id:, id:, cluster_network_interface_patch:, if_match: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("cluster_network_interface_patch must be provided") if cluster_network_interface_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_cluster_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = cluster_network_interface_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/cluster_networks/%s/interfaces/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_cluster_network_subnet(cluster_network_id:, id:, cluster_network_subnet_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a cluster network subnet. This request updates a cluster network subnet with the information provided in a

cluster network subnet patch object. The patch object is structured in the same
way as a retrieved cluster network subnet and needs to contain only the
information to be updated.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • id (String)

    The cluster network subnet identifier.

  • cluster_network_subnet_patch (Hash)

    The cluster network subnet patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
# File 'lib/ibm_vpc/vpc_v1.rb', line 3003

def update_cluster_network_subnet(cluster_network_id:, id:, cluster_network_subnet_patch:, if_match: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("cluster_network_subnet_patch must be provided") if cluster_network_subnet_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_cluster_network_subnet")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = cluster_network_subnet_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/cluster_networks/%s/subnets/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:, cluster_network_subnet_reserved_ip_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a cluster network subnet reserved IP. This request updates a cluster network subnet reserved IP with the information

provided in a cluster network subnet reserved IP patch object. The patch object is
structured in the same way as a retrieved cluster network subnet reserved IP and
needs to contain only the information to be updated.

Parameters:

  • cluster_network_id (String)

    The cluster network identifier.

  • cluster_network_subnet_id (String)

    The cluster network subnet identifier.

  • id (String)

    The cluster network subnet reserved IP identifier.

  • cluster_network_subnet_reserved_ip_patch (Hash)

    The cluster network subnet reserved IP patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
# File 'lib/ibm_vpc/vpc_v1.rb', line 2867

def update_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:, cluster_network_subnet_reserved_ip_patch:, if_match: nil)
  raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil?

  raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("cluster_network_subnet_reserved_ip_patch must be provided") if cluster_network_subnet_reserved_ip_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_cluster_network_subnet_reserved_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = cluster_network_subnet_reserved_ip_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/cluster_networks/%s/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_dedicated_host(id:, dedicated_host_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a dedicated host. This request updates a dedicated host with the information in a provided dedicated

host patch. The dedicated host patch object is structured in the same way as a
retrieved dedicated host and contains only the information to be updated.

Parameters:

  • id (String)

    The dedicated host identifier.

  • dedicated_host_patch (Hash)

    The dedicated host patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
# File 'lib/ibm_vpc/vpc_v1.rb', line 3753

def update_dedicated_host(id:, dedicated_host_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("dedicated_host_patch must be provided") if dedicated_host_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_dedicated_host")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = dedicated_host_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/dedicated_hosts/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_dedicated_host_disk(dedicated_host_id:, id:, dedicated_host_disk_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a dedicated host disk. This request updates the dedicated host disk with the information in a provided

patch.

Parameters:

  • dedicated_host_id (String)

    The dedicated host identifier.

  • id (String)

    The dedicated host disk identifier.

  • dedicated_host_disk_patch (Hash)

    The dedicated host disk patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
# File 'lib/ibm_vpc/vpc_v1.rb', line 3634

def update_dedicated_host_disk(dedicated_host_id:, id:, dedicated_host_disk_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("dedicated_host_id must be provided") if dedicated_host_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("dedicated_host_disk_patch must be provided") if dedicated_host_disk_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_dedicated_host_disk")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = dedicated_host_disk_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/dedicated_hosts/%s/disks/%s" % [ERB::Util.url_encode(dedicated_host_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_dedicated_host_group(id:, dedicated_host_group_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a dedicated host group. This request updates a dedicated host group with the information in a provided

dedicated host group patch. The dedicated host group patch object is structured in
the same way as a retrieved dedicated host group and contains only the information
to be updated.

Parameters:

  • id (String)

    The dedicated host group identifier.

  • dedicated_host_group_patch (Hash)

    The dedicated host group patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
# File 'lib/ibm_vpc/vpc_v1.rb', line 3351

def update_dedicated_host_group(id:, dedicated_host_group_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("dedicated_host_group_patch must be provided") if dedicated_host_group_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_dedicated_host_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = dedicated_host_group_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/dedicated_host/groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_endpoint_gateway(id:, endpoint_gateway_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an endpoint gateway. This request updates an endpoint gateway with the information in a provided

endpoint gateway patch. The endpoint gateway patch object is structured in the
same way as a retrieved endpoint gateway and contains only the information to be
updated.

Parameters:

  • id (String)

    The endpoint gateway identifier.

  • endpoint_gateway_patch (Hash)

    The endpoint gateway patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
# File 'lib/ibm_vpc/vpc_v1.rb', line 4454

def update_endpoint_gateway(id:, endpoint_gateway_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("endpoint_gateway_patch must be provided") if endpoint_gateway_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_endpoint_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = endpoint_gateway_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_endpoint_gateway_resource_binding(endpoint_gateway_id:, id:, endpoint_gateway_resource_binding_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an endpoint gateway resource binding. This request updates an endpoint gateway resource binding with the information in

a provided endpoint gateway resource binding patch. The endpoint gateway resource
binding patch object is structured in the same way as a retrieved endpoint gateway
resource binding and contains only the information to be updated.

Parameters:

  • endpoint_gateway_id (String)

    The endpoint gateway identifier.

  • id (String)

    The resource binding identifier.

  • endpoint_gateway_resource_binding_patch (Hash)

    The endpoint gateway resource binding patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
# File 'lib/ibm_vpc/vpc_v1.rb', line 4328

def update_endpoint_gateway_resource_binding(endpoint_gateway_id:, id:, endpoint_gateway_resource_binding_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("endpoint_gateway_resource_binding_patch must be provided") if endpoint_gateway_resource_binding_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_endpoint_gateway_resource_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = endpoint_gateway_resource_binding_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/endpoint_gateways/%s/resource_bindings/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_firmware_for_bare_metal_server(id:, auto_start: nil) ⇒ nil

Update firmware for a bare metal server. This request updates a bare metal server to the latest available firmware. The

server must be stopped.

Parameters:

  • id (String)

    The bare metal server identifier.

  • auto_start (Boolean) (defaults to: nil)

    Indicates whether to automatically start the bare metal server after the firmware update is successfully completed.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
# File 'lib/ibm_vpc/vpc_v1.rb', line 1850

def update_firmware_for_bare_metal_server(id:, auto_start: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_firmware_for_bare_metal_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = {
    "auto_start" => auto_start
  }

  method_url = "/bare_metal_servers/%s/firmware/update" % [ERB::Util.url_encode(id)]

  request(
    method: "POST",
    url: method_url,
    headers: headers,
    params: params,
    json: data,
    accept_json: false
  )
  nil
end

#update_floating_ip(id:, floating_ip_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a floating IP. This request updates a floating IP’s name and/or target.

Parameters:

  • id (String)

    The floating IP identifier.

  • floating_ip_patch (Hash)

    The floating IP patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
# File 'lib/ibm_vpc/vpc_v1.rb', line 4669

def update_floating_ip(id:, floating_ip_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("floating_ip_patch must be provided") if floating_ip_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_floating_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = floating_ip_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_flow_log_collector(id:, flow_log_collector_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a flow log collector. This request updates a flow log collector with the information in a provided flow

log collector patch. The flow log collector patch object is structured in the same
way as a retrieved flow log collector and contains only the information to be
updated.

Parameters:

  • id (String)

    The flow log collector identifier.

  • flow_log_collector_patch (Hash)

    The flow log collector patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
# File 'lib/ibm_vpc/vpc_v1.rb', line 4927

def update_flow_log_collector(id:, flow_log_collector_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("flow_log_collector_patch must be provided") if flow_log_collector_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_flow_log_collector")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = flow_log_collector_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_ike_policy(id:, ike_policy_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an IKE policy. This request updates the properties of an existing IKE policy.

Parameters:

  • id (String)

    The IKE policy identifier.

  • ike_policy_patch (Hash)

    The IKE policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
# File 'lib/ibm_vpc/vpc_v1.rb', line 19320

def update_ike_policy(id:, ike_policy_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("ike_policy_patch must be provided") if ike_policy_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_ike_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = ike_policy_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/ike_policies/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_image(id:, image_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an image. This request updates an image with the information in a provided image patch. The

image patch object is structured in the same way as a retrieved image and contains
only the information to be updated. An image with `remote.account` set is not
allowed to be updated. An image with a `status` of `deleting` cannot be updated.

Parameters:

  • id (String)

    The image identifier.

  • image_patch (Hash)

    The image patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
# File 'lib/ibm_vpc/vpc_v1.rb', line 5307

def update_image(id:, image_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("image_patch must be provided") if image_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_image")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = image_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/images/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_image_export_job(image_id:, id:, image_export_job_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an image export job. This request updates an image export job with the information in a provided image

export job patch. The image export job patch object is structured in the same way
as a retrieved image export job and contains only the information to be updated.

Parameters:

  • image_id (String)

    The image identifier.

  • id (String)

    The image export job identifier.

  • image_export_job_patch (Hash)

    The image export job patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
# File 'lib/ibm_vpc/vpc_v1.rb', line 5709

def update_image_export_job(image_id:, id:, image_export_job_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("image_id must be provided") if image_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("image_export_job_patch must be provided") if image_export_job_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_image_export_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = image_export_job_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/images/%s/export_jobs/%s" % [ERB::Util.url_encode(image_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance(id:, instance_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance. This request updates an instance with the information in a provided instance

patch. The instance patch object is structured in the same way as a retrieved
instance and contains only the information to be updated.

For this request to succeed, the properties in the request must adhere to the
`allowed_use` property in the volume referenced by
`boot_volume_attachment.volume`.

Parameters:

  • id (String)

    The virtual server instance identifier.

  • instance_patch (Hash)

    The instance patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
# File 'lib/ibm_vpc/vpc_v1.rb', line 7440

def update_instance(id:, instance_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_patch must be provided") if instance_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instances/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_cluster_network_attachment(instance_id:, id:, instance_cluster_network_attachment_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance cluster network attachment. This request updates an instance cluster network attachment with the information

provided in an instance network interface patch object. The instance cluster
network attachment patch object is structured in the same way as a retrieved
instance cluster network attachment and needs to contain only the information to
be updated.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance cluster network attachment identifier.

  • instance_cluster_network_attachment_patch (Hash)

    The instance cluster network attachment patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
# File 'lib/ibm_vpc/vpc_v1.rb', line 7765

def update_instance_cluster_network_attachment(instance_id:, id:, instance_cluster_network_attachment_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_cluster_network_attachment_patch must be provided") if instance_cluster_network_attachment_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_cluster_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_cluster_network_attachment_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instances/%s/cluster_network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_disk(instance_id:, id:, instance_disk_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance disk. This request updates the instance disk with the information in a provided patch.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance disk identifier.

  • instance_disk_patch (Hash)

    The instance disk patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
# File 'lib/ibm_vpc/vpc_v1.rb', line 7937

def update_instance_disk(instance_id:, id:, instance_disk_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_disk_patch must be provided") if instance_disk_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_disk")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_disk_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instances/%s/disks/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_group(id:, instance_group_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance group. This request updates an instance group with the information provided instance

group patch. The instance group patch object is structured in the same way as a
retrieved instance group and contains only the information to be updated.

Parameters:

  • id (String)

    The instance group identifier.

  • instance_group_patch (Hash)

    The instance group patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
# File 'lib/ibm_vpc/vpc_v1.rb', line 6015

def update_instance_group(id:, instance_group_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_group_patch must be provided") if instance_group_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_group_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instance_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_group_manager(instance_group_id:, id:, instance_group_manager_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance group manager. This request updates an instance group manager with the information provided

instance group manager patch.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • id (String)

    The instance group manager identifier.

  • instance_group_manager_patch (Hash)

    The instance group manager patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
# File 'lib/ibm_vpc/vpc_v1.rb', line 6253

def update_instance_group_manager(instance_group_id:, id:, instance_group_manager_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_group_manager_patch must be provided") if instance_group_manager_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_group_manager")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_group_manager_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instance_groups/%s/managers/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:, instance_group_manager_action_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update specified instance group manager action. This request updates an instance group manager action.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • id (String)

    The instance group manager action identifier.

  • instance_group_manager_action_patch (Hash)

    The instance group manager action patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
# File 'lib/ibm_vpc/vpc_v1.rb', line 6470

def update_instance_group_manager_action(instance_group_id:, instance_group_manager_id:, id:, instance_group_manager_action_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_group_manager_action_patch must be provided") if instance_group_manager_action_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_group_manager_action")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_group_manager_action_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instance_groups/%s/managers/%s/actions/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:, instance_group_manager_policy_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance group manager policy. This request updates an instance group manager policy.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • instance_group_manager_id (String)

    The instance group manager identifier.

  • id (String)

    The instance group manager policy identifier.

  • instance_group_manager_policy_patch (Hash)

    The instance group manager policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
# File 'lib/ibm_vpc/vpc_v1.rb', line 6689

def update_instance_group_manager_policy(instance_group_id:, instance_group_manager_id:, id:, instance_group_manager_policy_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("instance_group_manager_id must be provided") if instance_group_manager_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_group_manager_policy_patch must be provided") if instance_group_manager_policy_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_group_manager_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_group_manager_policy_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instance_groups/%s/managers/%s/policies/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(instance_group_manager_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_group_membership(instance_group_id:, id:, instance_group_membership_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance group membership. This request updates an instance group membership with the information provided

instance group membership patch.

Parameters:

  • instance_group_id (String)

    The instance group identifier.

  • id (String)

    The instance group membership identifier.

  • instance_group_membership_patch (Hash)

    The instance group membership patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
# File 'lib/ibm_vpc/vpc_v1.rb', line 6892

def update_instance_group_membership(instance_group_id:, id:, instance_group_membership_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_group_id must be provided") if instance_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_group_membership_patch must be provided") if instance_group_membership_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_group_membership")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_group_membership_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instance_groups/%s/memberships/%s" % [ERB::Util.url_encode(instance_group_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_network_attachment(instance_id:, id:, instance_network_attachment_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance network attachment. This request updates an instance network attachment with the information provided

in an instance network interface patch object. The instance network attachment
patch object is structured in the same way as a retrieved instance network
attachment and needs to contain only the information to be updated.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance network attachment identifier.

  • instance_network_attachment_patch (Hash)

    The instance network attachment patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
# File 'lib/ibm_vpc/vpc_v1.rb', line 8165

def update_instance_network_attachment(instance_id:, id:, instance_network_attachment_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_network_attachment_patch must be provided") if instance_network_attachment_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_network_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_network_attachment_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instances/%s/network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_network_interface(instance_id:, id:, network_interface_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance network interface. This request updates an instance network interface with the information provided

in an instance network interface patch object. The instance network interface
patch object is structured in the same way as a retrieved instance network
interface and needs to contain only the information to be updated.

If this instance has network attachments, this network interface is a [read-only
representation](https://cloud.ibm.com/docs/vpc?topic=vpc-vni-about#vni-old-api-clients)
of its corresponding network attachment and its attached virtual network
interface, and is not allowed to be updated.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The instance network interface identifier.

  • network_interface_patch (Hash)

    The instance network interface patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
# File 'lib/ibm_vpc/vpc_v1.rb', line 8434

def update_instance_network_interface(instance_id:, id:, network_interface_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("network_interface_patch must be provided") if network_interface_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = network_interface_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instances/%s/network_interfaces/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_template(id:, instance_template_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an instance template. This request updates an instance template with the information provided in the

instance template patch. The instance template patch object is structured in the
same way as a retrieved instance template and contains only the information to be
updated.

Parameters:

  • id (String)

    The instance template identifier.

  • instance_template_patch (Hash)

    The instance template patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
# File 'lib/ibm_vpc/vpc_v1.rb', line 7090

def update_instance_template(id:, instance_template_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("instance_template_patch must be provided") if instance_template_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_template")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = instance_template_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instance/templates/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_instance_volume_attachment(instance_id:, id:, volume_attachment_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a volume attachment. This request updates a volume attachment with the information provided in a volume

attachment patch object. The volume attachment patch object is structured in the
same way as a retrieved volume attachment and needs to contain only the
information to be updated.

Parameters:

  • instance_id (String)

    The virtual server instance identifier.

  • id (String)

    The volume attachment identifier.

  • volume_attachment_patch (Hash)

    The volume attachment patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
# File 'lib/ibm_vpc/vpc_v1.rb', line 8906

def update_instance_volume_attachment(instance_id:, id:, volume_attachment_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("instance_id must be provided") if instance_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("volume_attachment_patch must be provided") if volume_attachment_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_volume_attachment")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = volume_attachment_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/instances/%s/volume_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_ipsec_policy(id:, i_psec_policy_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an IPsec policy. This request updates the properties of an existing IPsec policy.

Parameters:

  • id (String)

    The IPsec policy identifier.

  • i_psec_policy_patch (Hash)

    The IPsec policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
# File 'lib/ibm_vpc/vpc_v1.rb', line 19579

def update_ipsec_policy(id:, i_psec_policy_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("i_psec_policy_patch must be provided") if i_psec_policy_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_ipsec_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = i_psec_policy_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_key(id:, key_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a key. This request updates a key’s name.

Parameters:

  • id (String)

    The key identifier.

  • key_patch (Hash)

    The key patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
# File 'lib/ibm_vpc/vpc_v1.rb', line 9121

def update_key(id:, key_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("key_patch must be provided") if key_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_key")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = key_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/keys/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_load_balancer(id:, load_balancer_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a load balancer. This request updates a load balancer with the information in a provided load

balancer patch. The load balancer patch object is structured in the same way as a
retrieved load balancer and contains only the information to be updated. A load
balancer can only be updated if its `provisioning_status` is `active`.

Parameters:

  • id (String)

    The load balancer identifier.

  • load_balancer_patch (Hash)

    The load balancer patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
# File 'lib/ibm_vpc/vpc_v1.rb', line 9459

def update_load_balancer(id:, load_balancer_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("load_balancer_patch must be provided") if load_balancer_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = load_balancer_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/load_balancers/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a load balancer listener. This request updates a load balancer listener from a listener patch.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • id (String)

    The listener identifier.

  • load_balancer_listener_patch (Hash)

    The load balancer listener patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
# File 'lib/ibm_vpc/vpc_v1.rb', line 9795

def update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("load_balancer_listener_patch must be provided") if load_balancer_listener_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer_listener")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = load_balancer_listener_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/load_balancers/%s/listeners/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:, load_balancer_listener_policy_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a load balancer listener policy. This request updates a load balancer listener policy with the information in a

provided policy patch. The policy patch object is structured in the same way as a
retrieved policy and contains only the information to be updated.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • id (String)

    The policy identifier.

  • load_balancer_listener_policy_patch (Hash)

    The listener policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
# File 'lib/ibm_vpc/vpc_v1.rb', line 10047

def update_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:, load_balancer_listener_policy_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("load_balancer_listener_policy_patch must be provided") if load_balancer_listener_policy_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer_listener_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = load_balancer_listener_policy_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/load_balancers/%s/listeners/%s/policies/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:, load_balancer_listener_policy_rule_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a load balancer listener policy rule. Updates a rule of the load balancer listener policy.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • listener_id (String)

    The listener identifier.

  • policy_id (String)

    The policy identifier.

  • id (String)

    The rule identifier.

  • load_balancer_listener_policy_rule_patch (Hash)

    The listener policy rule patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
# File 'lib/ibm_vpc/vpc_v1.rb', line 10302

def update_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:, load_balancer_listener_policy_rule_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("listener_id must be provided") if listener_id.nil?

  raise ArgumentError.new("policy_id must be provided") if policy_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("load_balancer_listener_policy_rule_patch must be provided") if load_balancer_listener_policy_rule_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer_listener_policy_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = load_balancer_listener_policy_rule_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/load_balancers/%s/listeners/%s/policies/%s/rules/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id), ERB::Util.url_encode(policy_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_load_balancer_pool(load_balancer_id:, id:, load_balancer_pool_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a load balancer pool. This request updates a load balancer pool from a pool patch.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • id (String)

    The pool identifier.

  • load_balancer_pool_patch (Hash)

    The load balancer pool patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
# File 'lib/ibm_vpc/vpc_v1.rb', line 10560

def update_load_balancer_pool(load_balancer_id:, id:, load_balancer_pool_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("load_balancer_pool_patch must be provided") if load_balancer_pool_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer_pool")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = load_balancer_pool_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/load_balancers/%s/pools/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_load_balancer_pool_member(load_balancer_id:, pool_id:, id:, load_balancer_pool_member_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a load balancer pool member. This request updates an existing member from a member patch.

Parameters:

  • load_balancer_id (String)

    The load balancer identifier.

  • pool_id (String)

    The pool identifier.

  • id (String)

    The member identifier.

  • load_balancer_pool_member_patch (Hash)

    The load balancer pool member patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
# File 'lib/ibm_vpc/vpc_v1.rb', line 10854

def update_load_balancer_pool_member(load_balancer_id:, pool_id:, id:, load_balancer_pool_member_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil?

  raise ArgumentError.new("pool_id must be provided") if pool_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("load_balancer_pool_member_patch must be provided") if load_balancer_pool_member_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer_pool_member")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = load_balancer_pool_member_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/load_balancers/%s/pools/%s/members/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(pool_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_network_acl(id:, network_acl_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a network ACL. This request updates a network ACL’s name.

Parameters:

  • id (String)

    The network ACL identifier.

  • network_acl_patch (Hash)

    The network ACL patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
# File 'lib/ibm_vpc/vpc_v1.rb', line 11060

def update_network_acl(id:, network_acl_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("network_acl_patch must be provided") if network_acl_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_network_acl")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = network_acl_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_network_acl_rule(network_acl_id:, id:, network_acl_rule_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a network ACL rule. This request updates a rule with the information in a provided rule patch. The

rule patch object contains only the information to be updated. The request will
fail if the provided patch includes properties that are not used by the rule's
protocol.

Parameters:

  • network_acl_id (String)

    The network ACL identifier.

  • id (String)

    The rule identifier.

  • network_acl_rule_patch (Hash)

    The network ACL rule patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
# File 'lib/ibm_vpc/vpc_v1.rb', line 11270

def update_network_acl_rule(network_acl_id:, id:, network_acl_rule_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("network_acl_rule_patch must be provided") if network_acl_rule_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_network_acl_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = network_acl_rule_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/network_acls/%s/rules/%s" % [ERB::Util.url_encode(network_acl_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_placement_group(id:, placement_group_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a placement group. This request updates a placement group with the information provided placement

group patch. The placement group patch object is structured in the same way as a
retrieved placement group and contains only the information to be updated.

Parameters:

  • id (String)

    The placement group identifier.

  • placement_group_patch (Hash)

    The placement group patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
# File 'lib/ibm_vpc/vpc_v1.rb', line 11477

def update_placement_group(id:, placement_group_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("placement_group_patch must be provided") if placement_group_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_placement_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = placement_group_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/placement_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_private_path_service_gateway(id:, private_path_service_gateway_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a private path service gateway. This request updates a private path service gateway with the information provided

in a private path service gateway patch object. The private path service gateway
patch object is structured in the same way as a retrieved private path service
gateway and contains only the information to be updated.

Parameters:

  • id (String)

    The private path service gateway identifier.

  • private_path_service_gateway_patch (Hash)

    The private path service gateway patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
# File 'lib/ibm_vpc/vpc_v1.rb', line 11715

def update_private_path_service_gateway(id:, private_path_service_gateway_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("private_path_service_gateway_patch must be provided") if private_path_service_gateway_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_private_path_service_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = private_path_service_gateway_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/private_path_service_gateways/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:, private_path_service_gateway_account_policy_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an account policy for a private path service gateway. This request updates an account policy with the information in a provided account

policy patch. The account policy patch object is structured in the same way as a
retrieved account policy and contains only the information to be updated.

Parameters:

  • private_path_service_gateway_id (String)

    The private path service gateway identifier.

  • id (String)

    The account policy identifier.

  • private_path_service_gateway_account_policy_patch (Hash)

    The account policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
# File 'lib/ibm_vpc/vpc_v1.rb', line 11949

def (private_path_service_gateway_id:, id:, private_path_service_gateway_account_policy_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("private_path_service_gateway_account_policy_patch must be provided") if .nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_private_path_service_gateway_account_policy")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = 
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/private_path_service_gateways/%s/account_policies/%s" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_public_address_range(id:, public_address_range_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a public address range. This request updates a public address range with the information in a provided

public address range patch. The public address range patch object is structured in
the same way as a retrieved public address range and contains only the information
to be updated.

Parameters:

  • id (String)

    The public address range identifier.

  • public_address_range_patch (Hash)

    The public address range patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
# File 'lib/ibm_vpc/vpc_v1.rb', line 12504

def update_public_address_range(id:, public_address_range_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("public_address_range_patch must be provided") if public_address_range_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_public_address_range")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = public_address_range_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/public_address_ranges/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_public_gateway(id:, public_gateway_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a public gateway. This request updates a public gateway’s name.

Parameters:

  • id (String)

    The public gateway identifier.

  • public_gateway_patch (Hash)

    The public gateway patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
# File 'lib/ibm_vpc/vpc_v1.rb', line 12725

def update_public_gateway(id:, public_gateway_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("public_gateway_patch must be provided") if public_gateway_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_public_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = public_gateway_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/public_gateways/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_reservation(id:, reservation_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a reservation. This request updates a reservation with the information provided in a reservation

patch object. The patch object is structured in the same way as a retrieved
reservation and needs to contain only the information to be updated.

Parameters:

  • id (String)

    The reservation identifier.

  • reservation_patch (Hash)

    The reservation patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
# File 'lib/ibm_vpc/vpc_v1.rb', line 12968

def update_reservation(id:, reservation_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("reservation_patch must be provided") if reservation_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_reservation")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = reservation_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/reservations/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_security_group(id:, security_group_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a security group. This request updates a security group with the information provided in a security

group patch object. The security group patch object is structured in the same way
as a retrieved security group and contains only the information to be updated.

Parameters:

  • id (String)

    The security group identifier.

  • security_group_patch (Hash)

    The security group patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
# File 'lib/ibm_vpc/vpc_v1.rb', line 13231

def update_security_group(id:, security_group_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("security_group_patch must be provided") if security_group_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_security_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = security_group_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/security_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_security_group_rule(security_group_id:, id:, security_group_rule_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a security group rule. This request updates a security group rule with the information in a provided rule

patch object. The rule patch object contains only the information to be updated.
The request will fail if the provided patch includes properties that are not used
by the rule's protocol.

Parameters:

  • security_group_id (String)

    The security group identifier.

  • id (String)

    The rule identifier.

  • security_group_rule_patch (Hash)

    The security group rule patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
# File 'lib/ibm_vpc/vpc_v1.rb', line 13443

def update_security_group_rule(security_group_id:, id:, security_group_rule_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("security_group_rule_patch must be provided") if security_group_rule_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_security_group_rule")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = security_group_rule_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/security_groups/%s/rules/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_share(id:, share_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a file share. This request updates a share with the information in a provided share patch. The

share patch object is structured in the same way as a retrieved share and contains
only the information to be updated.

Parameters:

  • id (String)

    The file share identifier.

  • share_patch (Hash)

    The file share patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
# File 'lib/ibm_vpc/vpc_v1.rb', line 13928

def update_share(id:, share_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("share_patch must be provided") if share_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_share")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = share_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/shares/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_share_mount_target(share_id:, id:, share_mount_target_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a file share mount target. This request updates a share mount target with the information provided in a share

mount target patch object. The share mount target patch object is structured in
the same way as a retrieved share mount target and needs to contain only the
information to be updated.

Parameters:

  • share_id (String)

    The file share identifier.

  • id (String)

    The file share mount target identifier.

  • share_mount_target_patch (Hash)

    The share mount target patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
# File 'lib/ibm_vpc/vpc_v1.rb', line 14331

def update_share_mount_target(share_id:, id:, share_mount_target_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("share_mount_target_patch must be provided") if share_mount_target_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_share_mount_target")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = share_mount_target_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/shares/%s/mount_targets/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_share_snapshot(share_id:, id:, share_snapshot_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a share snapshot. This request updates a share snapshot with the information provided in a share

snapshot patch object. The share snapshot patch object is structured in the same
way as a retrieved share snapshot and needs to contain only the information to be
updated.

Parameters:

  • share_id (String)

    The file share identifier.

  • id (String)

    The share snapshot identifier.

  • share_snapshot_patch (Hash)

    The share snapshot patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
# File 'lib/ibm_vpc/vpc_v1.rb', line 14589

def update_share_snapshot(share_id:, id:, share_snapshot_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("share_id must be provided") if share_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("share_snapshot_patch must be provided") if share_snapshot_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_share_snapshot")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = share_snapshot_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/shares/%s/snapshots/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_snapshot(id:, snapshot_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a snapshot. This request updates a snapshot with the information in a provided snapshot patch.

The snapshot consistency group patch object is structured in the same way as a
retrieved snapshot and contains only the information to be updated.

Parameters:

  • id (String)

    The snapshot identifier.

  • snapshot_patch (Hash)

    The snapshot patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
# File 'lib/ibm_vpc/vpc_v1.rb', line 15192

def update_snapshot(id:, snapshot_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("snapshot_patch must be provided") if snapshot_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_snapshot")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = snapshot_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/snapshots/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_snapshot_consistency_group(id:, snapshot_consistency_group_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a snapshot consistency group. This request updates a snapshot consistency group with the information in a

provided snapshot consistency group patch. The snapshot consistency group patch
object is structured in the same way as a retrieved snapshot consistency group and
contains only the information to be updated.

Parameters:

  • id (String)

    The snapshot consistency group identifier.

  • snapshot_consistency_group_patch (Hash)

    The snapshot consistency group patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
# File 'lib/ibm_vpc/vpc_v1.rb', line 14885

def update_snapshot_consistency_group(id:, snapshot_consistency_group_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("snapshot_consistency_group_patch must be provided") if snapshot_consistency_group_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_snapshot_consistency_group")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = snapshot_consistency_group_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/snapshot_consistency_groups/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_subnet(id:, subnet_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a subnet. This request updates a subnet with the information in a provided subnet patch. The

subnet patch object is structured in the same way as a retrieved subnet and
contains only the information to be updated.

Parameters:

  • id (String)

    The subnet identifier.

  • subnet_patch (Hash)

    The subnet patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
# File 'lib/ibm_vpc/vpc_v1.rb', line 15613

def update_subnet(id:, subnet_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("subnet_patch must be provided") if subnet_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_subnet")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = subnet_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/subnets/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_subnet_reserved_ip(subnet_id:, id:, reserved_ip_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a reserved IP. This request updates a reserved IP with the information in a provided reserved IP

patch. The reserved IP patch object is structured in the same way as a retrieved
reserved IP and contains only the information to be updated.

A provider-owned reserved IP is not allowed to be updated.

Parameters:

  • subnet_id (String)

    The subnet identifier.

  • id (String)

    The reserved IP identifier.

  • reserved_ip_patch (Hash)

    The reserved IP patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
# File 'lib/ibm_vpc/vpc_v1.rb', line 16140

def update_subnet_reserved_ip(subnet_id:, id:, reserved_ip_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("subnet_id must be provided") if subnet_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("reserved_ip_patch must be provided") if reserved_ip_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_subnet_reserved_ip")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = reserved_ip_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(subnet_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_virtual_network_interface(id:, virtual_network_interface_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a virtual network interface. This request updates a virtual network interface with the information in a

provided virtual network interface patch. The virtual network interface patch
object is structured in the same way as a retrieved virtual network interface and
contains only the information to be updated.

Parameters:

  • id (String)

    The virtual network interface identifier.

  • virtual_network_interface_patch (Hash)

    The virtual network interface patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
# File 'lib/ibm_vpc/vpc_v1.rb', line 16426

def update_virtual_network_interface(id:, virtual_network_interface_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("virtual_network_interface_patch must be provided") if virtual_network_interface_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_virtual_network_interface")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = virtual_network_interface_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/virtual_network_interfaces/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_volume(id:, volume_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a volume. This request updates a volume with the information in a provided volume patch. The

volume patch object is structured in the same way as a retrieved volume and
contains only the information to be updated.

Parameters:

  • id (String)

    The volume identifier.

  • volume_patch (Hash)

    The volume patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
# File 'lib/ibm_vpc/vpc_v1.rb', line 17083

def update_volume(id:, volume_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("volume_patch must be provided") if volume_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_volume")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = volume_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/volumes/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_volume_job(volume_id:, id:, volume_job_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a volume job. This request updates an volume job with the information in a provided volume job

patch. The volume job patch object is structured in the same way as a retrieved
volume job and contains only the information to be updated.

Parameters:

  • volume_id (String)

    The volume identifier.

  • id (String)

    The volume job identifier.

  • volume_job_patch (Hash)

    The volume job patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
# File 'lib/ibm_vpc/vpc_v1.rb', line 17344

def update_volume_job(volume_id:, id:, volume_job_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("volume_id must be provided") if volume_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("volume_job_patch must be provided") if volume_job_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_volume_job")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = volume_job_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/volumes/%s/jobs/%s" % [ERB::Util.url_encode(volume_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpc(id:, vpc_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPC. This request updates a VPC with the information provided in a VPC patch object.

The patch object is structured in the same way as a retrieved VPC and needs to
contain only the information to be updated.

Parameters:

  • id (String)

    The VPC identifier.

  • vpc_patch (Hash)

    The VPC patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
# File 'lib/ibm_vpc/vpc_v1.rb', line 17643

def update_vpc(id:, vpc_patch:, if_match: nil)
  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_patch must be provided") if vpc_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpc")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = vpc_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpcs/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpc_address_prefix(vpc_id:, id:, address_prefix_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update an address prefix. This request updates a prefix with the information in a provided prefix patch. The

prefix patch object is structured in the same way as a retrieved prefix and
contains only the information to be updated.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The prefix identifier.

  • address_prefix_patch (Hash)

    The prefix patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
# File 'lib/ibm_vpc/vpc_v1.rb', line 17983

def update_vpc_address_prefix(vpc_id:, id:, address_prefix_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("address_prefix_patch must be provided") if address_prefix_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpc_address_prefix")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = address_prefix_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpcs/%s/address_prefixes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpc_dns_resolution_binding(vpc_id:, id:, vpcdns_resolution_binding_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a DNS resolution binding. This request updates a DNS resolution binding with the information in a provided

DNS resolution binding patch. The DNS resolution binding patch object is
structured in the same way as a retrieved DNS resolution binding and contains only
the information to be updated.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The DNS resolution binding identifier.

  • vpcdns_resolution_binding_patch (Hash)

    The DNS resolution binding patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
# File 'lib/ibm_vpc/vpc_v1.rb', line 18272

def update_vpc_dns_resolution_binding(vpc_id:, id:, vpcdns_resolution_binding_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("vpcdns_resolution_binding_patch must be provided") if vpcdns_resolution_binding_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpc_dns_resolution_binding")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = vpcdns_resolution_binding_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpcs/%s/dns_resolution_bindings/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpc_route(vpc_id:, id:, route_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPC route. This request updates a route with the information in a provided route patch. The

route patch object is structured in the same way as a retrieved route and contains
only the information to be updated.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The route identifier.

  • route_patch (Hash)

    The route patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
# File 'lib/ibm_vpc/vpc_v1.rb', line 18537

def update_vpc_route(vpc_id:, id:, route_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("route_patch must be provided") if route_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpc_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = route_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpcs/%s/routes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpc_routing_table(vpc_id:, id:, routing_table_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPC routing table. This request updates a routing table with the information in a provided routing

table patch. The patch object is structured in the same way as a retrieved table
and contains only the information to be updated.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • id (String)

    The routing table identifier.

  • routing_table_patch (Hash)

    The routing table patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
# File 'lib/ibm_vpc/vpc_v1.rb', line 18822

def update_vpc_routing_table(vpc_id:, id:, routing_table_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("routing_table_patch must be provided") if routing_table_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpc_routing_table")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = routing_table_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpcs/%s/routing_tables/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpc_routing_table_route(vpc_id:, routing_table_id:, id:, route_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPC routing table route. This request updates a VPC route with the information provided in a route patch

object. The patch object is structured in the same way as a retrieved VPC route
and needs to contain only the information to be updated. Only VPC routes with an
`origin` of `user` are allowed to be updated.

Parameters:

  • vpc_id (String)

    The VPC identifier.

  • routing_table_id (String)

    The routing table identifier.

  • id (String)

    The VPC routing table route identifier.

  • route_patch (Hash)

    The VPC route patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
# File 'lib/ibm_vpc/vpc_v1.rb', line 19102

def update_vpc_routing_table_route(vpc_id:, routing_table_id:, id:, route_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpc_id must be provided") if vpc_id.nil?

  raise ArgumentError.new("routing_table_id must be provided") if routing_table_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("route_patch must be provided") if route_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpc_routing_table_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = route_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpcs/%s/routing_tables/%s/routes/%s" % [ERB::Util.url_encode(vpc_id), ERB::Util.url_encode(routing_table_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpn_gateway(id:, vpn_gateway_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPN gateway. This request updates the properties of an existing VPN gateway.

Parameters:

  • id (String)

    The VPN gateway identifier.

  • vpn_gateway_patch (Hash)

    The VPN gateway patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
# File 'lib/ibm_vpc/vpc_v1.rb', line 19821

def update_vpn_gateway(id:, vpn_gateway_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("vpn_gateway_patch must be provided") if vpn_gateway_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpn_gateway")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = vpn_gateway_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpn_gateway_connection(vpn_gateway_id:, id:, vpn_gateway_connection_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPN gateway connection. This request updates the properties of an existing VPN gateway connection.

Parameters:

  • vpn_gateway_id (String)

    The VPN gateway identifier.

  • id (String)

    The VPN gateway connection identifier.

  • vpn_gateway_connection_patch (Hash)

    The VPN gateway connection patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
# File 'lib/ibm_vpc/vpc_v1.rb', line 20192

def update_vpn_gateway_connection(vpn_gateway_id:, id:, vpn_gateway_connection_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("vpn_gateway_connection_patch must be provided") if vpn_gateway_connection_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpn_gateway_connection")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = vpn_gateway_connection_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpn_gateways/%s/connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpn_server(id:, vpn_server_patch:, if_match: nil) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPN server. This request updates the properties of an existing VPN server. Any updates other

than to `name` will cause all connected VPN clients to be disconnected.

Parameters:

  • id (String)

    The VPN server identifier.

  • vpn_server_patch (Hash)

    The VPN server patch.

  • if_match (String) (defaults to: nil)

    If present, the request will fail if the specified ETag value does not match the resource’s current ETag value. Required if the request body includes an array.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
# File 'lib/ibm_vpc/vpc_v1.rb', line 20878

def update_vpn_server(id:, vpn_server_patch:, if_match: nil)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("vpn_server_patch must be provided") if vpn_server_patch.nil?

  headers = {
    "If-Match" => if_match
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpn_server")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = vpn_server_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpn_servers/%s" % [ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end

#update_vpn_server_route(vpn_server_id:, id:, vpn_server_route_patch:) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPN route. This request updates a VPN route with the information in a provided VPN route

patch. The VPN route patch object is structured in the same way as a retrieved VPN
route and contains only the information to be updated.

Parameters:

  • vpn_server_id (String)

    The VPN server identifier.

  • id (String)

    The VPN route identifier.

  • vpn_server_route_patch (Hash)

    The VPN route patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

    A ‘IBMCloudSdkCore::DetailedResponse` object representing the response.

Raises:

  • (ArgumentError)


21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
# File 'lib/ibm_vpc/vpc_v1.rb', line 21309

def update_vpn_server_route(vpn_server_id:, id:, vpn_server_route_patch:)
  raise ArgumentError.new("version must be provided") if version.nil?

  raise ArgumentError.new("generation must be provided") if generation.nil?

  raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.nil?

  raise ArgumentError.new("id must be provided") if id.nil?

  raise ArgumentError.new("vpn_server_route_patch must be provided") if vpn_server_route_patch.nil?

  headers = {
  }
  sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpn_server_route")
  headers.merge!(sdk_headers)

  params = {
    "version" => @version,
    "generation" => @generation
  }

  data = vpn_server_route_patch
  headers["Content-Type"] = "application/merge-patch+json"

  method_url = "/vpn_servers/%s/routes/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)]

  response = request(
    method: "PATCH",
    url: method_url,
    headers: headers,
    params: params,
    data: data,
    accept_json: true
  )
  response
end