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 =
"2025-07-15"

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-06-30` and `2025-07-15`.

  • 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) (defaults to: )

    The reservation 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
# File 'lib/ibm_vpc/vpc_v1.rb', line 6813

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) (defaults to: )

    The bare metal server identifier.

  • network_interface_id (String) (defaults to: )

    The bare metal server network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
# File 'lib/ibm_vpc/vpc_v1.rb', line 8640

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) (defaults to: )

    The endpoint gateway identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 19321

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) (defaults to: )

    The virtual server instance identifier.

  • network_interface_id (String) (defaults to: )

    The instance network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
# File 'lib/ibm_vpc/vpc_v1.rb', line 5116

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) (defaults to: )

    The virtual network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
12420
12421
12422
12423
# File 'lib/ibm_vpc/vpc_v1.rb', line 12394

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) (defaults to: )

    The virtual network interface identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
# File 'lib/ibm_vpc/vpc_v1.rb', line 12563

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_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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

  • cidr (String) (defaults to: )

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
# File 'lib/ibm_vpc/vpc_v1.rb', line 16401

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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

  • cidr (String) (defaults to: )

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
# File 'lib/ibm_vpc/vpc_v1.rb', line 16573

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

#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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

  • cidr (String) (defaults to: )

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
# File 'lib/ibm_vpc/vpc_v1.rb', line 16356

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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

  • cidr (String) (defaults to: )

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
# File 'lib/ibm_vpc/vpc_v1.rb', line 16528

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) (defaults to: )

    The backup policy prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
# File 'lib/ibm_vpc/vpc_v1.rb', line 11308

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) (defaults to: )

    The backup policy identifier.

  • cron_spec (String) (defaults to: )

    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)


11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
# File 'lib/ibm_vpc/vpc_v1.rb', line 11511

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) (defaults to: )

    The bare metal server prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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

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) (defaults to: )

    The bare metal server identifier.

  • console_type (String) (defaults to: )

    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)


7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
# File 'lib/ibm_vpc/vpc_v1.rb', line 7870

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) (defaults to: )

    The bare metal server identifier.

  • bare_metal_server_network_attachment_prototype (BareMetalServerNetworkAttachmentPrototype) (defaults to: )

    The bare metal server network attachment prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
8114
8115
8116
8117
8118
# File 'lib/ibm_vpc/vpc_v1.rb', line 8085

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) (defaults to: )

    The bare metal server identifier.

  • bare_metal_server_network_interface_prototype (BareMetalServerNetworkInterfacePrototype) (defaults to: )

    The bare metal server network interface prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
# File 'lib/ibm_vpc/vpc_v1.rb', line 8318

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) (defaults to: )

    The profile to use for this cluster network.

  • vpc (VPCIdentity) (defaults to: )

    The VPC this cluster network will reside in.

  • zone (ZoneIdentity) (defaults to: )

    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)


12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
# File 'lib/ibm_vpc/vpc_v1.rb', line 12749

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) (defaults to: )

    The virtual server instance identifier.

  • cluster_network_interface (InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface) (defaults to: )

    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)


4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 4141

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) (defaults to: )

    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)


12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
# File 'lib/ibm_vpc/vpc_v1.rb', line 12880

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) (defaults to: )

    The cluster network identifier.

  • cluster_network_subnet_prototype (ClusterNetworkSubnetPrototype) (defaults to: )

    The cluster network subnet prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


13110
13111
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 13110

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) (defaults to: )

    The cluster network identifier.

  • cluster_network_subnet_id (String) (defaults to: )

    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)


13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
# File 'lib/ibm_vpc/vpc_v1.rb', line 13213

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) (defaults to: )

    The dedicated host prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
# File 'lib/ibm_vpc/vpc_v1.rb', line 7192

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) (defaults to: )

    The dedicated host profile class for hosts in this group.

  • family (String) (defaults to: )

    The dedicated host profile family for hosts in this group.

  • zone (ZoneIdentity) (defaults to: )

    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)


6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
# File 'lib/ibm_vpc/vpc_v1.rb', line 6905

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: , allow_dns_resolution_binding: 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) (defaults to: )

    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 ‘allow_dns_resolution_binding` is `true`, then there must not be another endpoint gateway with `allow_dns_resolution_binding` set to `true` 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.
    
  • vpc (VPCIdentity) (defaults to: )

    The VPC this endpoint gateway will reside in.

  • allow_dns_resolution_binding (Boolean) (defaults to: nil)

    Indicates whether to allow DNS resolution for this endpoint gateway when the VPC this endpoint gateway resides in has a DNS resolution binding to a VPC with ‘dns.enable_hub` set to `true`.

    If ‘true`, then there must not be another endpoint gateway with `allow_dns_resolution_binding` set to `true` 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.
    

    Must be ‘true` if the VPC this endpoint gateway resides in has `dns.enable_hub` set to `true`.

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


19143
19144
19145
19146
19147
19148
19149
19150
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
19179
19180
19181
19182
19183
# File 'lib/ibm_vpc/vpc_v1.rb', line 19143

def create_endpoint_gateway(target:, vpc:, allow_dns_resolution_binding: 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,
    "allow_dns_resolution_binding" => allow_dns_resolution_binding,
    "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_floating_ip(floating_ip_prototype: ) ⇒ IBMCloudSdkCore::DetailedResponse

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

Parameters:

  • floating_ip_prototype (FloatingIPPrototype) (defaults to: )

    The floating IP prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
# File 'lib/ibm_vpc/vpc_v1.rb', line 13940

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) (defaults to: )

    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) (defaults to: )

    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.

    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.

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


19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 19567

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) (defaults to: )

    The authentication algorithm.

  • dh_group (Fixnum) (defaults to: )

    The Diffie-Hellman group.

  • encryption_algorithm (String) (defaults to: )

    The encryption algorithm.

  • ike_version (Fixnum) (defaults to: )

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


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
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
# File 'lib/ibm_vpc/vpc_v1.rb', line 15393

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) (defaults to: )

    The image prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
# File 'lib/ibm_vpc/vpc_v1.rb', line 2608

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) (defaults to: )

    The image identifier.

  • storage_bucket (CloudObjectStorageBucketIdentity) (defaults to: )

    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)


3001
3002
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 3001

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) (defaults to: )

    The instance prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 3819

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) (defaults to: )

    The virtual server instance identifier.

  • type (String) (defaults to: )

    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)


4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
# File 'lib/ibm_vpc/vpc_v1.rb', line 4030

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) (defaults to: )

    The virtual server instance identifier.

  • console_type (String) (defaults to: )

    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)


4322
4323
4324
4325
4326
4327
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 4322

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) (defaults to: )

    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]) (defaults to: )

    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)


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
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
# File 'lib/ibm_vpc/vpc_v1.rb', line 5526

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_prototype (InstanceGroupManagerPrototype) (defaults to: )

    The instance group manager prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
# File 'lib/ibm_vpc/vpc_v1.rb', line 5766

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    The instance group manager identifier.

  • instance_group_manager_action_prototype (InstanceGroupManagerActionPrototype) (defaults to: )

    The instance group manager action prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5974
5975
5976
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
6005
6006
6007
6008
6009
# File 'lib/ibm_vpc/vpc_v1.rb', line 5974

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    The instance group manager identifier.

  • instance_group_manager_policy_prototype (InstanceGroupManagerPolicyPrototype) (defaults to: )

    The instance group manager policy prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
# File 'lib/ibm_vpc/vpc_v1.rb', line 6193

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) (defaults to: )

    The virtual server instance identifier.

  • virtual_network_interface (InstanceNetworkAttachmentPrototypeVirtualNetworkInterface) (defaults to: )

    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)


4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
# File 'lib/ibm_vpc/vpc_v1.rb', line 4543

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) (defaults to: )

    The virtual server instance identifier.

  • subnet (SubnetIdentity) (defaults to: )

    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)


4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
# File 'lib/ibm_vpc/vpc_v1.rb', line 4794

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) (defaults to: )

    The instance template prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
# File 'lib/ibm_vpc/vpc_v1.rb', line 3567

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) (defaults to: )

    The virtual server instance identifier.

  • volume (VolumeAttachmentPrototypeVolume) (defaults to: )

    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)


5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
# File 'lib/ibm_vpc/vpc_v1.rb', line 5286

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) (defaults to: )

    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) (defaults to: )

    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) (defaults to: )

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


15654
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
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
# File 'lib/ibm_vpc/vpc_v1.rb', line 15654

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) (defaults to: )

    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)


3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 3301

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) (defaults to: )

    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]) (defaults to: )

    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)


17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
# File 'lib/ibm_vpc/vpc_v1.rb', line 17464

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) (defaults to: )

    The load balancer identifier.

  • protocol (String) (defaults to: )

    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.

    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)


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
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
# File 'lib/ibm_vpc/vpc_v1.rb', line 17799

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • action (String) (defaults to: )

    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) (defaults to: )

    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)


18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 18047

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • policy_id (String) (defaults to: )

    The policy identifier.

  • condition (String) (defaults to: )

    The condition for the rule.

  • type (String) (defaults to: )

    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) (defaults to: )

    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)


18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
# File 'lib/ibm_vpc/vpc_v1.rb', line 18293

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) (defaults to: )

    The load balancer identifier.

  • algorithm (String) (defaults to: )

    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) (defaults to: )

    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) (defaults to: )

    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)


18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
# File 'lib/ibm_vpc/vpc_v1.rb', line 18564

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) (defaults to: )

    The load balancer identifier.

  • pool_id (String) (defaults to: )

    The pool identifier.

  • port (Fixnum) (defaults to: )

    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) (defaults to: )

    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)


18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 18810

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) (defaults to: )

    The network ACL prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
# File 'lib/ibm_vpc/vpc_v1.rb', line 14360

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) (defaults to: )

    The network ACL identifier.

  • network_acl_rule_prototype (NetworkACLRulePrototype) (defaults to: )

    The network ACL rule prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
# File 'lib/ibm_vpc/vpc_v1.rb', line 14561

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) (defaults to: )

    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)


7517
7518
7519
7520
7521
7522
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 7517

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) (defaults to: )

    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]) (defaults to: )

    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)


19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 19806

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) (defaults to: )

    The private path service gateway identifier.

  • access_policy (String) (defaults to: )

    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) (defaults to: )

    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)


20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
# File 'lib/ibm_vpc/vpc_v1.rb', line 20037

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) (defaults to: )

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


14151
14152
14153
14154
14155
14156
14157
14158
14159
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 14151

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) (defaults to: )

    The VPC this public gateway will reside in.

  • zone (ZoneIdentity) (defaults to: )

    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)


13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
# File 'lib/ibm_vpc/vpc_v1.rb', line 13717

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) (defaults to: )

    The capacity reservation configuration to use.

  • committed_use (ReservationCommittedUsePrototype) (defaults to: )

    The committed use configuration to use for this reservation.

  • profile (ReservationProfilePrototype) (defaults to: )

    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) (defaults to: )

    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)


6645
6646
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
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
# File 'lib/ibm_vpc/vpc_v1.rb', line 6645

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) (defaults to: )

    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)


14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
# File 'lib/ibm_vpc/vpc_v1.rb', line 14793

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) (defaults to: )

    The security group identifier.

  • security_group_rule_prototype (SecurityGroupRulePrototype) (defaults to: )

    The properties of the security group rule to be created.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
# File 'lib/ibm_vpc/vpc_v1.rb', line 14999

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) (defaults to: )

    The security group identifier.

  • id (String) (defaults to: )

    The security group target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15308
15309
15310
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 15308

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) (defaults to: )

    The file share prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
10377
10378
10379
10380
10381
10382
# File 'lib/ibm_vpc/vpc_v1.rb', line 10351

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) (defaults to: )

    The file share identifier.

  • share_mount_target_prototype (ShareMountTargetPrototype) (defaults to: )

    The share mount target prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
# File 'lib/ibm_vpc/vpc_v1.rb', line 10751

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) (defaults to: )

    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)


10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
# File 'lib/ibm_vpc/vpc_v1.rb', line 10995

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) (defaults to: )

    The snapshot prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
# File 'lib/ibm_vpc/vpc_v1.rb', line 9856

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) (defaults to: )

    The snapshot identifier.

  • zone_name (String) (defaults to: )

    The zone name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
# File 'lib/ibm_vpc/vpc_v1.rb', line 10132

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) (defaults to: )

    The snapshot consistency group prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
# File 'lib/ibm_vpc/vpc_v1.rb', line 9548

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) (defaults to: )

    The subnet prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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 1851

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) (defaults to: )

    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)


2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
# File 'lib/ibm_vpc/vpc_v1.rb', line 2365

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)


12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 12086

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) (defaults to: )

    The volume prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
# File 'lib/ibm_vpc/vpc_v1.rb', line 9287

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

    This property has been deprecated. Instead, use a [Transit Gateway](cloud.ibm.com/docs/transit-gateway) to connect this VPC to Classic Infrastructure. For more information, see [upcoming changes](cloud.ibm.com/docs/vpc?topic=vpc-api-change-log#upcoming-changes).

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


163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/ibm_vpc/vpc_v1.rb', line 163

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) (defaults to: )

    The VPC identifier.

  • cidr (String) (defaults to: )

    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) (defaults to: )

    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)


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

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 `allow_dns_resolution_binding` set to `true` targeting the same
service.

See [About DNS sharing for VPE gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) for
more information.

Parameters:

  • vpc_id (String) (defaults to: )

    The VPC identifier.

  • vpc (VPCIdentity) (defaults to: )

    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)


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

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) (defaults to: )

    The VPC identifier.

  • destination (String) (defaults to: )

    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) (defaults to: )

    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)


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

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) (defaults to: )

    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)


1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
# File 'lib/ibm_vpc/vpc_v1.rb', line 1326

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) (defaults to: )

    The VPC identifier.

  • routing_table_id (String) (defaults to: )

    The routing table identifier.

  • destination (String) (defaults to: )

    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) (defaults to: )

    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)


1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
# File 'lib/ibm_vpc/vpc_v1.rb', line 1599

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) (defaults to: )

    The VPN gateway prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
# File 'lib/ibm_vpc/vpc_v1.rb', line 15905

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) (defaults to: )

    The VPN gateway identifier.

  • vpn_gateway_connection_prototype (VPNGatewayConnectionPrototype) (defaults to: )

    The VPN gateway connection prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
# File 'lib/ibm_vpc/vpc_v1.rb', line 16103

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) (defaults to: )

    The certificate instance for this VPN server.

  • client_authentication (Array[VPNServerAuthenticationPrototype]) (defaults to: )

    The methods used to authenticate VPN clients to this VPN server. VPN clients must authenticate against all specified methods.

  • client_ip_pool (String) (defaults to: )

    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]) (defaults to: )

    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)


16694
16695
16696
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
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
# File 'lib/ibm_vpc/vpc_v1.rb', line 16694

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) (defaults to: )

    The VPN server identifier.

  • destination (String) (defaults to: )

    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)


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
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
# File 'lib/ibm_vpc/vpc_v1.rb', line 17135

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) (defaults to: )

    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)


11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
# File 'lib/ibm_vpc/vpc_v1.rb', line 11703

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) (defaults to: )

    The backup policy identifier.

  • id (String) (defaults to: )

    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)


11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
# File 'lib/ibm_vpc/vpc_v1.rb', line 11570

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) (defaults to: )

    The bare metal server identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
# File 'lib/ibm_vpc/vpc_v1.rb', line 8762

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) (defaults to: )

    The bare metal server identifier.

  • id (String) (defaults to: )

    The bare metal server network attachment identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
# File 'lib/ibm_vpc/vpc_v1.rb', line 8131

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) (defaults to: )

    The bare metal server identifier.

  • id (String) (defaults to: )

    The bare metal server network interface identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
# File 'lib/ibm_vpc/vpc_v1.rb', line 8369

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) (defaults to: )

    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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 13539

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) (defaults to: )

    The cluster network identifier.

  • id (String) (defaults to: )

    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)


12928
12929
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
12958
# File 'lib/ibm_vpc/vpc_v1.rb', line 12928

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) (defaults to: )

    The cluster network identifier.

  • id (String) (defaults to: )

    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)


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
13431
13432
13433
13434
13435
13436
# File 'lib/ibm_vpc/vpc_v1.rb', line 13406

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) (defaults to: )

    The cluster network identifier.

  • cluster_network_subnet_id (String) (defaults to: )

    The cluster network subnet identifier.

  • id (String) (defaults to: )

    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)


13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
# File 'lib/ibm_vpc/vpc_v1.rb', line 13264

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) (defaults to: )

    The dedicated host identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
# File 'lib/ibm_vpc/vpc_v1.rb', line 7356

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) (defaults to: )

    The dedicated host group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
# File 'lib/ibm_vpc/vpc_v1.rb', line 6953

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.

Parameters:

  • id (String) (defaults to: )

    The endpoint gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19361
19362
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 19361

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_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) (defaults to: )

    The floating IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
14007
14008
# File 'lib/ibm_vpc/vpc_v1.rb', line 13981

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) (defaults to: )

    The flow log collector identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
# File 'lib/ibm_vpc/vpc_v1.rb', line 19617

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) (defaults to: )

    The IKE policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15447
15448
15449
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 15447

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) (defaults to: )

    The image identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
# File 'lib/ibm_vpc/vpc_v1.rb', line 2653

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) (defaults to: )

    The image identifier.

  • id (String) (defaults to: )

    The image export job identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


3049
3050
3051
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 3049

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) (defaults to: )

    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)


3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
# File 'lib/ibm_vpc/vpc_v1.rb', line 3867

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance cluster network attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
# File 'lib/ibm_vpc/vpc_v1.rb', line 4190

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) (defaults to: )

    The instance group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
# File 'lib/ibm_vpc/vpc_v1.rb', line 5576

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) (defaults to: )

    The instance group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
# File 'lib/ibm_vpc/vpc_v1.rb', line 5691

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) (defaults to: )

    The instance group identifier.

  • id (String) (defaults to: )

    The instance group manager identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
# File 'lib/ibm_vpc/vpc_v1.rb', line 5808

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    The instance group manager identifier.

  • id (String) (defaults to: )

    The instance group manager action identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
# File 'lib/ibm_vpc/vpc_v1.rb', line 6020

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    The instance group manager identifier.

  • id (String) (defaults to: )

    The instance group manager policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
# File 'lib/ibm_vpc/vpc_v1.rb', line 6239

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) (defaults to: )

    The instance group identifier.

  • id (String) (defaults to: )

    The instance group membership identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
# File 'lib/ibm_vpc/vpc_v1.rb', line 6447

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) (defaults to: )

    The instance group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
# File 'lib/ibm_vpc/vpc_v1.rb', line 6370

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance network attachment identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
# File 'lib/ibm_vpc/vpc_v1.rb', line 4591

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance network interface identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
# File 'lib/ibm_vpc/vpc_v1.rb', line 4850

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) (defaults to: )

    The instance template identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
# File 'lib/ibm_vpc/vpc_v1.rb', line 3606

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The volume attachment identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
# File 'lib/ibm_vpc/vpc_v1.rb', line 5333

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) (defaults to: )

    The IPsec policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
# File 'lib/ibm_vpc/vpc_v1.rb', line 15705

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) (defaults to: )

    The key identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
# File 'lib/ibm_vpc/vpc_v1.rb', line 3344

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) (defaults to: )

    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)


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
17547
17548
17549
# File 'lib/ibm_vpc/vpc_v1.rb', line 17521

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) (defaults to: )

    The load balancer identifier.

  • id (String) (defaults to: )

    The listener identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


17854
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 17854

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • id (String) (defaults to: )

    The policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
# File 'lib/ibm_vpc/vpc_v1.rb', line 18099

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • policy_id (String) (defaults to: )

    The policy identifier.

  • id (String) (defaults to: )

    The rule identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
# File 'lib/ibm_vpc/vpc_v1.rb', line 18350

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) (defaults to: )

    The load balancer identifier.

  • id (String) (defaults to: )

    The pool identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
# File 'lib/ibm_vpc/vpc_v1.rb', line 18620

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) (defaults to: )

    The load balancer identifier.

  • pool_id (String) (defaults to: )

    The pool identifier.

  • id (String) (defaults to: )

    The member identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
# File 'lib/ibm_vpc/vpc_v1.rb', line 18907

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) (defaults to: )

    The network ACL identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
# File 'lib/ibm_vpc/vpc_v1.rb', line 14401

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) (defaults to: )

    The network ACL identifier.

  • id (String) (defaults to: )

    The rule identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
# File 'lib/ibm_vpc/vpc_v1.rb', line 14603

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) (defaults to: )

    The placement group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
# File 'lib/ibm_vpc/vpc_v1.rb', line 7561

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) (defaults to: )

    The private path service gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
# File 'lib/ibm_vpc/vpc_v1.rb', line 19855

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) (defaults to: )

    The private path service gateway identifier.

  • id (String) (defaults to: )

    The account policy identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
# File 'lib/ibm_vpc/vpc_v1.rb', line 20084

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) (defaults to: )

    The public address range identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
# File 'lib/ibm_vpc/vpc_v1.rb', line 14196

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) (defaults to: )

    The public gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
13792
13793
# File 'lib/ibm_vpc/vpc_v1.rb', line 13766

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) (defaults to: )

    The reservation identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 6698

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) (defaults to: )

    The security group identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
# File 'lib/ibm_vpc/vpc_v1.rb', line 14838

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) (defaults to: )

    The security group identifier.

  • id (String) (defaults to: )

    The rule identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
# File 'lib/ibm_vpc/vpc_v1.rb', line 15043

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) (defaults to: )

    The security group identifier.

  • id (String) (defaults to: )

    The security group target identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
# File 'lib/ibm_vpc/vpc_v1.rb', line 15220

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) (defaults to: )

    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)


10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
# File 'lib/ibm_vpc/vpc_v1.rb', line 10399

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) (defaults to: )

    The file share identifier.

  • id (String) (defaults to: )

    The file share accessor binding identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 10562

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) (defaults to: )

    The file share identifier.

  • id (String) (defaults to: )

    The file share mount target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
# File 'lib/ibm_vpc/vpc_v1.rb', line 10797

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) (defaults to: )

    The file share identifier.

  • id (String) (defaults to: )

    The share snapshot identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
# File 'lib/ibm_vpc/vpc_v1.rb', line 11053

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) (defaults to: )

    The file share identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
# File 'lib/ibm_vpc/vpc_v1.rb', line 11185

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) (defaults to: )

    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)


9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
# File 'lib/ibm_vpc/vpc_v1.rb', line 9897

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) (defaults to: )

    The snapshot identifier.

  • zone_name (String) (defaults to: )

    The zone name.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 10053

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) (defaults to: )

    The snapshot consistency group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
# File 'lib/ibm_vpc/vpc_v1.rb', line 9589

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) (defaults to: )

    Filters the collection to resources with a ‘source_volume.id` property matching the specified identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
