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 =
"2023-12-19"

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 `2023-12-05` and `2023-12-20`.

  • 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)
  @version = args[:version]
  raise ArgumentError.new("version must be provided") if @version.nil?

  @generation = args[:generation]

  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

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


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

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)


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

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)


4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
# File 'lib/ibm_vpc/vpc_v1.rb', line 4704

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)


11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
# File 'lib/ibm_vpc/vpc_v1.rb', line 11100

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)


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 11269

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_connection_local_cidr(vpn_gateway_id: , id: , cidr_prefix: , prefix_length: ) ⇒ 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_prefix (String) (defaults to: )

    The address prefix part of the CIDR.

  • prefix_length (String) (defaults to: )

    The prefix length part of the CIDR.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
# File 'lib/ibm_vpc/vpc_v1.rb', line 13819

def add_vpn_gateway_connection_local_cidr(vpn_gateway_id:, id:, cidr_prefix:, prefix_length:)
  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_prefix must be provided") if cidr_prefix.nil?

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

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

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

  method_url = "/vpn_gateways/%s/connections/%s/local_cidrs/%s/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr_prefix), ERB::Util.url_encode(prefix_length)]

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

#add_vpn_gateway_connection_peer_cidr(vpn_gateway_id: , id: , cidr_prefix: , prefix_length: ) ⇒ 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_prefix (String) (defaults to: )

    The address prefix part of the CIDR.

  • prefix_length (String) (defaults to: )

    The prefix length part of the CIDR.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
# File 'lib/ibm_vpc/vpc_v1.rb', line 14000

def add_vpn_gateway_connection_peer_cidr(vpn_gateway_id:, id:, cidr_prefix:, prefix_length:)
  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_prefix must be provided") if cidr_prefix.nil?

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

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

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

  method_url = "/vpn_gateways/%s/connections/%s/peer_cidrs/%s/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr_prefix), ERB::Util.url_encode(prefix_length)]

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

#check_vpn_gateway_connection_local_cidr(vpn_gateway_id: , id: , cidr_prefix: , prefix_length: ) ⇒ 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_prefix (String) (defaults to: )

    The address prefix part of the CIDR.

  • prefix_length (String) (defaults to: )

    The prefix length part of the CIDR.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
# File 'lib/ibm_vpc/vpc_v1.rb', line 13771

def check_vpn_gateway_connection_local_cidr(vpn_gateway_id:, id:, cidr_prefix:, prefix_length:)
  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_prefix must be provided") if cidr_prefix.nil?

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

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

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

  method_url = "/vpn_gateways/%s/connections/%s/local_cidrs/%s/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr_prefix), ERB::Util.url_encode(prefix_length)]

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

#check_vpn_gateway_connection_peer_cidr(vpn_gateway_id: , id: , cidr_prefix: , prefix_length: ) ⇒ 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_prefix (String) (defaults to: )

    The address prefix part of the CIDR.

  • prefix_length (String) (defaults to: )

    The prefix length part of the CIDR.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
# File 'lib/ibm_vpc/vpc_v1.rb', line 13952

def check_vpn_gateway_connection_peer_cidr(vpn_gateway_id:, id:, cidr_prefix:, prefix_length:)
  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_prefix must be provided") if cidr_prefix.nil?

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

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

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

  method_url = "/vpn_gateways/%s/connections/%s/peer_cidrs/%s/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr_prefix), ERB::Util.url_encode(prefix_length)]

  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)


6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
# File 'lib/ibm_vpc/vpc_v1.rb', line 6830

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)

    User tags to attach to each backup (snapshot) created by this plan. If unspecified, no user tags will be attached.

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


7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
# File 'lib/ibm_vpc/vpc_v1.rb', line 7034

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.

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)


7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
# File 'lib/ibm_vpc/vpc_v1.rb', line 7687

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.

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)


7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
# File 'lib/ibm_vpc/vpc_v1.rb', line 7735

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)


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

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


8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
# File 'lib/ibm_vpc/vpc_v1.rb', line 8182

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


6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
# File 'lib/ibm_vpc/vpc_v1.rb', line 6501

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)


6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
# File 'lib/ibm_vpc/vpc_v1.rb', line 6214

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. An endpoint gateway maps one or more

reserved IPs in a VPC to a target outside the VPC.

Parameters:

  • target (EndpointGatewayTargetPrototype) (defaults to: )

    The target to use for this endpoint gateway. Must not already be the target of another endpoint gateway in the VPC.

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

    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)


16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
# File 'lib/ibm_vpc/vpc_v1.rb', line 16449

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)


11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
# File 'lib/ibm_vpc/vpc_v1.rb', line 11588

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)


16867
16868
16869
16870
16871
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
16900
16901
16902
16903
16904
16905
# File 'lib/ibm_vpc/vpc_v1.rb', line 16867

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)


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
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
# File 'lib/ibm_vpc/vpc_v1.rb', line 12821

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)


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

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 image export job. 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)


2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
# File 'lib/ibm_vpc/vpc_v1.rb', line 2873

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.

Parameters:

  • instance_prototype (InstancePrototype) (defaults to: )

    The instance prototype object.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
# File 'lib/ibm_vpc/vpc_v1.rb', line 3662

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)


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

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)


3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
# File 'lib/ibm_vpc/vpc_v1.rb', line 3913

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

    Instance template to use when creating new instances.

    Instance groups are not compatible with instance templates that specify ‘true` for `default_trusted_profile.auto_link`.

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


5113
5114
5115
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
5148
5149
5150
5151
5152
5153
5154
# File 'lib/ibm_vpc/vpc_v1.rb', line 5113

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)


5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
# File 'lib/ibm_vpc/vpc_v1.rb', line 5353

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)


5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
# File 'lib/ibm_vpc/vpc_v1.rb', line 5561

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)


5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
# File 'lib/ibm_vpc/vpc_v1.rb', line 5780

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)


4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
# File 'lib/ibm_vpc/vpc_v1.rb', line 4134

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


4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
# File 'lib/ibm_vpc/vpc_v1.rb', line 4383

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)


3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
# File 'lib/ibm_vpc/vpc_v1.rb', line 3435

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

    An existing volume to attach to the instance, 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)


4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
# File 'lib/ibm_vpc/vpc_v1.rb', line 4873

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

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

  • pfs (String) (defaults to: )

    Perfect Forward Secrecy.

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


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
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
# File 'lib/ibm_vpc/vpc_v1.rb', line 13073

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

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

    Keys of type ‘rsa` may be 2048 or 4096 bits in length, however 4096 is recommended. Keys of type `ed25519` are 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 used by this key.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3169
3170
3171
3172
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
3201
3202
3203
3204
# File 'lib/ibm_vpc/vpc_v1.rb', line 3169

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, 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 enabled, the load balancer must not be public.

  • subnets (Array[SubnetIdentity]) (defaults to: )

    The subnets to provision this load balancer in. The subnets must be in the same VPC. The load balancer’s availability will depend on the availability of the zones that the subnets reside in.

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

  • 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[LoadBalancerPoolPrototype]) (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 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)


14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
# File 'lib/ibm_vpc/vpc_v1.rb', line 14886

def create_load_balancer(is_public:, subnets:, dns: 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,
    "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 unique ‘port` 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 connection limit of the listener.

  • default_pool (LoadBalancerPoolIdentity) (defaults to: nil)

    The default pool for this listener. 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. 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.

  • 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, or the inclusive lower bound of the port range. Each listener in the load balancer must have a unique ‘port` and `protocol` combination.

    Not supported for load balancers operating with route mode enabled.

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

    At present, only load balancers operating with route mode enabled, and public load balancers in the ‘network` family support different values for `port_min` and `port_max`. When route mode is enabled, the value `65535` must be specified.

    The specified port range must not overlap with port ranges used by other listeners for this load balancer using the same protocol.

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

    At present, only load balancers operating with route mode enabled, and public load balancers in the ‘network` family support different values for `port_min` and `port_max`. When route mode is enabled, the value `1` must be specified.

    The specified port range must not overlap with port ranges used by other listeners for this load balancer using the same protocol.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
# File 'lib/ibm_vpc/vpc_v1.rb', line 15193

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. Creates a new policy for a load balancer listener.

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.

    The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the unexpected property value was encountered.

  • priority (Fixnum) (defaults to: )

    Priority of the policy. 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`, specify a `LoadBalancerPoolIdentity`.

    • If ‘action` is `redirect`, specify a

    ‘LoadBalancerListenerPolicyRedirectURLPrototype`.

    • If ‘action` is `https_redirect`, specify a `LoadBalancerListenerPolicyHTTPSRedirectPrototype`.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
# File 'lib/ibm_vpc/vpc_v1.rb', line 15424

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 of the rule.

  • type (String) (defaults to: )

    The type of the rule.

    Body rules are applied to form-encoded request bodies using the ‘UTF-8` character set.

  • value (String) (defaults to: )

    Value to be matched for 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. This is applicable to ‘header`, `query`, and `body` rule types.

    If the rule type is ‘header`, this property is required.

    If the rule type is ‘query`, this is optional. If specified and the rule condition is not `matches_regex`, the value must be percent-encoded.

    If the rule type is ‘body`, this is optional.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


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
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
# File 'lib/ibm_vpc/vpc_v1.rb', line 15665

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

  • health_monitor (LoadBalancerPoolHealthMonitorPrototype) (defaults to: )

    The health monitor of this pool.

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

  • 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

    Supported by load balancers in the ‘application` family (otherwise always `disabled`).

  • session_persistence (LoadBalancerPoolSessionPersistencePrototype) (defaults to: nil)

    The session persistence of this pool.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
# File 'lib/ibm_vpc/vpc_v1.rb', line 15913

def create_load_balancer_pool(load_balancer_id:, algorithm:, health_monitor:, protocol:, 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,
    "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.

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.

  • target (LoadBalancerPoolMemberTargetPrototype) (defaults to: )

    The pool member target. Load balancers in the ‘network` family support virtual server instances. Load balancers in the `application` family support IP addresses. If the load balancer has route mode enabled, the member must be in a zone the load balancer has a subnet in.

  • weight (Fixnum) (defaults to: nil)

    Weight of the server member. Applicable only if the pool algorithm is ‘weighted_round_robin`.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
# File 'lib/ibm_vpc/vpc_v1.rb', line 16145

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)


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
11815
11816
11817
11818
11819
11820
# File 'lib/ibm_vpc/vpc_v1.rb', line 11789

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)


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
12016
12017
12018
12019
12020
12021
12022
12023
# File 'lib/ibm_vpc/vpc_v1.rb', line 11990

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

    The enumerated values for this property may expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the placement group on which the unexpected strategy was encountered.

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


7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
# File 'lib/ibm_vpc/vpc_v1.rb', line 7396

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


11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
# File 'lib/ibm_vpc/vpc_v1.rb', line 11365

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_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 all traffic being denied.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
# File 'lib/ibm_vpc/vpc_v1.rb', line 12222

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)


12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
# File 'lib/ibm_vpc/vpc_v1.rb', line 12428

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)


12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
# File 'lib/ibm_vpc/vpc_v1.rb', line 12736

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)


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
10044
10045
10046
10047
# File 'lib/ibm_vpc/vpc_v1.rb', line 10016

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)


10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
# File 'lib/ibm_vpc/vpc_v1.rb', line 10296

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


9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
# File 'lib/ibm_vpc/vpc_v1.rb', line 9563

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)


9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
# File 'lib/ibm_vpc/vpc_v1.rb', line 9839

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)


9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
# File 'lib/ibm_vpc/vpc_v1.rb', line 9256

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)


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
1841
1842
1843
# File 'lib/ibm_vpc/vpc_v1.rb', line 1812

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)


2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
# File 'lib/ibm_vpc/vpc_v1.rb', line 2326

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

    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.

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


10793
10794
10795
10796
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
10827
10828
10829
10830
10831
# File 'lib/ibm_vpc/vpc_v1.rb', line 10793

def create_virtual_network_interface(allow_ip_spoofing: nil, auto_delete: nil, enable_infrastructure_nat: nil, ips: nil, name: nil, primary_ip: 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,
    "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)


9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
# File 'lib/ibm_vpc/vpc_v1.rb', line 9038

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.

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.

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


146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/ibm_vpc/vpc_v1.rb', line 146

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)
  print(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)


488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# File 'lib/ibm_vpc/vpc_v1.rb', line 488

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, `dns.enable_hub` must be `false` for the VPC
specified by the identifier in the URL, and the VPC must not already have a DNS
resolution binding.

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

Parameters:

  • vpc_id (String) (defaults to: )

    The VPC identifier.

  • vpc (VPCIdentity) (defaults to: )

    Another VPC to bind this VPC to for DNS resolution. The VPC 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)


755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
# File 'lib/ibm_vpc/vpc_v1.rb', line 755

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. (Traffic from subnets 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 (RoutePrototypeNextHop) (defaults to: nil)

    If ‘action` is `deliver`, the next hop that packets will be delivered to. 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)