# File 'lib/ibm_vpc/vpc_v1.rb', line 9710

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) (defaults to: )

    The subnet identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
# File 'lib/ibm_vpc/vpc_v1.rb', line 1896

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) (defaults to: )

    The subnet identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
# File 'lib/ibm_vpc/vpc_v1.rb', line 2414

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: ) ⇒ 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) (defaults to: )

    The virtual network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
# File 'lib/ibm_vpc/vpc_v1.rb', line 12136

def delete_virtual_network_interfaces(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_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) (defaults to: )

    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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 9329

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_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) (defaults to: )

    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)


218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/ibm_vpc/vpc_v1.rb', line 218

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The prefix identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
# File 'lib/ibm_vpc/vpc_v1.rb', line 555

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The DNS resolution binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
# File 'lib/ibm_vpc/vpc_v1.rb', line 830

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The route identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


1097
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 1097

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    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)


1378
1379
1380
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 1378

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) (defaults to: )

    The VPC identifier.

  • routing_table_id (String) (defaults to: )

    The routing table identifier.

  • id (String) (defaults to: )

    The VPC routing table route identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
# File 'lib/ibm_vpc/vpc_v1.rb', line 1654

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) (defaults to: )

    The VPN gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15947
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 15947

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: ) ⇒ 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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
16176
# File 'lib/ibm_vpc/vpc_v1.rb', line 16147