1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
# File 'lib/ibm_vpc/vpc_v1.rb', line 1013

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.

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.

    At present, only the ‘resource_type` filter is permitted, and only the `vpn_server` value is supported, but filter support is expected to expand in the future.

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


1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
# File 'lib/ibm_vpc/vpc_v1.rb', line 1293

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. (Traffic from subnets 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 (RoutePrototypeNextHop) (defaults to: nil)

    If ‘action` is `deliver`, the next hop that packets will be delivered to. 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)


1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/ibm_vpc/vpc_v1.rb', line 1560

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)


13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
# File 'lib/ibm_vpc/vpc_v1.rb', line 13320

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)


13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
# File 'lib/ibm_vpc/vpc_v1.rb', line 13514

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)


14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
# File 'lib/ibm_vpc/vpc_v1.rb', line 14123

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. destination of the packet.

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

    The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the VPN route on which the unexpected property value was encountered.

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


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
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
# File 'lib/ibm_vpc/vpc_v1.rb', line 14569

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)


7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
# File 'lib/ibm_vpc/vpc_v1.rb', line 7226

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)


7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
# File 'lib/ibm_vpc/vpc_v1.rb', line 7093

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)


8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
# File 'lib/ibm_vpc/vpc_v1.rb', line 8625

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)


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

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


8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
# File 'lib/ibm_vpc/vpc_v1.rb', line 8233

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_dedicated_host(id: ) ⇒ nil

Delete a dedicated host. This request deletes a dedicated host.

Parameters:

  • id (String) (defaults to: )

    The dedicated host identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
# File 'lib/ibm_vpc/vpc_v1.rb', line 6663

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)


6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
# File 'lib/ibm_vpc/vpc_v1.rb', line 6262

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)


16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
# File 'lib/ibm_vpc/vpc_v1.rb', line 16667

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)


11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
# File 'lib/ibm_vpc/vpc_v1.rb', line 11629

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)


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 16917

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)


12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
# File 'lib/ibm_vpc/vpc_v1.rb', line 12875

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. A system-provided image 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)


2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
# File 'lib/ibm_vpc/vpc_v1.rb', line 2603

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)


2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
# File 'lib/ibm_vpc/vpc_v1.rb', line 2921

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

Returns:

  • (nil)

Raises:

  • (ArgumentError)


3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
# File 'lib/ibm_vpc/vpc_v1.rb', line 3708

def delete_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", "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_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)


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

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)


5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
# File 'lib/ibm_vpc/vpc_v1.rb', line 5278

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)


5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
# File 'lib/ibm_vpc/vpc_v1.rb', line 5395

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)


5607
5608
5609
5610
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 5607

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)


5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
# File 'lib/ibm_vpc/vpc_v1.rb', line 5826

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)


6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
# File 'lib/ibm_vpc/vpc_v1.rb', line 6035

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 all memberships from an instance group. This request deletes all memberships of an instance group. This operation cannot

be reversed. reversed. Any 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)


5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
# File 'lib/ibm_vpc/vpc_v1.rb', line 5958

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)


4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
# File 'lib/ibm_vpc/vpc_v1.rb', line 4182

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


4439
4440
4441
4442
4443
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 4439

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)


3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
# File 'lib/ibm_vpc/vpc_v1.rb', line 3474

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)


4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
# File 'lib/ibm_vpc/vpc_v1.rb', line 4920

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)


13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
# File 'lib/ibm_vpc/vpc_v1.rb', line 13124

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)


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

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)


14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
# File 'lib/ibm_vpc/vpc_v1.rb', line 14942

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)


15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
# File 'lib/ibm_vpc/vpc_v1.rb', line 15248

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)


15476
15477
15478
15479
15480
15481
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 15476

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)


15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
# File 'lib/ibm_vpc/vpc_v1.rb', line 15722

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.

Parameters:

  • load_balancer_id (String) (defaults to: )

    The load balancer identifier.

  • id (String) (defaults to: )

    The pool identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
# File 'lib/ibm_vpc/vpc_v1.rb', line 15967

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)


16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
# File 'lib/ibm_vpc/vpc_v1.rb', line 16242

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)


11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
# File 'lib/ibm_vpc/vpc_v1.rb', line 11830

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)


12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
# File 'lib/ibm_vpc/vpc_v1.rb', line 12032

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)


7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
# File 'lib/ibm_vpc/vpc_v1.rb', line 7440

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


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

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


12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
# File 'lib/ibm_vpc/vpc_v1.rb', line 12267

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)


12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
# File 'lib/ibm_vpc/vpc_v1.rb', line 12472

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)


12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
# File 'lib/ibm_vpc/vpc_v1.rb', line 12648

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)


10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
# File 'lib/ibm_vpc/vpc_v1.rb', line 10064

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_mount_target(share_id: , id: ) ⇒ IBMCloudSdkCore::DetailedResponse

Delete a 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 share mount target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
# File 'lib/ibm_vpc/vpc_v1.rb', line 10342

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_source(share_id: ) ⇒ nil

Split the source file share from a replica 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)


10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
# File 'lib/ibm_vpc/vpc_v1.rb', line 10471

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)


9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
# File 'lib/ibm_vpc/vpc_v1.rb', line 9604

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)


9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
# File 'lib/ibm_vpc/vpc_v1.rb', line 9760

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)


9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
# File 'lib/ibm_vpc/vpc_v1.rb', line 9297

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 all snapshots created from a specific source volume.

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)


9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
# File 'lib/ibm_vpc/vpc_v1.rb', line 9417

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)


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

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)


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
2401
2402
2403
2404
# File 'lib/ibm_vpc/vpc_v1.rb', line 2375

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: ) ⇒ nil

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:

  • (nil)

Raises:

  • (ArgumentError)


10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
# File 'lib/ibm_vpc/vpc_v1.rb', line 10842

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

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
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)


9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
# File 'lib/ibm_vpc/vpc_v1.rb', line 9080

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, and endpoint 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.

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)


200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/ibm_vpc/vpc_v1.rb', line 200

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)


537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/ibm_vpc/vpc_v1.rb', line 537

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)


803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
# File 'lib/ibm_vpc/vpc_v1.rb', line 803

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)


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
1089
1090
1091
1092
1093
# File 'lib/ibm_vpc/vpc_v1.rb', line 1064

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)


1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
# File 'lib/ibm_vpc/vpc_v1.rb', line 1345

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)


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
1644
1645
1646
# File 'lib/ibm_vpc/vpc_v1.rb', line 1615

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)


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

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)


13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
# File 'lib/ibm_vpc/vpc_v1.rb', line 13558

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)


14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
# File 'lib/ibm_vpc/vpc_v1.rb', line 14182

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)


14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
# File 'lib/ibm_vpc/vpc_v1.rb', line 14385

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)


14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
# File 'lib/ibm_vpc/vpc_v1.rb', line 14614

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

#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

The image must not have `deprecation_at` set, must have `catalog_offering.managed`
set to
`false`, and must have a `status` of `available`.

A system-provided image is not allowed to be deprecated.

Parameters:

  • id (String) (defaults to: )

    The image identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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

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)


14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
# File 'lib/ibm_vpc/vpc_v1.rb', line 14464

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)


10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
# File 'lib/ibm_vpc/vpc_v1.rb', line 10201

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)


7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
# File 'lib/ibm_vpc/vpc_v1.rb', line 7263

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)


6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
# File 'lib/ibm_vpc/vpc_v1.rb', line 6933

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)


7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
# File 'lib/ibm_vpc/vpc_v1.rb', line 7133

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)


8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
# File 'lib/ibm_vpc/vpc_v1.rb', line 8661

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)


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

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)


8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
# File 'lib/ibm_vpc/vpc_v1.rb', line 8742

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)


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

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


8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
# File 'lib/ibm_vpc/vpc_v1.rb', line 8277

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)


8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
# File 'lib/ibm_vpc/vpc_v1.rb', line 8453

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)


8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
# File 'lib/ibm_vpc/vpc_v1.rb', line 8584

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)


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

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


6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
# File 'lib/ibm_vpc/vpc_v1.rb', line 6699

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)


6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
# File 'lib/ibm_vpc/vpc_v1.rb', line 6580

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)


6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
# File 'lib/ibm_vpc/vpc_v1.rb', line 6298

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)


6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
# File 'lib/ibm_vpc/vpc_v1.rb', line 6418

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)


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

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)


16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
# File 'lib/ibm_vpc/vpc_v1.rb', line 16584

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)


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
11690
11691
11692
# File 'lib/ibm_vpc/vpc_v1.rb', line 11665

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)


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

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)


12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
# File 'lib/ibm_vpc/vpc_v1.rb', line 12910

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)


2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
# File 'lib/ibm_vpc/vpc_v1.rb', line 2638

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)


2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
# File 'lib/ibm_vpc/vpc_v1.rb', line 2960

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)


3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
# File 'lib/ibm_vpc/vpc_v1.rb', line 3743

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


3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
# File 'lib/ibm_vpc/vpc_v1.rb', line 3996

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)


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

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)


5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
# File 'lib/ibm_vpc/vpc_v1.rb', line 5434

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)


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

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)


5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
# File 'lib/ibm_vpc/vpc_v1.rb', line 5868

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)


6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
# File 'lib/ibm_vpc/vpc_v1.rb', line 6074

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)


3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
# File 'lib/ibm_vpc/vpc_v1.rb', line 3824

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)


4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
# File 'lib/ibm_vpc/vpc_v1.rb', line 4221

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


4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
# File 'lib/ibm_vpc/vpc_v1.rb', line 4483

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)


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

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)


4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
# File 'lib/ibm_vpc/vpc_v1.rb', line 4787

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)


3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
# File 'lib/ibm_vpc/vpc_v1.rb', line 3362

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)


3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
# File 'lib/ibm_vpc/vpc_v1.rb', line 3510

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)


4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
# File 'lib/ibm_vpc/vpc_v1.rb', line 4959

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)


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

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)


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

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)


14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
# File 'lib/ibm_vpc/vpc_v1.rb', line 14979

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)


15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
# File 'lib/ibm_vpc/vpc_v1.rb', line 15287

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)


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

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)


15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
# File 'lib/ibm_vpc/vpc_v1.rb', line 15766

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)


16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
# File 'lib/ibm_vpc/vpc_v1.rb', line 16005

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)


16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
# File 'lib/ibm_vpc/vpc_v1.rb', line 16284

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)


14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
# File 'lib/ibm_vpc/vpc_v1.rb', line 14777

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


15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
# File 'lib/ibm_vpc/vpc_v1.rb', line 15062

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)


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

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)


12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
# File 'lib/ibm_vpc/vpc_v1.rb', line 12070

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)


11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
# File 'lib/ibm_vpc/vpc_v1.rb', line 11044

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)


3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
# File 'lib/ibm_vpc/vpc_v1.rb', line 3080

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)


7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
# File 'lib/ibm_vpc/vpc_v1.rb', line 7476

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


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

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)


10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
# File 'lib/ibm_vpc/vpc_v1.rb', line 10582

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)


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

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


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

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)


12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
# File 'lib/ibm_vpc/vpc_v1.rb', line 12511

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)


12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
# File 'lib/ibm_vpc/vpc_v1.rb', line 12687

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)


10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
# File 'lib/ibm_vpc/vpc_v1.rb', line 10100

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_mount_target(share_id: , id: ) ⇒ IBMCloudSdkCore::DetailedResponse

Retrieve a 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 share mount target identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
# File 'lib/ibm_vpc/vpc_v1.rb', line 10381

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)


9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
# File 'lib/ibm_vpc/vpc_v1.rb', line 9925

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


10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
# File 'lib/ibm_vpc/vpc_v1.rb', line 10507

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)


9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
# File 'lib/ibm_vpc/vpc_v1.rb', line 9640

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)


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

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)


9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
# File 'lib/ibm_vpc/vpc_v1.rb', line 9333

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)


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

def get_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)


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

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)


2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
# File 'lib/ibm_vpc/vpc_v1.rb', line 2087

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)


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


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

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)


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

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)