def delete_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", "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) (defaults to: )

    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)


16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
# File 'lib/ibm_vpc/vpc_v1.rb', line 16753

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) (defaults to: )

    The VPN server identifier.

  • id (String) (defaults to: )

    The VPN client identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
# File 'lib/ibm_vpc/vpc_v1.rb', line 16955

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) (defaults to: )

    The VPN server identifier.

  • id (String) (defaults to: )

    The VPN route identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
17208
17209
# File 'lib/ibm_vpc/vpc_v1.rb', line 17180

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) (defaults to: )

    The private path service gateway identifier.

  • id (String) (defaults to: )

    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)


20315
20316
20317
20318
20319
20320
20321
20322
20323
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 20315

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) (defaults to: )

    The image identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


2818
2819
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 2818

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) (defaults to: )

    The VPN server identifier.

  • id (String) (defaults to: )

    The VPN client identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
# File 'lib/ibm_vpc/vpc_v1.rb', line 17034

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) (defaults to: )

    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)


10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
# File 'lib/ibm_vpc/vpc_v1.rb', line 10657

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) (defaults to: )

    The backup policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
# File 'lib/ibm_vpc/vpc_v1.rb', line 11740

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) (defaults to: )

    The backup policy identifier.

  • id (String) (defaults to: )

    The backup policy job identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
# File 'lib/ibm_vpc/vpc_v1.rb', line 11411

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) (defaults to: )

    The backup policy identifier.

  • id (String) (defaults to: )

    The backup policy plan identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
# File 'lib/ibm_vpc/vpc_v1.rb', line 11610

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) (defaults to: )

    The bare metal server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
# File 'lib/ibm_vpc/vpc_v1.rb', line 8798

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) (defaults to: )

    The bare metal server identifier.

  • id (String) (defaults to: )

    The bare metal server disk identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
# File 'lib/ibm_vpc/vpc_v1.rb', line 7951

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) (defaults to: )

    The bare metal server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
# File 'lib/ibm_vpc/vpc_v1.rb', line 8925

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) (defaults to: )

    The bare metal server identifier.

  • id (String) (defaults to: )

    The bare metal server network attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 8170

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) (defaults to: )

    The bare metal server identifier.

  • id (String) (defaults to: )

    The bare metal server network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