11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
# File 'lib/ibm_vpc/vpc_v1.rb', line 11226

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)


9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
# File 'lib/ibm_vpc/vpc_v1.rb', line 9116

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)


8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
# File 'lib/ibm_vpc/vpc_v1.rb', line 8938

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)


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

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)


575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/ibm_vpc/vpc_v1.rb', line 575

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)


320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/ibm_vpc/vpc_v1.rb', line 320

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)


357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/ibm_vpc/vpc_v1.rb', line 357

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)


394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/ibm_vpc/vpc_v1.rb', line 394

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)


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

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)


1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
# File 'lib/ibm_vpc/vpc_v1.rb', line 1102

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)


1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
# File 'lib/ibm_vpc/vpc_v1.rb', line 1385

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)


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
1686
1687
1688
# File 'lib/ibm_vpc/vpc_v1.rb', line 1657

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)


13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
# File 'lib/ibm_vpc/vpc_v1.rb', line 13398

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)


13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
# File 'lib/ibm_vpc/vpc_v1.rb', line 13597

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)


14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
# File 'lib/ibm_vpc/vpc_v1.rb', line 14218

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)


14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
# File 'lib/ibm_vpc/vpc_v1.rb', line 14423

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)


14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
# File 'lib/ibm_vpc/vpc_v1.rb', line 14302

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)


14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
# File 'lib/ibm_vpc/vpc_v1.rb', line 14652

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 all backup policies. This request lists all 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)


6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
# File 'lib/ibm_vpc/vpc_v1.rb', line 6790

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 all jobs for a backup policy. This request retrieves all 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)


6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
# File 'lib/ibm_vpc/vpc_v1.rb', line 6888

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 all plans for a backup policy. This request retrieves all 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)


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

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 all disks on a bare metal server. This request lists all 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)


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

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 all network attachments on a bare metal server. This request lists all 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)


7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
# File 'lib/ibm_vpc/vpc_v1.rb', line 7909

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 all floating IPs associated with a bare metal server network interface. This request lists all 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)


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

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)


8544
8545
8546
8547
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 8544

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 all network interfaces on a bare metal server. This request lists all 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=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)


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

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 all bare metal server profiles. This request lists all [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)


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

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, vpc_id: nil, vpc_crn: nil, vpc_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all bare metal servers. This request lists all 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.

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


7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
# File 'lib/ibm_vpc/vpc_v1.rb', line 7644

def list_bare_metal_servers(start: nil, limit: nil, resource_group_id: nil, 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,
    "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_dedicated_host_disks(dedicated_host_id: ) ⇒ IBMCloudSdkCore::DetailedResponse

List all disks on a dedicated host. This request lists all 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)


6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
# File 'lib/ibm_vpc/vpc_v1.rb', line 6543

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 all dedicated host groups. This request lists all dedicated host groups in the region. Host groups are a

collection of dedicated hosts for placement of instances. Each dedicated host must
belong to one and only one group. 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)


6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
# File 'lib/ibm_vpc/vpc_v1.rb', line 6169

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


6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
# File 'lib/ibm_vpc/vpc_v1.rb', line 6382

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 all dedicated hosts. This request lists all 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)


6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
# File 'lib/ibm_vpc/vpc_v1.rb', line 6462

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 all reserved IPs bound to an endpoint gateway. This request lists all 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)


16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
# File 'lib/ibm_vpc/vpc_v1.rb', line 16504

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, vpc_id: nil, vpc_crn: nil, vpc_name: nil, allow_dns_resolution_binding: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all endpoint gateways. This request lists all endpoint gateways in the region. An endpoint gateway maps

one or more reserved IPs in a VPC to a target outside the VPC.

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.

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


16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
# File 'lib/ibm_vpc/vpc_v1.rb', line 16388

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

  params = {
    "version" => @version,
    "generation" => @generation,
    "name" => name,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "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 all floating IPs. This request lists all 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)


11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
# File 'lib/ibm_vpc/vpc_v1.rb', line 11547

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 all flow log collectors. This request lists all flow log collectors in the region. A flow log collector

summarizes data sent over the instance network interfaces and instance network
attachments contained within its target.

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)


16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
# File 'lib/ibm_vpc/vpc_v1.rb', line 16800

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 all IKE policies. This request lists all 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)


12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
# File 'lib/ibm_vpc/vpc_v1.rb', line 12777

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: ) ⇒ IBMCloudSdkCore::DetailedResponse

List all VPN gateway connections that use a specified IKE policy. This request lists all VPN gateway connections that use a policy.

Parameters:

  • id (String) (defaults to: )

    The IKE policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
# File 'lib/ibm_vpc/vpc_v1.rb', line 12987

def list_ike_policy_connections(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_ike_policy_connections")
  headers.merge!(sdk_headers)

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

  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_export_jobs(image_id: , name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all image export jobs. This request lists all 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)


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

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_images(start: nil, limit: nil, resource_group_id: nil, name: nil, status: nil, visibility: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all images. This request lists all 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.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
# File 'lib/ibm_vpc/vpc_v1.rb', line 2514

def list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, status: nil, visibility: 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?

  params = {
    "version" => @version,
    "generation" => @generation,
    "start" => start,
    "limit" => limit,
    "resource_group.id" => resource_group_id,
    "name" => name,
    "status" => status,
    "visibility" => visibility
  }

  method_url = "/images"

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

#list_instance_disks(instance_id: ) ⇒ IBMCloudSdkCore::DetailedResponse

List all disks on an instance. This request lists all 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)


3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
# File 'lib/ibm_vpc/vpc_v1.rb', line 3959

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 all actions for an instance group manager. This request lists all 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)


5520
5521
5522
5523
5524
5525
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
# File 'lib/ibm_vpc/vpc_v1.rb', line 5520

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 all policies for an instance group manager. This request lists all 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)


5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
# File 'lib/ibm_vpc/vpc_v1.rb', line 5739

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 all managers for an instance group. This request lists all 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)


5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
# File 'lib/ibm_vpc/vpc_v1.rb', line 5315

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 all memberships for an instance group. This request lists all 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)


5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
# File 'lib/ibm_vpc/vpc_v1.rb', line 5995

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 all instance groups. This request lists all 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)


5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
# File 'lib/ibm_vpc/vpc_v1.rb', line 5048

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 all network attachments on an instance. This request lists all 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)