# File 'lib/ibm_vpc/vpc_v1.rb', line 8414

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) (defaults to: )

    The bare metal server identifier.

  • network_interface_id (String) (defaults to: )

    The bare metal server network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
# File 'lib/ibm_vpc/vpc_v1.rb', line 8590

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) (defaults to: )

    The bare metal server identifier.

  • network_interface_id (String) (defaults to: )

    The bare metal server network interface identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
# File 'lib/ibm_vpc/vpc_v1.rb', line 8721

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) (defaults to: )

    The bare metal server profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7719
7720
7721
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 7719

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) (defaults to: )

    The cluster network identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


13576
13577
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 13576

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) (defaults to: )

    The cluster network identifier.

  • id (String) (defaults to: )

    The cluster network interface identifier.

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
# File 'lib/ibm_vpc/vpc_v1.rb', line 12968

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) (defaults to: )

    The cluster network profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
# File 'lib/ibm_vpc/vpc_v1.rb', line 12642

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) (defaults to: )

    The cluster network identifier.

  • id (String) (defaults to: )

    The cluster network subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 13446

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) (defaults to: )

    The cluster network identifier.

  • cluster_network_subnet_id (String) (defaults to: )

    The cluster network subnet identifier.

  • id (String) (defaults to: )

    The cluster network subnet reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
# File 'lib/ibm_vpc/vpc_v1.rb', line 13307

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) (defaults to: )

    The dedicated host identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
# File 'lib/ibm_vpc/vpc_v1.rb', line 7392

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) (defaults to: )

    The dedicated host identifier.

  • id (String) (defaults to: )

    The dedicated host disk identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
7298
7299
7300
# File 'lib/ibm_vpc/vpc_v1.rb', line 7271

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) (defaults to: )

    The dedicated host group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
# File 'lib/ibm_vpc/vpc_v1.rb', line 6989

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) (defaults to: )

    The dedicated host profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
# File 'lib/ibm_vpc/vpc_v1.rb', line 7109

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) (defaults to: )

    The endpoint gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
# File 'lib/ibm_vpc/vpc_v1.rb', line 19397

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) (defaults to: )

    The endpoint gateway identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
# File 'lib/ibm_vpc/vpc_v1.rb', line 19278

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_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) (defaults to: )

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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 14017

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) (defaults to: )

    The flow log collector identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
# File 'lib/ibm_vpc/vpc_v1.rb', line 19653

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) (defaults to: )

    The IKE policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
# File 'lib/ibm_vpc/vpc_v1.rb', line 15482

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) (defaults to: )

    The image identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
# File 'lib/ibm_vpc/vpc_v1.rb', line 2688

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) (defaults to: )

    The image identifier.

  • id (String) (defaults to: )

    The image export job identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3088
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
3117
# File 'lib/ibm_vpc/vpc_v1.rb', line 3088

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) (defaults to: )

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
# File 'lib/ibm_vpc/vpc_v1.rb', line 3903

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance cluster network attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
# File 'lib/ibm_vpc/vpc_v1.rb', line 4229

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance disk identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
# File 'lib/ibm_vpc/vpc_v1.rb', line 4405

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) (defaults to: )

    The instance group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
# File 'lib/ibm_vpc/vpc_v1.rb', line 5611

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) (defaults to: )

    The instance group identifier.

  • id (String) (defaults to: )

    The instance group manager identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
# File 'lib/ibm_vpc/vpc_v1.rb', line 5847

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    The instance group manager identifier.

  • id (String) (defaults to: )

    The instance group manager action identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
# File 'lib/ibm_vpc/vpc_v1.rb', line 6062

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    The instance group manager identifier.

  • id (String) (defaults to: )

    The instance group manager policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
# File 'lib/ibm_vpc/vpc_v1.rb', line 6281

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) (defaults to: )

    The instance group identifier.

  • id (String) (defaults to: )

    The instance group membership identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
# File 'lib/ibm_vpc/vpc_v1.rb', line 6486

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) (defaults to: )

    The instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
# File 'lib/ibm_vpc/vpc_v1.rb', line 3991

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance network attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4630
4631
4632
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 4630

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
# File 'lib/ibm_vpc/vpc_v1.rb', line 4895

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) (defaults to: )

    The virtual server instance identifier.

  • network_interface_id (String) (defaults to: )

    The instance network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
# File 'lib/ibm_vpc/vpc_v1.rb', line 5068

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) (defaults to: )

    The virtual server instance identifier.

  • network_interface_id (String) (defaults to: )

    The instance network interface identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
# File 'lib/ibm_vpc/vpc_v1.rb', line 5199

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) (defaults to: )

    The instance profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
# File 'lib/ibm_vpc/vpc_v1.rb', line 3494

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) (defaults to: )

    The instance template identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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 3642

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The volume attachment identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
# File 'lib/ibm_vpc/vpc_v1.rb', line 5372

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) (defaults to: )

    The IPsec policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
# File 'lib/ibm_vpc/vpc_v1.rb', line 15741

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) (defaults to: )

    The key identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
# File 'lib/ibm_vpc/vpc_v1.rb', line 3379

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) (defaults to: )

    The load balancer identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
# File 'lib/ibm_vpc/vpc_v1.rb', line 17558

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) (defaults to: )

    The load balancer identifier.

  • id (String) (defaults to: )

    The listener identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
# File 'lib/ibm_vpc/vpc_v1.rb', line 17893

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • id (String) (defaults to: )

    The policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18140
18141
18142
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 18140

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • policy_id (String) (defaults to: )

    The policy identifier.

  • id (String) (defaults to: )

    The rule identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
# File 'lib/ibm_vpc/vpc_v1.rb', line 18394

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) (defaults to: )

    The load balancer identifier.

  • id (String) (defaults to: )

    The pool identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
# File 'lib/ibm_vpc/vpc_v1.rb', line 18658

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) (defaults to: )

    The load balancer identifier.

  • pool_id (String) (defaults to: )

    The pool identifier.

  • id (String) (defaults to: )

    The member identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
# File 'lib/ibm_vpc/vpc_v1.rb', line 18949

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) (defaults to: )

    The load balancer profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17343
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 17343

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) (defaults to: )

    The load balancer identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17641
17642
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 17641

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) (defaults to: )

    The network ACL identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
# File 'lib/ibm_vpc/vpc_v1.rb', line 14437

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) (defaults to: )

    The network ACL identifier.

  • id (String) (defaults to: )

    The rule identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
14666
14667
14668
14669
14670
# File 'lib/ibm_vpc/vpc_v1.rb', line 14641

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) (defaults to: )

    The virtual network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
12365
12366
12367
# File 'lib/ibm_vpc/vpc_v1.rb', line 12338

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) (defaults to: )

    The operating system name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
# File 'lib/ibm_vpc/vpc_v1.rb', line 3208

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) (defaults to: )

    The placement group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
# File 'lib/ibm_vpc/vpc_v1.rb', line 7597

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) (defaults to: )

    The private path service gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
# File 'lib/ibm_vpc/vpc_v1.rb', line 19891

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) (defaults to: )

    The private path service gateway identifier.

  • id (String) (defaults to: )

    The account policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
# File 'lib/ibm_vpc/vpc_v1.rb', line 20123

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) (defaults to: )

    The private path service gateway identifier.

  • id (String) (defaults to: )

    The endpoint gateway binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
# File 'lib/ibm_vpc/vpc_v1.rb', line 20264

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) (defaults to: )

    The public address range identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
# File 'lib/ibm_vpc/vpc_v1.rb', line 14232

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) (defaults to: )

    The public gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


13802
13803
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 13802

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) (defaults to: )

    The region name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
# File 'lib/ibm_vpc/vpc_v1.rb', line 11862

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) (defaults to: )

    The region name.

  • name (String) (defaults to: )

    The zone name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
# File 'lib/ibm_vpc/vpc_v1.rb', line 11936

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) (defaults to: )

    The reservation identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
# File 'lib/ibm_vpc/vpc_v1.rb', line 6733

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) (defaults to: )

    The security group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
# File 'lib/ibm_vpc/vpc_v1.rb', line 14874

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) (defaults to: )

    The security group identifier.

  • id (String) (defaults to: )

    The rule identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
15107
15108
15109
15110
15111
# File 'lib/ibm_vpc/vpc_v1.rb', line 15082

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) (defaults to: )

    The security group identifier.

  • id (String) (defaults to: )

    The security group target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
# File 'lib/ibm_vpc/vpc_v1.rb', line 15259

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) (defaults to: )

    The file share identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 10435

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) (defaults to: )

    The file share identifier.

  • id (String) (defaults to: )

    The file share accessor binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10601
10602
10603
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 10601

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) (defaults to: )

    The file share identifier.

  • id (String) (defaults to: )

    The file share mount target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
# File 'lib/ibm_vpc/vpc_v1.rb', line 10836

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) (defaults to: )

    The file share profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 10260

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) (defaults to: )

    The file share identifier.

  • id (String) (defaults to: )

    The share snapshot identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
# File 'lib/ibm_vpc/vpc_v1.rb', line 11092

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) (defaults to: )

    The file share identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
# File 'lib/ibm_vpc/vpc_v1.rb', line 11221

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) (defaults to: )

    The snapshot identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
# File 'lib/ibm_vpc/vpc_v1.rb', line 9933

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) (defaults to: )

    The snapshot identifier.

  • zone_name (String) (defaults to: )

    The zone name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10092
10093
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 10092

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) (defaults to: )

    The snapshot consistency group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
# File 'lib/ibm_vpc/vpc_v1.rb', line 9625

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) (defaults to: )

    The subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
# File 'lib/ibm_vpc/vpc_v1.rb', line 1931

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) (defaults to: )

    The subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
# File 'lib/ibm_vpc/vpc_v1.rb', line 2011

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) (defaults to: )

    The subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
# File 'lib/ibm_vpc/vpc_v1.rb', line 2126

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) (defaults to: )

    The subnet identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
# File 'lib/ibm_vpc/vpc_v1.rb', line 2453

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) (defaults to: )

    The subnet identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
# File 'lib/ibm_vpc/vpc_v1.rb', line 2206

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) (defaults to: )

    The virtual network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
# File 'lib/ibm_vpc/vpc_v1.rb', line 12172

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) (defaults to: )

    The virtual network interface identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
# File 'lib/ibm_vpc/vpc_v1.rb', line 12520

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) (defaults to: )

    The volume identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
# File 'lib/ibm_vpc/vpc_v1.rb', line 9365

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_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) (defaults to: )

    The volume profile name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
# File 'lib/ibm_vpc/vpc_v1.rb', line 9184

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) (defaults to: )

    The VPC identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/ibm_vpc/vpc_v1.rb', line 254

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The prefix identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
# File 'lib/ibm_vpc/vpc_v1.rb', line 593

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) (defaults to: )

    The VPC identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 338

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) (defaults to: )

    The VPC identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/ibm_vpc/vpc_v1.rb', line 375

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) (defaults to: )

    The VPC identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The DNS resolution binding identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
# File 'lib/ibm_vpc/vpc_v1.rb', line 869

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The route identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


1135
1136
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 1135

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The routing table identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
# File 'lib/ibm_vpc/vpc_v1.rb', line 1418

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) (defaults to: )

    The VPC identifier.

  • routing_table_id (String) (defaults to: )

    The routing table identifier.

  • id (String) (defaults to: )

    The VPC routing table route identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
# File 'lib/ibm_vpc/vpc_v1.rb', line 1696

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) (defaults to: )

    The VPN gateway identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
# File 'lib/ibm_vpc/vpc_v1.rb', line 15983

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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
# File 'lib/ibm_vpc/vpc_v1.rb', line 16186

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_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) (defaults to: )

    The VPN server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
# File 'lib/ibm_vpc/vpc_v1.rb', line 16789

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) (defaults to: )

    The VPN server identifier.

  • id (String) (defaults to: )

    The VPN client identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
# File 'lib/ibm_vpc/vpc_v1.rb', line 16993

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) (defaults to: )

    The VPN server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
# File 'lib/ibm_vpc/vpc_v1.rb', line 16872

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) (defaults to: )

    The VPN server identifier.

  • id (String) (defaults to: )

    The VPN route identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17218
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 17218

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)


11268
11269
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 11268

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) (defaults to: )

    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)


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
11394
11395
11396
11397
11398
11399
11400
11401
# File 'lib/ibm_vpc/vpc_v1.rb', line 11366

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) (defaults to: )

    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)


11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
# File 'lib/ibm_vpc/vpc_v1.rb', line 11451

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) (defaults to: )

    The bare metal server identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
# File 'lib/ibm_vpc/vpc_v1.rb', line 7915

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) (defaults to: )

    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)


8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
# File 'lib/ibm_vpc/vpc_v1.rb', line 8044

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) (defaults to: )

    The bare metal server identifier.

  • network_interface_id (String) (defaults to: )

    The bare metal server network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
# File 'lib/ibm_vpc/vpc_v1.rb', line 8508

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) (defaults to: )

    The bare metal server identifier.

  • network_interface_id (String) (defaults to: )

    The bare metal server network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
# File 'lib/ibm_vpc/vpc_v1.rb', line 8681

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) (defaults to: )

    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)


8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
# File 'lib/ibm_vpc/vpc_v1.rb', line 8268

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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 7683

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)


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
7801
7802
7803
7804
7805
7806
# File 'lib/ibm_vpc/vpc_v1.rb', line 7771

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) (defaults to: )

    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)


12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
# File 'lib/ibm_vpc/vpc_v1.rb', line 12815

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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 12606

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) (defaults to: )

    The cluster network identifier.

  • cluster_network_subnet_id (String) (defaults to: )

    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)


13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
# File 'lib/ibm_vpc/vpc_v1.rb', line 13161

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) (defaults to: )

    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)


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
13093
13094
13095
13096
13097
13098
# File 'lib/ibm_vpc/vpc_v1.rb', line 13067

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)


12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
# File 'lib/ibm_vpc/vpc_v1.rb', line 12696

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) (defaults to: )

    The dedicated host identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
# File 'lib/ibm_vpc/vpc_v1.rb', line 7234

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)


6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
# File 'lib/ibm_vpc/vpc_v1.rb', line 6860

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)


7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
# File 'lib/ibm_vpc/vpc_v1.rb', line 7073

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)