4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
# File 'lib/ibm_vpc/vpc_v1.rb', line 4084

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 all floating IPs associated with an instance network interface. This request lists all 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)


4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
# File 'lib/ibm_vpc/vpc_v1.rb', line 4574

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)


4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
# File 'lib/ibm_vpc/vpc_v1.rb', line 4746

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 all network interfaces on an instance. This request lists all 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=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)


4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
# File 'lib/ibm_vpc/vpc_v1.rb', line 4316

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


3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
# File 'lib/ibm_vpc/vpc_v1.rb', line 3329

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 all instance templates. This request lists all instance templates in the region.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
# File 'lib/ibm_vpc/vpc_v1.rb', line 3396

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 all volumes attachments on an instance. This request lists all 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)


4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
# File 'lib/ibm_vpc/vpc_v1.rb', line 4828

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, vpc_id: nil, vpc_crn: nil, vpc_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) ⇒ IBMCloudSdkCore::DetailedResponse

List all instances. This request lists all 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.

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

  • dedicated_host_id (String) (defaults to: nil)

    Filters the collection to instances with a ‘dedicated_host.id` property matching the specified identifier.

  • dedicated_host_crn (String) (defaults to: nil)

    Filters the collection to instances with a ‘dedicated_host.crn` property matching the specified CRN.

  • dedicated_host_name (String) (defaults to: nil)

    Filters the collection to instances with a ‘dedicated_host.name` property matching the exact specified name.

  • placement_group_id (String) (defaults to: nil)

    Filters the collection to instances with a ‘placement_target.id` property matching the specified placement group identifier.

  • placement_group_crn (String) (defaults to: nil)

    Filters the collection to instances with a ‘placement_target.crn` property matching the specified placement group CRN.

  • placement_group_name (String) (defaults to: nil)

    Filters the collection to instances with a ‘placement_target.name` property matching the exact specified placement group name.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
# File 'lib/ibm_vpc/vpc_v1.rb', line 3613

def list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_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)
  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,
    "vpc.id" => vpc_id,
    "vpc.crn" => vpc_crn,
    "vpc.name" => vpc_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
  }

  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 all IPsec policies. This request lists all 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)


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

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: ) ⇒ IBMCloudSdkCore::DetailedResponse

List all VPN gateway connections that use a specified IPsec policy. This request lists all VPN gateway connections that use a policy.

Parameters:

  • id (String) (defaults to: )

    The IPsec policy identifier.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
# File 'lib/ibm_vpc/vpc_v1.rb', line 13237

def list_ipsec_policy_connections(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_ipsec_policy_connections")
  headers.merge!(sdk_headers)

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

  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) ⇒ IBMCloudSdkCore::DetailedResponse

List all keys. This request lists all 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.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
# File 'lib/ibm_vpc/vpc_v1.rb', line 3120

def list_keys(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_keys")
  headers.merge!(sdk_headers)

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

  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 all policies for a load balancer listener. This request lists all policies for a load balancer listener.

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)


15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
# File 'lib/ibm_vpc/vpc_v1.rb', line 15370

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 all rules of a load balancer listener policy. This request lists all 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)


15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
# File 'lib/ibm_vpc/vpc_v1.rb', line 15606

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 all listeners for a load balancer. This request lists all 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)


15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
# File 'lib/ibm_vpc/vpc_v1.rb', line 15097

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 all members of a load balancer pool. This request lists all 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)


16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
# File 'lib/ibm_vpc/vpc_v1.rb', line 16088

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 all pools of a load balancer. This request lists all 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)


15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
# File 'lib/ibm_vpc/vpc_v1.rb', line 15858

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 all load balancer profiles. This request lists all 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)


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

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 all load balancers. This request lists all 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)


14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
# File 'lib/ibm_vpc/vpc_v1.rb', line 14813

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 all rules for a network ACL. This request lists all 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)


11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
# File 'lib/ibm_vpc/vpc_v1.rb', line 11949

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 all network ACLs. This request lists all network ACLs in the region. A network ACL defines a set of

packet filtering (5-tuple) rules for all traffic in and out of a subnet. Both
allow and deny rules can be defined, and rules are stateless such that reverse
traffic in response to allowed traffic is not automatically permitted.

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)


11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
# File 'lib/ibm_vpc/vpc_v1.rb', line 11751

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 all floating IPs associated with a virtual network interface. This request lists all 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)


10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
# File 'lib/ibm_vpc/vpc_v1.rb', line 10965

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 all operating systems. This request lists all 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)


3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
# File 'lib/ibm_vpc/vpc_v1.rb', line 3045

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 all placement groups. This request lists all 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)


7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
# File 'lib/ibm_vpc/vpc_v1.rb', line 7349

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_public_gateways(start: nil, limit: nil, resource_group_id: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all public gateways. This request lists all 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)


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
11340
11341
11342
11343
# File 'lib/ibm_vpc/vpc_v1.rb', line 11315

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 all zones in a region. This request lists all 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)


10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
# File 'lib/ibm_vpc/vpc_v1.rb', line 10619

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 all regions. This request lists all 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)


10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
# File 'lib/ibm_vpc/vpc_v1.rb', line 10549

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_security_group_rules(security_group_id: ) ⇒ IBMCloudSdkCore::DetailedResponse

List all rules in a security group. This request lists all 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)


12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
# File 'lib/ibm_vpc/vpc_v1.rb', line 12384

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 all targets associated with a security group. This request lists all 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)


12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
# File 'lib/ibm_vpc/vpc_v1.rb', line 12598

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 all security groups. This request lists all security groups in the region. Security groups provide a

way to apply IP filtering rules to instances in the associated VPC. With security
groups, all traffic is denied by default, and rules added to security groups
define which traffic the security group permits. Security group rules are stateful
such that reverse traffic in response to allowed traffic is automatically
permitted.

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)


12171
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
12200
12201
12202
# File 'lib/ibm_vpc/vpc_v1.rb', line 12171

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_mount_targets(share_id: , name: nil, start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all mount targets for a file share. This request retrieves all share mount targets for a file share. A share 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)


10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
# File 'lib/ibm_vpc/vpc_v1.rb', line 10252

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 all file share profiles. This request lists all [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)


9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
# File 'lib/ibm_vpc/vpc_v1.rb', line 9888

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_shares(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, replication_role: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all file shares. This request lists all 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)


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

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 all clones for a snapshot. This request lists all 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)