7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
# File 'lib/ibm_vpc/vpc_v1.rb', line 7153

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) (defaults to: )

    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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 19198

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_gateways(name: nil, start: nil, limit: nil, resource_group_id: nil, lifecycle_state: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, allow_dns_resolution_binding: 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.

  • allow_dns_resolution_binding (Boolean) (defaults to: nil)

    Filters the collection to endpoint gateways with an ‘allow_dns_resolution_binding` property matching the specified value.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
19089
19090
19091
19092
19093
19094
# File 'lib/ibm_vpc/vpc_v1.rb', line 19059

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, allow_dns_resolution_binding: 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?

  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,
    "allow_dns_resolution_binding" => allow_dns_resolution_binding
  }

  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)


13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
# File 'lib/ibm_vpc/vpc_v1.rb', line 13899

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)


19500
19501
19502
19503
19504
19505
19506
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 19500

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)


15349
15350
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 15349

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) (defaults to: )

    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)


15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
# File 'lib/ibm_vpc/vpc_v1.rb', line 15561

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) (defaults to: )

    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)


2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
# File 'lib/ibm_vpc/vpc_v1.rb', line 2772

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) (defaults to: )

    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)


2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
# File 'lib/ibm_vpc/vpc_v1.rb', line 2946

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) (defaults to: )

    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)


2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
# File 'lib/ibm_vpc/vpc_v1.rb', line 2857

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)


2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
# File 'lib/ibm_vpc/vpc_v1.rb', line 2561

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) (defaults to: )

    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)


4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
# File 'lib/ibm_vpc/vpc_v1.rb', line 4077

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) (defaults to: )

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
# File 'lib/ibm_vpc/vpc_v1.rb', line 4368

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    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)


5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
# File 'lib/ibm_vpc/vpc_v1.rb', line 5933

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    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)


6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
# File 'lib/ibm_vpc/vpc_v1.rb', line 6152

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) (defaults to: )

    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)


5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
# File 'lib/ibm_vpc/vpc_v1.rb', line 5728

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) (defaults to: )

    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)


6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
# File 'lib/ibm_vpc/vpc_v1.rb', line 6407

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)


5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
# File 'lib/ibm_vpc/vpc_v1.rb', line 5461

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) (defaults to: )

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
# File 'lib/ibm_vpc/vpc_v1.rb', line 4493

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) (defaults to: )

    The virtual server instance identifier.

  • network_interface_id (String) (defaults to: )

    The instance network interface identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
# File 'lib/ibm_vpc/vpc_v1.rb', line 4986

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) (defaults to: )

    The virtual server instance identifier.

  • network_interface_id (String) (defaults to: )

    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)


5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
# File 'lib/ibm_vpc/vpc_v1.rb', line 5158

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) (defaults to: )

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
# File 'lib/ibm_vpc/vpc_v1.rb', line 4726

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)


3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
# File 'lib/ibm_vpc/vpc_v1.rb', line 3461

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)


3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
# File 'lib/ibm_vpc/vpc_v1.rb', line 3528

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) (defaults to: )

    The virtual server instance identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
# File 'lib/ibm_vpc/vpc_v1.rb', line 5240

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, cluster_network_id: nil, cluster_network_crn: nil, cluster_network_name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: 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.

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

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


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
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
# File 'lib/ibm_vpc/vpc_v1.rb', line 3759

def list_instances(start: nil, limit: nil, resource_group_id: nil, name: 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, 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,
    "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,
    "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)


15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
# File 'lib/ibm_vpc/vpc_v1.rb', line 15599

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) (defaults to: )

    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)


15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
# File 'lib/ibm_vpc/vpc_v1.rb', line 15820

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)


3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
# File 'lib/ibm_vpc/vpc_v1.rb', line 3250

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17978
17979
17980
17981
17982
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 17978

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • policy_id (String) (defaults to: )

    The policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
18260
18261
18262
# File 'lib/ibm_vpc/vpc_v1.rb', line 18231

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) (defaults to: )

    The load balancer identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
# File 'lib/ibm_vpc/vpc_v1.rb', line 17676

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) (defaults to: )

    The load balancer identifier.

  • pool_id (String) (defaults to: )

    The pool identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
18770
# File 'lib/ibm_vpc/vpc_v1.rb', line 18741

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) (defaults to: )

    The load balancer identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
# File 'lib/ibm_vpc/vpc_v1.rb', line 18486

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)


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
17333
17334
17335
# File 'lib/ibm_vpc/vpc_v1.rb', line 17308

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)


17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
# File 'lib/ibm_vpc/vpc_v1.rb', line 17379

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) (defaults to: )

    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)


14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
# File 'lib/ibm_vpc/vpc_v1.rb', line 14520

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)


14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
# File 'lib/ibm_vpc/vpc_v1.rb', line 14322

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) (defaults to: )

    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)


12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
# File 'lib/ibm_vpc/vpc_v1.rb', line 12259

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)


3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
# File 'lib/ibm_vpc/vpc_v1.rb', line 3173

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)


7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
# File 'lib/ibm_vpc/vpc_v1.rb', line 7475

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) (defaults to: )

    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)


19981
19982
19983
19984
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 19981

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) (defaults to: )

    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)


20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
# File 'lib/ibm_vpc/vpc_v1.rb', line 20223

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)


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

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.

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)


14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
# File 'lib/ibm_vpc/vpc_v1.rb', line 14104

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)


13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
# File 'lib/ibm_vpc/vpc_v1.rb', line 13667

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) (defaults to: )

    The region name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
# File 'lib/ibm_vpc/vpc_v1.rb', line 11899

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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 11829

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)


6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
# File 'lib/ibm_vpc/vpc_v1.rb', line 6589

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) (defaults to: )

    The security group identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
# File 'lib/ibm_vpc/vpc_v1.rb', line 14955

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) (defaults to: )

    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)


15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
# File 'lib/ibm_vpc/vpc_v1.rb', line 15170

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)


14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
# File 'lib/ibm_vpc/vpc_v1.rb', line 14742

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) (defaults to: )

    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)


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
10551
10552
10553
# File 'lib/ibm_vpc/vpc_v1.rb', line 10524

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) (defaults to: )

    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)


10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
# File 'lib/ibm_vpc/vpc_v1.rb', line 10707

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)


10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
# File 'lib/ibm_vpc/vpc_v1.rb', line 10223

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) (defaults to: )

    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)


10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
# File 'lib/ibm_vpc/vpc_v1.rb', line 10937

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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 10307

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) (defaults to: )

    The snapshot identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
# File 'lib/ibm_vpc/vpc_v1.rb', line 10016

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)


9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
# File 'lib/ibm_vpc/vpc_v1.rb', line 9506

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) (defaults to: )

    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)


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
10202
10203
# File 'lib/ibm_vpc/vpc_v1.rb', line 10174

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)


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
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
# File 'lib/ibm_vpc/vpc_v1.rb', line 9799

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) (defaults to: )

    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)


2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
# File 'lib/ibm_vpc/vpc_v1.rb', line 2304

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)


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
1840
# File 'lib/ibm_vpc/vpc_v1.rb', line 1806

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) (defaults to: )

    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)


12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
# File 'lib/ibm_vpc/vpc_v1.rb', line 12438

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)


11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
# File 'lib/ibm_vpc/vpc_v1.rb', line 11987

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) (defaults to: )

    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)


9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
# File 'lib/ibm_vpc/vpc_v1.rb', line 9453

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


9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
# File 'lib/ibm_vpc/vpc_v1.rb', line 9149

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

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


9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
# File 'lib/ibm_vpc/vpc_v1.rb', line 9243

def list_volumes(start: nil, limit: nil, attachment_state: nil, encryption: nil, name: nil, operating_system_family: nil, operating_system_architecture: 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,
    "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) (defaults to: )

    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)


449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'lib/ibm_vpc/vpc_v1.rb', line 449

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

The bindings will be sorted by their `created_at` property values, with newest
bindings first. Bindings with identical `created_at` property values will in turn
be sorted by ascending `name` property values.

Parameters:

  • vpc_id (String) (defaults to: )

    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)


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

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) (defaults to: )

    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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 962

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) (defaults to: )

    The VPC identifier.

  • routing_table_id (String) (defaults to: )

    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)


1514
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 1514

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) (defaults to: )

    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)


1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
# File 'lib/ibm_vpc/vpc_v1.rb', line 1227

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)


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

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_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) (defaults to: )

    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)


16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
# File 'lib/ibm_vpc/vpc_v1.rb', line 16064

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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
# File 'lib/ibm_vpc/vpc_v1.rb', line 16271

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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
# File 'lib/ibm_vpc/vpc_v1.rb', line 16443

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


15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
# File 'lib/ibm_vpc/vpc_v1.rb', line 15867

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) (defaults to: )

    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)


16914
16915
16916
16917
16918
16919
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 16914

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) (defaults to: )

    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)


17081
17082
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 17081

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)


16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
# File 'lib/ibm_vpc/vpc_v1.rb', line 16625

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) (defaults to: )

    The image identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
# File 'lib/ibm_vpc/vpc_v1.rb', line 2903

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) (defaults to: )

    The private path service gateway identifier.

  • id (String) (defaults to: )

    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)


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
20401
20402
20403
20404
20405
20406
20407
# File 'lib/ibm_vpc/vpc_v1.rb', line 20373

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) (defaults to: )

    The private path service gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
20441
20442
20443
# File 'lib/ibm_vpc/vpc_v1.rb', line 20416

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) (defaults to: )

    The bare metal server identifier.

  • network_interface_id (String) (defaults to: )

    The bare metal server network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
# File 'lib/ibm_vpc/vpc_v1.rb', line 8548

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) (defaults to: )

    The endpoint gateway identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
# File 'lib/ibm_vpc/vpc_v1.rb', line 19239

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) (defaults to: )

    The virtual server instance identifier.

  • network_interface_id (String) (defaults to: )

    The instance network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
# File 'lib/ibm_vpc/vpc_v1.rb', line 5026

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) (defaults to: )

    The virtual network interface identifier.

  • id (String) (defaults to: )

    The floating IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
# File 'lib/ibm_vpc/vpc_v1.rb', line 12299

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) (defaults to: )

    The virtual network interface identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
# File 'lib/ibm_vpc/vpc_v1.rb', line 12481

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_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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

  • cidr (String) (defaults to: )

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
# File 'lib/ibm_vpc/vpc_v1.rb', line 16312

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) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

  • cidr (String) (defaults to: )

    The IP address range in CIDR block notation.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
# File 'lib/ibm_vpc/vpc_v1.rb', line 16484

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: , 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) (defaults to: )

    The bare metal server identifier.

  • image (ImageIdentity) (defaults to: )

    The image to be used when provisioning the bare metal server.

  • keys (Array[KeyIdentity]) (defaults to: )

    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.

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


8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
# File 'lib/ibm_vpc/vpc_v1.rb', line 8977

def replace_bare_metal_server_initialization(id:, image:, keys:, 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,
    "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) (defaults to: )

    The load balancer identifier.

  • pool_id (String) (defaults to: )

    The pool identifier.

  • members (Array[LoadBalancerPoolMemberPrototype]) (defaults to: )

    The member prototype objects for this pool.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
# File 'lib/ibm_vpc/vpc_v1.rb', line 18861

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) (defaults to: )

    The subnet identifier.

  • network_acl_identity (NetworkACLIdentity) (defaults to: )

    The network ACL identity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
# File 'lib/ibm_vpc/vpc_v1.rb', line 2048

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) (defaults to: )

    The subnet identifier.

  • routing_table_identity (RoutingTableIdentity) (defaults to: )

    The routing table identity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
# File 'lib/ibm_vpc/vpc_v1.rb', line 2247

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) (defaults to: )

    The bare metal server identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
# File 'lib/ibm_vpc/vpc_v1.rb', line 9024

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) (defaults to: )

    The private path service gateway identifier.

  • account (AccountIdentity) (defaults to: )

    The account that will be revoked access to the private path service gateway.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
20484
20485
20486
20487
20488
20489
20490
# File 'lib/ibm_vpc/vpc_v1.rb', line 20456

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) (defaults to: )

    The subnet identifier.

  • public_gateway_identity (PublicGatewayIdentity) (defaults to: )

    The public gateway identity.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
# File 'lib/ibm_vpc/vpc_v1.rb', line 2164

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) (defaults to: )

    The bare metal server identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
# File 'lib/ibm_vpc/vpc_v1.rb', line 9060

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) (defaults to: )

    The bare metal server identifier.

  • type (String) (defaults to: )

    The type of stop operation:

    • ‘soft`: signal running operating system to quiesce and shutdown cleanly

    • ‘hard`: immediately stop the server.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
# File 'lib/ibm_vpc/vpc_v1.rb', line 9100

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) (defaults to: )

    The private path service gateway identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
20528
# File 'lib/ibm_vpc/vpc_v1.rb', line 20501

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) (defaults to: )

    The subnet identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
# File 'lib/ibm_vpc/vpc_v1.rb', line 2090

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) (defaults to: )

    The backup policy identifier.

  • backup_policy_patch (Hash) (defaults to: )

    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)


11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
# File 'lib/ibm_vpc/vpc_v1.rb', line 11780

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) (defaults to: )

    The backup policy identifier.

  • id (String) (defaults to: )

    The backup policy plan identifier.

  • backup_policy_plan_patch (Hash) (defaults to: )

    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)


11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
# File 'lib/ibm_vpc/vpc_v1.rb', line 11653

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) (defaults to: )

    The bare metal server identifier.

  • bare_metal_server_patch (Hash) (defaults to: )

    The bare metal server patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
# File 'lib/ibm_vpc/vpc_v1.rb', line 8839

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) (defaults to: )

    The bare metal server identifier.

  • id (String) (defaults to: )

    The bare metal server disk identifier.

  • bare_metal_server_disk_patch (Hash) (defaults to: )

    The bare metal server disk patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
# File 'lib/ibm_vpc/vpc_v1.rb', line 7991

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) (defaults to: )

    The bare metal server identifier.

  • id (String) (defaults to: )

    The bare metal server network attachment identifier.

  • bare_metal_server_network_attachment_patch (Hash) (defaults to: )

    The bare metal server network attachment patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
# File 'lib/ibm_vpc/vpc_v1.rb', line 8213

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) (defaults to: )

    The bare metal server identifier.

  • id (String) (defaults to: )

    The bare metal server network interface identifier.

  • bare_metal_server_network_interface_patch (Hash) (defaults to: )

    The bare metal server network interface patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
# File 'lib/ibm_vpc/vpc_v1.rb', line 8463

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) (defaults to: )

    The cluster network identifier.

  • cluster_network_patch (Hash) (defaults to: )

    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)


13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
# File 'lib/ibm_vpc/vpc_v1.rb', line 13616

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) (defaults to: )

    The cluster network identifier.

  • id (String) (defaults to: )

    The cluster network interface identifier.

  • cluster_network_interface_patch (Hash) (defaults to: )

    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)


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
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
# File 'lib/ibm_vpc/vpc_v1.rb', line 13012

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) (defaults to: )

    The cluster network identifier.

  • id (String) (defaults to: )

    The cluster network subnet identifier.

  • cluster_network_subnet_patch (Hash) (defaults to: )

    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)


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
13519
13520
13521
13522
13523
13524
13525
13526
# File 'lib/ibm_vpc/vpc_v1.rb', line 13490

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) (defaults to: )

    The cluster network identifier.

  • cluster_network_subnet_id (String) (defaults to: )

    The cluster network subnet identifier.

  • id (String) (defaults to: )

    The cluster network subnet reserved IP identifier.

  • cluster_network_subnet_reserved_ip_patch (Hash) (defaults to: )

    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)


13354
13355
13356
13357
13358
13359
13360
13361
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
13392
# File 'lib/ibm_vpc/vpc_v1.rb', line 13354

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) (defaults to: )

    The dedicated host identifier.

  • dedicated_host_patch (Hash) (defaults to: )

    The dedicated host patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
# File 'lib/ibm_vpc/vpc_v1.rb', line 7430

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) (defaults to: )

    The dedicated host identifier.

  • id (String) (defaults to: )

    The dedicated host disk identifier.

  • dedicated_host_disk_patch (Hash) (defaults to: )

    The dedicated host disk patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7311
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
7344
7345
7346
# File 'lib/ibm_vpc/vpc_v1.rb', line 7311

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) (defaults to: )

    The dedicated host group identifier.

  • dedicated_host_group_patch (Hash) (defaults to: )

    The dedicated host group patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
# File 'lib/ibm_vpc/vpc_v1.rb', line 7028

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) (defaults to: )

    The endpoint gateway identifier.

  • endpoint_gateway_patch (Hash) (defaults to: )

    The endpoint gateway patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
# File 'lib/ibm_vpc/vpc_v1.rb', line 19436

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_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) (defaults to: )

    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)


8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
# File 'lib/ibm_vpc/vpc_v1.rb', line 8883

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) (defaults to: )

    The floating IP identifier.

  • floating_ip_patch (Hash) (defaults to: )

    The floating IP patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14053
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
14084
14085
14086
# File 'lib/ibm_vpc/vpc_v1.rb', line 14053

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) (defaults to: )

    The flow log collector identifier.

  • flow_log_collector_patch (Hash) (defaults to: )

    The flow log collector patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
# File 'lib/ibm_vpc/vpc_v1.rb', line 19692

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) (defaults to: )

    The IKE policy identifier.

  • ike_policy_patch (Hash) (defaults to: )

    The IKE policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
# File 'lib/ibm_vpc/vpc_v1.rb', line 15518

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) (defaults to: )

    The image identifier.

  • image_patch (Hash) (defaults to: )

    The image patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 2727

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) (defaults to: )

    The image identifier.

  • id (String) (defaults to: )

    The image export job identifier.

  • image_export_job_patch (Hash) (defaults to: )

    The image export job patch.

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
3164
# File 'lib/ibm_vpc/vpc_v1.rb', line 3129

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) (defaults to: )

    The virtual server instance identifier.

  • instance_patch (Hash) (defaults to: )

    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)


3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
# File 'lib/ibm_vpc/vpc_v1.rb', line 3947

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance cluster network attachment identifier.

  • instance_cluster_network_attachment_patch (Hash) (defaults to: )

    The instance cluster network attachment patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
# File 'lib/ibm_vpc/vpc_v1.rb', line 4272

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance disk identifier.

  • instance_disk_patch (Hash) (defaults to: )

    The instance disk patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
# File 'lib/ibm_vpc/vpc_v1.rb', line 4444

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) (defaults to: )

    The instance group identifier.

  • instance_group_patch (Hash) (defaults to: )

    The instance group patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
# File 'lib/ibm_vpc/vpc_v1.rb', line 5649

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) (defaults to: )

    The instance group identifier.

  • id (String) (defaults to: )

    The instance group manager identifier.

  • instance_group_manager_patch (Hash) (defaults to: )

    The instance group manager patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5887
5888
5889
5890
5891
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 5887

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    The instance group manager identifier.

  • id (String) (defaults to: )

    The instance group manager action identifier.

  • instance_group_manager_action_patch (Hash) (defaults to: )

    The instance group manager action patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
# File 'lib/ibm_vpc/vpc_v1.rb', line 6104

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) (defaults to: )

    The instance group identifier.

  • instance_group_manager_id (String) (defaults to: )

    The instance group manager identifier.

  • id (String) (defaults to: )

    The instance group manager policy identifier.

  • instance_group_manager_policy_patch (Hash) (defaults to: )

    The instance group manager policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
# File 'lib/ibm_vpc/vpc_v1.rb', line 6323

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) (defaults to: )

    The instance group identifier.

  • id (String) (defaults to: )

    The instance group membership identifier.

  • instance_group_membership_patch (Hash) (defaults to: )

    The instance group membership patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
# File 'lib/ibm_vpc/vpc_v1.rb', line 6526

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance network attachment identifier.

  • instance_network_attachment_patch (Hash) (defaults to: )

    The instance network attachment patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
4703
4704
4705
4706
4707
# File 'lib/ibm_vpc/vpc_v1.rb', line 4672

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The instance network interface identifier.

  • network_interface_patch (Hash) (defaults to: )

    The instance network interface patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
# File 'lib/ibm_vpc/vpc_v1.rb', line 4942

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) (defaults to: )

    The instance template identifier.

  • instance_template_patch (Hash) (defaults to: )

    The instance template patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
3707
3708
3709
3710
3711
3712
3713
3714
# File 'lib/ibm_vpc/vpc_v1.rb', line 3681

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) (defaults to: )

    The virtual server instance identifier.

  • id (String) (defaults to: )

    The volume attachment identifier.

  • volume_attachment_patch (Hash) (defaults to: )

    The volume attachment patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
# File 'lib/ibm_vpc/vpc_v1.rb', line 5414

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) (defaults to: )

    The IPsec policy identifier.

  • i_psec_policy_patch (Hash) (defaults to: )

    The IPsec policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
# File 'lib/ibm_vpc/vpc_v1.rb', line 15777

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) (defaults to: )

    The key identifier.

  • key_patch (Hash) (defaults to: )

    The key patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
# File 'lib/ibm_vpc/vpc_v1.rb', line 3415

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) (defaults to: )

    The load balancer identifier.

  • load_balancer_patch (Hash) (defaults to: )

    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)


17599
17600
17601
17602
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
17631
17632
17633
# File 'lib/ibm_vpc/vpc_v1.rb', line 17599

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) (defaults to: )

    The load balancer identifier.

  • id (String) (defaults to: )

    The listener identifier.

  • load_balancer_listener_patch (Hash) (defaults to: )

    The load balancer listener patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 17932

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • id (String) (defaults to: )

    The policy identifier.

  • load_balancer_listener_policy_patch (Hash) (defaults to: )

    The listener policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18184
18185
18186
18187
18188
18189
18190
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
18221
# File 'lib/ibm_vpc/vpc_v1.rb', line 18184

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) (defaults to: )

    The load balancer identifier.

  • listener_id (String) (defaults to: )

    The listener identifier.

  • policy_id (String) (defaults to: )

    The policy identifier.

  • id (String) (defaults to: )

    The rule identifier.

  • load_balancer_listener_policy_rule_patch (Hash) (defaults to: )

    The listener policy rule patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
# File 'lib/ibm_vpc/vpc_v1.rb', line 18439

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) (defaults to: )

    The load balancer identifier.

  • id (String) (defaults to: )

    The pool identifier.

  • load_balancer_pool_patch (Hash) (defaults to: )

    The load balancer pool patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
18727
18728
18729
18730
18731
18732
# File 'lib/ibm_vpc/vpc_v1.rb', line 18697

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) (defaults to: )

    The load balancer identifier.

  • pool_id (String) (defaults to: )

    The pool identifier.

  • id (String) (defaults to: )

    The member identifier.

  • load_balancer_pool_member_patch (Hash) (defaults to: )

    The load balancer pool member patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
# File 'lib/ibm_vpc/vpc_v1.rb', line 18991

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) (defaults to: )

    The network ACL identifier.

  • network_acl_patch (Hash) (defaults to: )

    The network ACL patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
# File 'lib/ibm_vpc/vpc_v1.rb', line 14473

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) (defaults to: )

    The network ACL identifier.

  • id (String) (defaults to: )

    The rule identifier.

  • network_acl_rule_patch (Hash) (defaults to: )

    The network ACL rule patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
# File 'lib/ibm_vpc/vpc_v1.rb', line 14683

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) (defaults to: )

    The placement group identifier.

  • placement_group_patch (Hash) (defaults to: )

    The placement group patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 7635

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) (defaults to: )

    The private path service gateway identifier.

  • private_path_service_gateway_patch (Hash) (defaults to: )

    The private path service gateway patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
# File 'lib/ibm_vpc/vpc_v1.rb', line 19930

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) (defaults to: )

    The private path service gateway identifier.

  • id (String) (defaults to: )

    The account policy identifier.

  • private_path_service_gateway_account_policy_patch (Hash) (defaults to: )

    The account policy patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
# File 'lib/ibm_vpc/vpc_v1.rb', line 20164

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) (defaults to: )

    The public address range identifier.

  • public_address_range_patch (Hash) (defaults to: )

    The public address range patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
# File 'lib/ibm_vpc/vpc_v1.rb', line 14271

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) (defaults to: )

    The public gateway identifier.

  • public_gateway_patch (Hash) (defaults to: )

    The public gateway patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
# File 'lib/ibm_vpc/vpc_v1.rb', line 13838

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) (defaults to: )

    The reservation identifier.

  • reservation_patch (Hash) (defaults to: )

    The reservation patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


6771
6772
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
6803
6804
# File 'lib/ibm_vpc/vpc_v1.rb', line 6771

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) (defaults to: )

    The security group identifier.

  • security_group_patch (Hash) (defaults to: )

    The security group patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
# File 'lib/ibm_vpc/vpc_v1.rb', line 14912

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) (defaults to: )

    The security group identifier.

  • id (String) (defaults to: )

    The rule identifier.

  • security_group_rule_patch (Hash) (defaults to: )

    The security group rule patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
# File 'lib/ibm_vpc/vpc_v1.rb', line 15124

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) (defaults to: )

    The file share identifier.

  • share_patch (Hash) (defaults to: )

    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)


10475
10476
10477
10478
10479
10480
10481
10482
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 10475

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) (defaults to: )

    The file share identifier.

  • id (String) (defaults to: )

    The file share mount target identifier.

  • share_mount_target_patch (Hash) (defaults to: )

    The share mount target patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
# File 'lib/ibm_vpc/vpc_v1.rb', line 10878

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) (defaults to: )

    The file share identifier.

  • id (String) (defaults to: )

    The share snapshot identifier.

  • share_snapshot_patch (Hash) (defaults to: )

    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)


11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 11136

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) (defaults to: )

    The snapshot identifier.

  • snapshot_patch (Hash) (defaults to: )

    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)


9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
# File 'lib/ibm_vpc/vpc_v1.rb', line 9973

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) (defaults to: )

    The snapshot consistency group identifier.

  • snapshot_consistency_group_patch (Hash) (defaults to: )

    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)


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
# File 'lib/ibm_vpc/vpc_v1.rb', line 9666

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) (defaults to: )

    The subnet identifier.

  • subnet_patch (Hash) (defaults to: )

    The subnet patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
# File 'lib/ibm_vpc/vpc_v1.rb', line 1969

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) (defaults to: )

    The subnet identifier.

  • id (String) (defaults to: )

    The reserved IP identifier.

  • reserved_ip_patch (Hash) (defaults to: )

    The reserved IP patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
# File 'lib/ibm_vpc/vpc_v1.rb', line 2496

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: ) ⇒ 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) (defaults to: )

    The virtual network interface identifier.

  • virtual_network_interface_patch (Hash) (defaults to: )

    The virtual network interface patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
# File 'lib/ibm_vpc/vpc_v1.rb', line 12211

def update_virtual_network_interface(id:, virtual_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("id must be provided") if id.nil?

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

  headers = {
  }
  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) (defaults to: )

    The volume identifier.

  • volume_patch (Hash) (defaults to: )

    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)


9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
# File 'lib/ibm_vpc/vpc_v1.rb', line 9405

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_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) (defaults to: )

    The VPC identifier.

  • vpc_patch (Hash) (defaults to: )

    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)


294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
# File 'lib/ibm_vpc/vpc_v1.rb', line 294

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The prefix identifier.

  • address_prefix_patch (Hash) (defaults to: )

    The prefix patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
# File 'lib/ibm_vpc/vpc_v1.rb', line 634

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The DNS resolution binding identifier.

  • vpcdns_resolution_binding_patch (Hash) (defaults to: )

    The DNS resolution binding patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The route identifier.

  • route_patch (Hash) (defaults to: )

    The route patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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

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) (defaults to: )

    The VPC identifier.

  • id (String) (defaults to: )

    The routing table identifier.

  • routing_table_patch (Hash) (defaults to: )

    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)


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

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) (defaults to: )

    The VPC identifier.

  • routing_table_id (String) (defaults to: )

    The routing table identifier.

  • id (String) (defaults to: )

    The VPC routing table route identifier.

  • route_patch (Hash) (defaults to: )

    The VPC route patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
# File 'lib/ibm_vpc/vpc_v1.rb', line 1741

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) (defaults to: )

    The VPN gateway identifier.

  • vpn_gateway_patch (Hash) (defaults to: )

    The VPN gateway patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
16045
16046
16047
16048
16049
16050
16051
16052
# File 'lib/ibm_vpc/vpc_v1.rb', line 16019

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: ) ⇒ IBMCloudSdkCore::DetailedResponse

Update a VPN gateway connection. This request updates the properties of an existing VPN gateway connection.

Parameters:

  • vpn_gateway_id (String) (defaults to: )

    The VPN gateway identifier.

  • id (String) (defaults to: )

    The VPN gateway connection identifier.

  • vpn_gateway_connection_patch (Hash) (defaults to: )

    The VPN gateway connection patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
# File 'lib/ibm_vpc/vpc_v1.rb', line 16225

def update_vpn_gateway_connection(vpn_gateway_id:, id:, vpn_gateway_connection_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_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 = {
  }
  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) (defaults to: )

    The VPN server identifier.

  • vpn_server_patch (Hash) (defaults to: )

    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)


16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
# File 'lib/ibm_vpc/vpc_v1.rb', line 16828

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) (defaults to: )

    The VPN server identifier.

  • id (String) (defaults to: )

    The VPN route identifier.

  • vpn_server_route_patch (Hash) (defaults to: )

    The VPN route patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


17259
17260
17261
17262
17263
17264
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 17259

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