9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
# File 'lib/ibm_vpc/vpc_v1.rb', line 9723

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 all snapshot consistency groups. This request lists all 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)


9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
# File 'lib/ibm_vpc/vpc_v1.rb', line 9214

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_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 all snapshots. This request lists all 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 an `id` 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)


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
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
# File 'lib/ibm_vpc/vpc_v1.rb', line 9506

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 all reserved IPs in a subnet. This request lists all 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)


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

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 all subnets. This request lists all 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)


1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
# File 'lib/ibm_vpc/vpc_v1.rb', line 1767

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 all reserved IPs bound to a virtual network interface. This request lists all 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)


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

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 all virtual network interfaces. This request lists all 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)


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

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_profiles(start: nil, limit: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all volume profiles. This request lists all [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)


8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
# File 'lib/ibm_vpc/vpc_v1.rb', line 8903

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, name: nil, attachment_state: nil, encryption: nil, operating_system_family: nil, operating_system_architecture: nil, zone_name: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all volumes. This request lists all 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.

  • name (String) (defaults to: nil)

    Filters the collection to resources with a ‘name` property matching the exact specified name.

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

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

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


8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
# File 'lib/ibm_vpc/vpc_v1.rb', line 8995

def list_volumes(start: nil, limit: nil, name: nil, attachment_state: nil, encryption: nil, operating_system_family: nil, operating_system_architecture: 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,
    "name" => name,
    "attachment_state" => attachment_state,
    "encryption" => encryption,
    "operating_system.family" => operating_system_family,
    "operating_system.architecture" => operating_system_architecture,
    "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 all address prefixes for a VPC. This request lists all 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)


431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/ibm_vpc/vpc_v1.rb', line 431

def 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 all DNS resolution bindings for a VPC. This request lists all 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)


694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
# File 'lib/ibm_vpc/vpc_v1.rb', line 694

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 all routes in a VPC’s default routing table. This request lists all 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)


935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
# File 'lib/ibm_vpc/vpc_v1.rb', line 935

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 all routes in a VPC routing table. This request lists all 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)


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

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 all routing tables for a VPC. This request lists all 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)


1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
# File 'lib/ibm_vpc/vpc_v1.rb', line 1195

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 all VPCs. This request lists all 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_connection_local_cidrs(vpn_gateway_id: , id: ) ⇒ IBMCloudSdkCore::DetailedResponse

List all local CIDRs for a VPN gateway connection. This request lists all 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)


13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
# File 'lib/ibm_vpc/vpc_v1.rb', line 13682

def list_vpn_gateway_connection_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_connection_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_connection_peer_cidrs(vpn_gateway_id: , id: ) ⇒ IBMCloudSdkCore::DetailedResponse

List all peer CIDRs for a VPN gateway connection. This request lists all 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)


13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
# File 'lib/ibm_vpc/vpc_v1.rb', line 13863

def list_vpn_gateway_connection_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_connection_peer_cidrs")
  headers.merge!(sdk_headers)

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

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

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

#list_vpn_gateway_connections(vpn_gateway_id: , status: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all connections of a VPN gateway. This request lists all connections of a VPN gateway.

Parameters:

  • vpn_gateway_id (String) (defaults to: )

    The VPN gateway identifier.

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


13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
# File 'lib/ibm_vpc/vpc_v1.rb', line 13477

def list_vpn_gateway_connections(vpn_gateway_id:, 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,
    "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_gateways(start: nil, limit: nil, resource_group_id: nil, sort: nil, mode: nil) ⇒ IBMCloudSdkCore::DetailedResponse

List all VPN gateways. This request lists all 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)


13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
# File 'lib/ibm_vpc/vpc_v1.rb', line 13282

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 all VPN clients for a VPN server. This request retrieves all 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)


14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
# File 'lib/ibm_vpc/vpc_v1.rb', line 14344

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 all VPN routes for a VPN server. This request lists all 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)


14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
# File 'lib/ibm_vpc/vpc_v1.rb', line 14511

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 all VPN servers. This request lists all 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)


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

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

A system-provided image is not allowed to be obsoleted.

Parameters:

  • id (String) (defaults to: )

    The image identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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

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

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


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

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)


16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
# File 'lib/ibm_vpc/vpc_v1.rb', line 16545

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)


4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
# File 'lib/ibm_vpc/vpc_v1.rb', line 4614

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)


11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
# File 'lib/ibm_vpc/vpc_v1.rb', line 11005

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)


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
11213
11214
11215
11216
# File 'lib/ibm_vpc/vpc_v1.rb', line 11187

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_connection_local_cidr(vpn_gateway_id: , id: , cidr_prefix: , prefix_length: ) ⇒ 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_prefix (String) (defaults to: )

    The address prefix part of the CIDR.

  • prefix_length (String) (defaults to: )

    The prefix length part of the CIDR.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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

def remove_vpn_gateway_connection_local_cidr(vpn_gateway_id:, id:, cidr_prefix:, prefix_length:)
  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_prefix must be provided") if cidr_prefix.nil?

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

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

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

  method_url = "/vpn_gateways/%s/connections/%s/local_cidrs/%s/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr_prefix), ERB::Util.url_encode(prefix_length)]

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

#remove_vpn_gateway_connection_peer_cidr(vpn_gateway_id: , id: , cidr_prefix: , prefix_length: ) ⇒ 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_prefix (String) (defaults to: )

    The address prefix part of the CIDR.

  • prefix_length (String) (defaults to: )

    The prefix length part of the CIDR.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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
13933
13934
13935
13936
13937
13938
# File 'lib/ibm_vpc/vpc_v1.rb', line 13905

def remove_vpn_gateway_connection_peer_cidr(vpn_gateway_id:, id:, cidr_prefix:, prefix_length:)
  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_prefix must be provided") if cidr_prefix.nil?

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

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

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

  method_url = "/vpn_gateways/%s/connections/%s/peer_cidrs/%s/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr_prefix), ERB::Util.url_encode(prefix_length)]

  request(
    method: "DELETE",
    url: method_url,
    headers: headers,
    params: params,
    accept_json: false
  )
  nil
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)


16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
# File 'lib/ibm_vpc/vpc_v1.rb', line 16196

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)


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

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


2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
# File 'lib/ibm_vpc/vpc_v1.rb', line 2208

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 restarts a bare metal server. It will run immediately regardless of

the state of the server.

Parameters:

  • id (String) (defaults to: )

    The bare metal server identifier.

Returns:

  • (nil)

Raises:

  • (ArgumentError)


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

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

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


2125
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
2154
2155
2156
2157
2158
# File 'lib/ibm_vpc/vpc_v1.rb', line 2125

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)


8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
# File 'lib/ibm_vpc/vpc_v1.rb', line 8814

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)


8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
# File 'lib/ibm_vpc/vpc_v1.rb', line 8854

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

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


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

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)


7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
# File 'lib/ibm_vpc/vpc_v1.rb', line 7303

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)


7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
# File 'lib/ibm_vpc/vpc_v1.rb', line 7176

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.

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)


8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
# File 'lib/ibm_vpc/vpc_v1.rb', line 8699

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)


7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
# File 'lib/ibm_vpc/vpc_v1.rb', line 7856

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)


8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
# File 'lib/ibm_vpc/vpc_v1.rb', line 8078

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


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
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
# File 'lib/ibm_vpc/vpc_v1.rb', line 8326

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


6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
# File 'lib/ibm_vpc/vpc_v1.rb', line 6737

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)


6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
# File 'lib/ibm_vpc/vpc_v1.rb', line 6620

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)


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

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’s name.

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)


16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
# File 'lib/ibm_vpc/vpc_v1.rb', line 16739

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


11701
11702
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
11732
11733
11734
# File 'lib/ibm_vpc/vpc_v1.rb', line 11701

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)


16992
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
17023
17024
17025
# File 'lib/ibm_vpc/vpc_v1.rb', line 16992

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)


12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
# File 'lib/ibm_vpc/vpc_v1.rb', line 12946

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. A system-provided image 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)


2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
# File 'lib/ibm_vpc/vpc_v1.rb', line 2677

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)


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

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

Parameters:

  • id (String) (defaults to: )

    The virtual server instance identifier.

  • instance_patch (Hash) (defaults to: )

    The instance patch.

Returns:

  • (IBMCloudSdkCore::DetailedResponse)

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

Raises:

  • (ArgumentError)


3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
# File 'lib/ibm_vpc/vpc_v1.rb', line 3781

def update_instance(id:, instance_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_patch must be provided") if instance_patch.nil?

  headers = {
  }
  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_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)


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
4066
4067
4068
4069
4070
# File 'lib/ibm_vpc/vpc_v1.rb', line 4035

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)


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

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)


5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
# File 'lib/ibm_vpc/vpc_v1.rb', line 5474

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)


5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
# File 'lib/ibm_vpc/vpc_v1.rb', line 5691

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)


5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
# File 'lib/ibm_vpc/vpc_v1.rb', line 5910

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)


6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
# File 'lib/ibm_vpc/vpc_v1.rb', line 6114

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)


4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
# File 'lib/ibm_vpc/vpc_v1.rb', line 4263

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


4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
# File 'lib/ibm_vpc/vpc_v1.rb', line 4530

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)


3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
# File 'lib/ibm_vpc/vpc_v1.rb', line 3549

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)


5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
# File 'lib/ibm_vpc/vpc_v1.rb', line 5001

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)


13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
# File 'lib/ibm_vpc/vpc_v1.rb', line 13196

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)


3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
# File 'lib/ibm_vpc/vpc_v1.rb', line 3283

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)


15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
# File 'lib/ibm_vpc/vpc_v1.rb', line 15020

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)


15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
# File 'lib/ibm_vpc/vpc_v1.rb', line 15326

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. Updates a policy from a policy patch.

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)


15559
15560
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
15591
15592
15593
15594
15595
15596
# File 'lib/ibm_vpc/vpc_v1.rb', line 15559

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)


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

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)


16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
# File 'lib/ibm_vpc/vpc_v1.rb', line 16044

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)


16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
# File 'lib/ibm_vpc/vpc_v1.rb', line 16326

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)


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
11927
11928
11929
11930
11931
11932
11933
11934
11935
# File 'lib/ibm_vpc/vpc_v1.rb', line 11902

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 information is not applicable to 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)


12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
# File 'lib/ibm_vpc/vpc_v1.rb', line 12111

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)


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

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


11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
# File 'lib/ibm_vpc/vpc_v1.rb', line 11486

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


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
12368
12369
12370
12371
12372
12373
12374
# File 'lib/ibm_vpc/vpc_v1.rb', line 12341

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 information is not applicable to 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)


12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
# File 'lib/ibm_vpc/vpc_v1.rb', line 12552

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)


10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
# File 'lib/ibm_vpc/vpc_v1.rb', line 10140

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


10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
# File 'lib/ibm_vpc/vpc_v1.rb', line 10423

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


9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
# File 'lib/ibm_vpc/vpc_v1.rb', line 9680

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)


9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
# File 'lib/ibm_vpc/vpc_v1.rb', line 9374

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)


1930
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
1959
1960
1961
1962
1963
# File 'lib/ibm_vpc/vpc_v1.rb', line 1930

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)


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
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
# File 'lib/ibm_vpc/vpc_v1.rb', line 2457

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)


10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
# File 'lib/ibm_vpc/vpc_v1.rb', line 10917

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)


9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
# File 'lib/ibm_vpc/vpc_v1.rb', line 9156

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)


276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/ibm_vpc/vpc_v1.rb', line 276

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)


616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
# File 'lib/ibm_vpc/vpc_v1.rb', line 616

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)


884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
# File 'lib/ibm_vpc/vpc_v1.rb', line 884

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)


1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
# File 'lib/ibm_vpc/vpc_v1.rb', line 1143

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)


1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
# File 'lib/ibm_vpc/vpc_v1.rb', line 1428

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)


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
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
# File 'lib/ibm_vpc/vpc_v1.rb', line 1702

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)


13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
# File 'lib/ibm_vpc/vpc_v1.rb', line 13434

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)


13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
# File 'lib/ibm_vpc/vpc_v1.rb', line 13636

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 property

changes will cause all connected VPN clients are disconnected from this VPN server
except for the name change.

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)


14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
# File 'lib/ibm_vpc/vpc_v1.rb', line 14258

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)


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
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
# File 'lib/ibm_vpc/vpc_v1.rb', line 14693

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