From 6402260070a47a22c99e598e130506e59180dfda Mon Sep 17 00:00:00 2001 From: Ujjwal Kumar Date: Tue, 27 May 2025 10:24:55 +0530 Subject: [PATCH] feat(release): Update SDK to support VPC API version 2025-05-13 Signed-off-by: Ujjwal Kumar --- README.md | 3 +- lib/ibm_vpc/vpc_v1.rb | 7392 +++++++++++++++++++++++++------------- test/unit/test_vpc_v1.rb | 580 +-- 3 files changed, 5243 insertions(+), 2732 deletions(-) diff --git a/README.md b/README.md index 64f98d9..33c7963 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -[![Build Status](https://travis.ibm.com/ibmcloud/vpc-ruby-sdk.svg?token=swhipuowmWLkVNjPbrfs&branch=master)](https://travis.ibm.com/ibmcloud/vpc-ruby-sdk) +[![Build](https://img.shields.io/github/actions/workflow/status/IBM/vpc-ruby-sdk/ci.yml?branch=master&label=Build)](https://github.com/IBM/vpc-ruby-sdk/actions/workflows/ci.yml) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![Gem Version](https://badge.fury.io/rb/ibm_vpc.svg)](https://badge.fury.io/rb/ibm_vpc) + # IBM Cloud VPC Ruby SDK Ruby client library to interact with various [IBM Cloud VPC APIs](https://cloud.ibm.com/apidocs?category=compute). diff --git a/lib/ibm_vpc/vpc_v1.rb b/lib/ibm_vpc/vpc_v1.rb index 866aefc..422964f 100644 --- a/lib/ibm_vpc/vpc_v1.rb +++ b/lib/ibm_vpc/vpc_v1.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# (C) Copyright IBM Corp. 2024. +# (C) Copyright IBM Corp. 2025. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ class VpcV1 < IBMCloudSdkCore::BaseService include Concurrent::Async DEFAULT_SERVICE_NAME = "vpc" DEFAULT_SERVICE_URL = "https://us-south.iaas.cloud.ibm.com/v1" - DEFAULT_SERVICE_VERSION = "2024-08-20" + DEFAULT_SERVICE_VERSION = "2025-05-13" attr_accessor :version attr_accessor :generation ## @@ -42,7 +42,7 @@ class VpcV1 < IBMCloudSdkCore::BaseService # # @param args [Hash] The args to initialize with # @option args version [String] The API version, in format `YYYY-MM-DD`. For the API behavior documented here, - # specify any date between `2024-04-30` and `2024-08-20`. + # specify any date between `2025-04-08` and `2025-05-22`. # @option args service_url [String] The base service URL to use when contacting the service. # The base service_url may differ between IBM Cloud regions. # @option args authenticator [Object] The Authenticator instance to be configured for this service. @@ -122,6 +122,18 @@ def list_vpcs(start: nil, limit: nil, resource_group_id: nil, classic_access: ni # This request creates a new VPC from a VPC prototype object. The prototype object # is structured in the same way as a retrieved VPC, and contains the information # necessary to create the new VPC. + # + # The system will automatically create the following additional resources for the + # VPC: + # - Unless `address_prefix_management` is `manual`, a [default address + # prefix](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-address-prefix) for + # each zone + # - A [default network + # ACL](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-network-acl) + # - A [default routing + # table](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-routing-table) + # - A [default security + # group](https://cloud.ibm.com/apidocs/vpc/latest#get-vpc-default-security-group). # @param address_prefix_management [String] Indicates whether a [default address # prefix](https://cloud.ibm.com/docs/vpc?topic=vpc-configuring-address-prefixes) # will be automatically created for each zone in this VPC. If `manual`, this VPC @@ -133,6 +145,11 @@ def list_vpcs(start: nil, limit: nil, resource_group_id: nil, classic_access: ni # this VPC's resources will have private network connectivity to the account's # Classic Infrastructure resources. Only one VPC, per region, may be connected in # this way. This value is set at creation and subsequently immutable. + # + # This property has been deprecated. Instead, use a [Transit + # Gateway](https://cloud.ibm.com/docs/transit-gateway) to connect this VPC to + # Classic Infrastructure. For more information, see [upcoming + # changes](https://cloud.ibm.com/docs/vpc?topic=vpc-api-change-log#upcoming-changes). # @param dns [VPCDNSPrototype] The DNS configuration for this VPC. # # If unspecified, the system will assign DNS servers capable of resolving hosts and @@ -185,8 +202,8 @@ def create_vpc(address_prefix_management: nil, classic_access: nil, dns: nil, na # 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 + # - Instances, subnets, public gateways, endpoint gateways, and private path service + # gateways must not reside in this VPC # - The VPC must not be providing DNS resolution for any other VPCs # - If `dns.enable_hub` is `true`, `dns.resolution_binding_count` must be zero # @@ -739,15 +756,17 @@ def list_vpc_dns_resolution_bindings(vpc_id:, sort: nil, start: nil, limit: nil, # 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 + # See [About DNS sharing for VPE gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) for # more information. # @param vpc_id [String] The VPC identifier. - # @param vpc [VPCIdentity] 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). + # @param vpc [VPCIdentity] The VPC to bind this VPC to for DNS resolution. The VPC must be different from the + # VPC + # specified in the URL, must have `dns.enable_hub` set to `true`, and may be in a + # different account (subject to IAM policies). # # Additionally, the VPC specified in the URL (this VPC) must have `dns.enable_hub` - # set to `false` and a `dns.resolution_binding_count` of zero. + # set + # to `false` and a `dns.resolution_binding_count` of zero. # @param name [String] 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. @@ -1000,7 +1019,7 @@ def list_vpc_routes(vpc_id:, zone_name: nil, start: nil, limit: nil) # 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. - # @param next_hop [RoutePrototypeNextHop] If `action` is `deliver`, the next hop that packets will be delivered to (must not + # @param next_hop [RouteNextHopPrototype] If `action` is `deliver`, the next hop that packets will be delivered to (must not # be # `0.0.0.0`). For other `action` values, it must be omitted or specified as # `0.0.0.0`. @@ -1235,8 +1254,13 @@ def list_vpc_routing_tables(vpc_id:, start: nil, limit: nil, is_default: nil) # This request creates a routing table from a routing table prototype object. The # prototype object is structured in the same way as a retrieved routing table, and # contains the information necessary to create the new routing table. + # + # At present, the routing table's `resource_group` will be inherited from its VPC, + # but may be specifiable in the future. # @param vpc_id [String] The VPC identifier. # @param accept_routes_from [Array[ResourceFilter]] The filters specifying the resources that may create routes in this routing table. + # + # If specified, `resource_type` must be `vpn_gateway` or `vpn_server`. # @param advertise_routes_to [Array[String]] The ingress sources to advertise routes to. Routes in the table with `advertise` # enabled will be advertised to these sources. # @param name [String] The name for this routing table. The name must not be used by another routing @@ -1548,7 +1572,7 @@ def list_vpc_routing_table_routes(vpc_id:, routing_table_id:, start: nil, limit: # 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. - # @param next_hop [RoutePrototypeNextHop] If `action` is `deliver`, the next hop that packets will be delivered to (must not + # @param next_hop [RouteNextHopPrototype] If `action` is `deliver`, the next hop that packets will be delivered to (must not # be # `0.0.0.0`). For other `action` values, it must be omitted or specified as # `0.0.0.0`. @@ -2502,7 +2526,7 @@ def update_subnet_reserved_ip(subnet_id:, id:, reserved_ip_patch:) ######################### ## - # @!method list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, status: nil, visibility: nil, user_data_format: nil) + # @!method list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, status: nil, visibility: nil, user_data_format: nil, owner_type: nil) # List images. # This request lists images available in the region. An image provides source data # for a volume. Images are either system-provided, or created from another source, @@ -2519,8 +2543,10 @@ def update_subnet_reserved_ip(subnet_id:, id:, reserved_ip_patch:) # specified value. # @param user_data_format [Array[String]] Filters the collection to images with a `user_data_format` property matching one # of the specified comma-separated values. + # @param owner_type [String] Filters the collection to images with an `owner_type` property matching the + # specified value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, status: nil, visibility: nil, user_data_format: nil) + def list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, status: nil, visibility: nil, user_data_format: nil, owner_type: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? @@ -2541,7 +2567,8 @@ def list_images(start: nil, limit: nil, resource_group_id: nil, name: nil, statu "name" => name, "status" => status, "visibility" => visibility, - "user_data_format" => user_data_format + "user_data_format" => user_data_format, + "owner_type" => owner_type } method_url = "/images" @@ -2603,8 +2630,9 @@ def create_image(image_prototype:) # @!method delete_image(id:) # 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: + # first. This operation cannot be reversed. An image with an `owner_type` of + # `provider` 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` @@ -2680,8 +2708,9 @@ def get_image(id:) # 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. + # only the information to be updated. An image with an `owner_type` of `provider` is + # not allowed to be updated. An image with a `status` of `deleting` cannot be + # updated. # @param id [String] The image identifier. # @param image_patch [Hash] The image patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. @@ -2732,11 +2761,7 @@ def update_image(id:, image_patch:) # - 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. + # An image with an `owner_type` of `provider` is not allowed to be deprecated. # @param id [String] The image identifier. # @return [nil] def deprecate_image(id:) @@ -2780,7 +2805,7 @@ def deprecate_image(id:) # - not have `deprecation_at` set in the future # - not have `obsolescence_at` set # - # A system-provided image is not allowed to be obsoleted. + # An image with an `owner_type` of `provider` is not allowed to be obsoleted. # @param id [String] The image identifier. # @return [nil] def obsolete_image(id:) @@ -3121,14 +3146,16 @@ def get_operating_system(name:) ######################### ## - # @!method list_keys(start: nil, limit: nil) + # @!method list_keys(start: nil, limit: nil, resource_group_id: nil) # List keys. # This request lists keys in the region. A key contains a public SSH key which may # be installed on instances when they are created. Private keys are not stored. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_keys(start: nil, limit: nil) + def list_keys(start: nil, limit: nil, resource_group_id: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? @@ -3142,7 +3169,8 @@ def list_keys(start: nil, limit: nil) "version" => @version, "generation" => @generation, "start" => start, - "limit" => limit + "limit" => limit, + "resource_group.id" => resource_group_id } method_url = "/keys" @@ -3164,18 +3192,19 @@ def list_keys(start: nil, limit: nil) # 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. - # @param public_key [String] 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. + # @param public_key [String] The public SSH key to use, in OpenSSH format (consisting of three space-separated + # fields: the algorithm name, base64-encoded key value, and a comment). The + # algorithm and comment fields may be omitted, as only the key field is used. + # + # The key field must not match another key in the region. # - # Keys of type `rsa` may be 2048 or 4096 bits in length, however 4096 is - # recommended. Keys of type `ed25519` are 256 bits in length. + # Keys of type `rsa` must be 2048 or 4096 bits in length (4096 is recommended). Keys + # of type `ed25519` must be 256 bits in length. # @param name [String] 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. # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. - # @param type [String] The crypto-system used by this key. + # @param type [String] The crypto-system for this key. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. def create_key(public_key:, name: nil, resource_group: nil, type: nil) raise ArgumentError.new("version must be provided") if version.nil? @@ -3593,7 +3622,7 @@ def update_instance_template(id:, instance_template_patch:) end ## - # @!method list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: nil, placement_group_id: nil, placement_group_crn: nil, placement_group_name: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) + # @!method list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, cluster_network_id: nil, cluster_network_crn: nil, cluster_network_name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: nil, placement_group_id: nil, placement_group_crn: nil, placement_group_name: nil, reservation_affinity_policy: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) # List instances. # This request lists instances in the region. # @param start [String] A server-provided token determining what resource to start the page on. @@ -3602,6 +3631,12 @@ def update_instance_template(id:, instance_template_patch:) # the specified identifier. # @param name [String] Filters the collection to resources with a `name` property matching the exact # specified name. + # @param cluster_network_id [String] Filters the collection to instances with a `cluster_network.id` property matching + # the specified identifier. + # @param cluster_network_crn [String] Filters the collection to instances with a `cluster_network.crn` property matching + # the specified CRN. + # @param cluster_network_name [String] Filters the collection to resources with a `cluster_network.name` property + # matching the exact specified name. # @param dedicated_host_id [String] Filters the collection to resources with a `dedicated_host.id` property matching # the specified identifier. # @param dedicated_host_crn [String] Filters the collection to resources with a `dedicated_host.crn` property matching @@ -3614,6 +3649,8 @@ def update_instance_template(id:, instance_template_patch:) # matching the specified placement group CRN. # @param placement_group_name [String] Filters the collection to resources with a `placement_target.name` property # matching the exact specified placement group name. + # @param reservation_affinity_policy [String] Filters the collection to instances with a `reservation_affinity.policy` property + # matching the specified value. # @param reservation_id [String] Filters the collection to resources with a `reservation.id` property matching the # specified identifier. # @param reservation_crn [String] Filters the collection to resources with a `reservation.crn` property matching the @@ -3627,7 +3664,7 @@ def update_instance_template(id:, instance_template_patch:) # @param vpc_name [String] Filters the collection to resources with a `vpc.name` property matching the exact # specified name. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: nil, placement_group_id: nil, placement_group_crn: nil, placement_group_name: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) + def list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, cluster_network_id: nil, cluster_network_crn: nil, cluster_network_name: nil, dedicated_host_id: nil, dedicated_host_crn: nil, dedicated_host_name: nil, placement_group_id: nil, placement_group_crn: nil, placement_group_name: nil, reservation_affinity_policy: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? @@ -3644,12 +3681,16 @@ def list_instances(start: nil, limit: nil, resource_group_id: nil, name: nil, de "limit" => limit, "resource_group.id" => resource_group_id, "name" => name, + "cluster_network.id" => cluster_network_id, + "cluster_network.crn" => cluster_network_crn, + "cluster_network.name" => cluster_network_name, "dedicated_host.id" => dedicated_host_id, "dedicated_host.crn" => dedicated_host_crn, "dedicated_host.name" => dedicated_host_name, "placement_group.id" => placement_group_id, "placement_group.crn" => placement_group_crn, "placement_group.name" => placement_group_name, + "reservation_affinity.policy" => reservation_affinity_policy, "reservation.id" => reservation_id, "reservation.crn" => reservation_crn, "reservation.name" => reservation_name, @@ -3923,6 +3964,249 @@ def create_instance_action(instance_id:, type:, force: nil) response end + ## + # @!method list_instance_cluster_network_attachments(instance_id:, start: nil, limit: nil) + # List cluster network attachments on an instance. + # This request lists cluster network attachments on an instance. A cluster network + # attachment represents a device on the instance to which a cluster network + # interface is attached. + # @param instance_id [String] The virtual server instance identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def list_instance_cluster_network_attachments(instance_id:, start: nil, limit: nil) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("instance_id must be provided") if instance_id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_instance_cluster_network_attachments") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation, + "start" => start, + "limit" => limit + } + + method_url = "/instances/%s/cluster_network_attachments" % [ERB::Util.url_encode(instance_id)] + + response = request( + method: "GET", + url: method_url, + headers: headers, + params: params, + accept_json: true + ) + response + end + + ## + # @!method create_cluster_network_attachment(instance_id:, cluster_network_interface:, before: nil, name: nil) + # Create a cluster network attachment. + # This request creates a cluster network attachment from an instance cluster network + # attachment prototype object. A cluster network attachment will attach the instance + # to a cluster network. The cluster network attachment prototype must specify a + # cluster network interface identity or a cluster network interface prototype. + # + # The instance must be in a `stopped` or `stopping` state to create an instance + # cluster network attachment. + # @param instance_id [String] The virtual server instance identifier. + # @param cluster_network_interface [InstanceClusterNetworkAttachmentPrototypeClusterNetworkInterface] A cluster network interface for the instance cluster network attachment. This can + # be + # specified using an existing cluster network interface that does not already have a + # `target`, + # or a prototype object for a new cluster network interface. + # + # This instance must reside in the same VPC as the specified cluster network + # interface. The + # cluster network interface must reside in the same cluster network as the + # `cluster_network_interface` of any other `cluster_network_attachments` for this + # instance. + # @param before [InstanceClusterNetworkAttachmentBeforePrototype] The instance cluster network attachment to insert this instance cluster network + # attachment + # immediately before. + # + # If unspecified, this instance cluster network attachment will be inserted after + # all + # existing instance cluster network attachments. + # @param name [String] The name for this cluster network attachment. Names must be unique within the + # instance the cluster network attachment resides in. If unspecified, the name will + # be a hyphenated list of randomly-selected words. Names starting with `ibm-` are + # reserved for provider-owned resources, and are not allowed. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def create_cluster_network_attachment(instance_id:, cluster_network_interface:, before: nil, name: nil) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("instance_id must be provided") if instance_id.nil? + + raise ArgumentError.new("cluster_network_interface must be provided") if cluster_network_interface.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network_attachment") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + data = { + "cluster_network_interface" => cluster_network_interface, + "before" => before, + "name" => name + } + + method_url = "/instances/%s/cluster_network_attachments" % [ERB::Util.url_encode(instance_id)] + + response = request( + method: "POST", + url: method_url, + headers: headers, + params: params, + json: data, + accept_json: true + ) + response + end + + ## + # @!method delete_instance_cluster_network_attachment(instance_id:, id:) + # Delete an instance cluster network attachment. + # This request deletes an instance cluster network attachment. The instance must be + # in a + # `stopped` or `stopping` state to delete an instance cluster network attachment. + # + # This operation cannot be reversed. + # @param instance_id [String] The virtual server instance identifier. + # @param id [String] The instance cluster network attachment identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def delete_instance_cluster_network_attachment(instance_id:, id:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("instance_id must be provided") if instance_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_instance_cluster_network_attachment") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/instances/%s/cluster_network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)] + + response = request( + method: "DELETE", + url: method_url, + headers: headers, + params: params, + accept_json: true + ) + response + end + + ## + # @!method get_instance_cluster_network_attachment(instance_id:, id:) + # Retrieve an instance cluster network attachment. + # This request retrieves a single instance cluster network attachment specified by + # the identifier in the URL. + # @param instance_id [String] The virtual server instance identifier. + # @param id [String] The instance cluster network attachment identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def get_instance_cluster_network_attachment(instance_id:, id:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("instance_id must be provided") if instance_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_instance_cluster_network_attachment") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/instances/%s/cluster_network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)] + + response = request( + method: "GET", + url: method_url, + headers: headers, + params: params, + accept_json: true + ) + response + end + + ## + # @!method update_instance_cluster_network_attachment(instance_id:, id:, instance_cluster_network_attachment_patch:) + # Update an instance cluster network attachment. + # This request updates an instance cluster network attachment with the information + # provided in an instance network interface patch object. The instance cluster + # network attachment patch object is structured in the same way as a retrieved + # instance cluster network attachment and needs to contain only the information to + # be updated. + # @param instance_id [String] The virtual server instance identifier. + # @param id [String] The instance cluster network attachment identifier. + # @param instance_cluster_network_attachment_patch [Hash] The instance cluster network attachment patch. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def update_instance_cluster_network_attachment(instance_id:, id:, instance_cluster_network_attachment_patch:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("instance_id must be provided") if instance_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + raise ArgumentError.new("instance_cluster_network_attachment_patch must be provided") if instance_cluster_network_attachment_patch.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_instance_cluster_network_attachment") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + data = instance_cluster_network_attachment_patch + headers["Content-Type"] = "application/merge-patch+json" + + method_url = "/instances/%s/cluster_network_attachments/%s" % [ERB::Util.url_encode(instance_id), ERB::Util.url_encode(id)] + + response = request( + method: "PATCH", + url: method_url, + headers: headers, + params: params, + data: data, + accept_json: true + ) + response + end + ## # @!method create_instance_console_access_token(instance_id:, console_type:, force: nil) # Create a console access token for an instance. @@ -4892,8 +5176,9 @@ def list_instance_volume_attachments(instance_id:) # way as a retrieved volume attachment, and contains the information necessary to # create the new volume attachment. # @param instance_id [String] The virtual server instance identifier. - # @param volume [VolumeAttachmentPrototypeVolume] An existing volume to attach to the instance, or a prototype object for a new - # volume. + # @param volume [VolumeAttachmentPrototypeVolume] The volume to use for this attachment. This can be specified as an existing + # unattached + # volume, or a prototype object for a new volume. # @param delete_volume_on_instance_delete [Boolean] Indicates whether deleting the instance will also delete the attached volume. # @param name [String] 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 @@ -5107,10 +5392,10 @@ def list_instance_groups(start: nil, limit: nil) # @!method create_instance_group(instance_template:, subnets:, application_port: nil, load_balancer: nil, load_balancer_pool: nil, membership_count: nil, name: nil, resource_group: nil) # Create an instance group. # This request creates a new instance group. - # @param instance_template [InstanceTemplateIdentity] Instance template to use when creating new instances. + # @param instance_template [InstanceTemplateIdentity] The 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`. + # The specified template must not have `default_trusted_profile.auto_link` set to + # `true`. # @param subnets [Array[SubnetIdentity]] The subnets to use when creating new instances. # @param application_port [Fixnum] 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, @@ -6180,7 +6465,7 @@ def update_instance_group_membership(instance_group_id:, id:, instance_group_mem ######################### ## - # @!method list_reservations(start: nil, limit: nil, name: nil, resource_group_id: nil, zone_name: nil) + # @!method list_reservations(start: nil, limit: nil, name: nil, profile_resource_type: nil, affinity_policy: nil, resource_group_id: nil, zone_name: nil) # List reservations. # This request lists reservations in the region. A reservation provides reserved # capacity for a specified profile in a specified zone. A reservation can also @@ -6193,12 +6478,16 @@ def update_instance_group_membership(instance_group_id:, id:, instance_group_mem # @param limit [Fixnum] The number of resources to return on a page. # @param name [String] Filters the collection to resources with a `name` property matching the exact # specified name. + # @param profile_resource_type [String] Filters the collection of resources with a `profile.resource_type` property + # matching the specified value. + # @param affinity_policy [String] Filters the collection to reservations with an `affinity_policy` property matching + # the specified value. # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching # the specified identifier. # @param zone_name [String] Filters the collection to resources with a `zone.name` property matching the exact # specified name. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_reservations(start: nil, limit: nil, name: nil, resource_group_id: nil, zone_name: nil) + def list_reservations(start: nil, limit: nil, name: nil, profile_resource_type: nil, affinity_policy: nil, resource_group_id: nil, zone_name: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? @@ -6214,6 +6503,8 @@ def list_reservations(start: nil, limit: nil, name: nil, resource_group_id: nil, "start" => start, "limit" => limit, "name" => name, + "profile.resource_type" => profile_resource_type, + "affinity_policy" => affinity_policy, "resource_group.id" => resource_group_id, "zone.name" => zone_name } @@ -6238,10 +6529,13 @@ def list_reservations(start: nil, limit: nil, name: nil, resource_group_id: nil, # contains the information necessary to create the new reservation. # @param capacity [ReservationCapacityPrototype] The capacity reservation configuration to use. # @param committed_use [ReservationCommittedUsePrototype] The committed use configuration to use for this reservation. - # @param profile [ReservationProfilePrototype] The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this - # reservation. + # @param profile [ReservationProfilePrototype] The [instance profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) or + # [bare metal server + # profile](https://cloud.ibm.com/docs/vpc?topic=vpc-bare-metal-servers-profile) + # to use for this reservation. # @param zone [ZoneIdentity] The zone to use for this reservation. # @param affinity_policy [String] The affinity policy to use for this reservation: + # - `automatic`: The reservation will be automatically selected # - `restricted`: The reservation must be manually requested. # @param name [String] The name for this reservation. The name must not be used by another reservation in # the region. If unspecified, the name will be a hyphenated list of @@ -6452,9 +6746,9 @@ def activate_reservation(id:) ## # @!method list_dedicated_host_groups(start: nil, limit: nil, resource_group_id: nil, zone_name: nil, name: nil) # List dedicated host groups. - # This request lists 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. + # This request lists dedicated host groups in the region. Each dedicated host must + # belong to exactly one group, which controls placement of instances. Dedicated host + # groups do not span zones. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching @@ -6955,7 +7249,9 @@ def update_dedicated_host_disk(dedicated_host_id:, id:, dedicated_host_disk_patc ## # @!method delete_dedicated_host(id:) # Delete a dedicated host. - # This request deletes a dedicated host. + # This request deletes a dedicated host. This operation cannot be reversed. For this + # request to succeed, `instances` must be empty and `instance_placement_enabled` + # must be `false`. # @param id [String] The dedicated host identifier. # @return [nil] def delete_dedicated_host(id:) @@ -7112,11 +7408,7 @@ def list_placement_groups(start: nil, limit: nil) # This request creates a new placement group. # @param strategy [String] The strategy for this placement group: # - `host_spread`: place on different compute hosts - # - `power_spread`: place on compute hosts that use different power sources - # - # The enumerated values for this property may - # [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the - # future. + # - `power_spread`: place on compute hosts that use different power sources. # @param name [String] 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. @@ -7355,7 +7647,7 @@ def get_bare_metal_server_profile(name:) end ## - # @!method list_bare_metal_servers(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) + # @!method list_bare_metal_servers(start: nil, limit: nil, resource_group_id: nil, name: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) # List bare metal servers. # This request lists bare metal servers in the region. # @param start [String] A server-provided token determining what resource to start the page on. @@ -7364,6 +7656,12 @@ def get_bare_metal_server_profile(name:) # the specified identifier. # @param name [String] Filters the collection to resources with a `name` property matching the exact # specified name. + # @param reservation_id [String] Filters the collection to resources with a `reservation.id` property matching the + # specified identifier. + # @param reservation_crn [String] Filters the collection to resources with a `reservation.crn` property matching the + # specified identifier. + # @param reservation_name [String] Filters the collection to resources with a `reservation.name` property matching + # the specified identifier. # @param vpc_id [String] Filters the collection to resources with a `vpc.id` property matching the # specified identifier. # @param vpc_crn [String] Filters the collection to resources with a `vpc.crn` property matching the @@ -7371,7 +7669,7 @@ def get_bare_metal_server_profile(name:) # @param vpc_name [String] Filters the collection to resources with a `vpc.name` property matching the exact # specified name. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_bare_metal_servers(start: nil, limit: nil, resource_group_id: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) + def list_bare_metal_servers(start: nil, limit: nil, resource_group_id: nil, name: nil, reservation_id: nil, reservation_crn: nil, reservation_name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? @@ -7388,6 +7686,9 @@ def list_bare_metal_servers(start: nil, limit: nil, resource_group_id: nil, name "limit" => limit, "resource_group.id" => resource_group_id, "name" => name, + "reservation.id" => reservation_id, + "reservation.crn" => reservation_crn, + "reservation.name" => reservation_name, "vpc.id" => vpc_id, "vpc.crn" => vpc_crn, "vpc.name" => vpc_name @@ -8556,15 +8857,14 @@ def get_bare_metal_server_initialization(id:) # @param keys [Array[KeyIdentity]] The public SSH keys to install on the bare metal server. Keys will be made # available to the bare metal server as cloud-init vendor data. For cloud-init # enabled images, these keys will also be added as SSH authorized keys for the - # administrative user. + # [default + # user](https://cloud.ibm.com/docs/vpc?topic=vpc-vsi_is_connecting_linux#determining-default-user-account). # # For Windows images, at least one key must be specified, and one will be selected # to encrypt the administrator password. Keys are optional for other images, but if - # no keys are specified, the instance will be inaccessible unless the specified - # image provides another means of access. - # @param user_data [String] User data to be made available when initializing the bare metal server. - # - # If unspecified, no user data will be made available. + # no keys are specified, the bare metal server will be inaccessible unless the + # specified image provides another means of access. + # @param user_data [String] The user data to be made available when initializing the bare metal server. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. def replace_bare_metal_server_initialization(id:, image:, keys:, user_data: nil) raise ArgumentError.new("version must be provided") if version.nil? @@ -8803,18 +9103,18 @@ def get_volume_profile(name:) end ## - # @!method list_volumes(start: nil, limit: nil, name: nil, attachment_state: nil, encryption: nil, operating_system_family: nil, operating_system_architecture: nil, zone_name: nil, tag: nil) + # @!method list_volumes(start: nil, limit: nil, attachment_state: nil, encryption: nil, name: nil, operating_system_family: nil, operating_system_architecture: nil, tag: nil, zone_name: nil) # List volumes. # This request lists volumes in the region. Volumes are network-connected block # storage devices that may be attached to one or more instances in the same region. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. - # @param name [String] Filters the collection to resources with a `name` property matching the exact - # specified name. # @param attachment_state [String] Filters the collection to volumes with an `attachment_state` property matching the # specified value. # @param encryption [String] Filters the collection to resources with an `encryption` property matching the # specified value. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. # @param operating_system_family [String] Filters the collection to resources with an `operating_system.family` property # matching the specified operating system family. # @@ -8827,12 +9127,12 @@ def get_volume_profile(name:) # 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. - # @param zone_name [String] Filters the collection to resources with a `zone.name` property matching the exact - # specified name. # @param tag [String] Filters the collection to resources with an item in the `tags` property matching # the exact specified tag. + # @param zone_name [String] Filters the collection to resources with a `zone.name` property matching the exact + # specified name. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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, tag: nil) + def list_volumes(start: nil, limit: nil, attachment_state: nil, encryption: nil, name: nil, operating_system_family: nil, operating_system_architecture: nil, tag: nil, zone_name: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? @@ -8847,13 +9147,13 @@ def list_volumes(start: nil, limit: nil, name: nil, attachment_state: nil, encry "generation" => @generation, "start" => start, "limit" => limit, - "name" => name, "attachment_state" => attachment_state, "encryption" => encryption, + "name" => name, "operating_system.family" => operating_system_family, "operating_system.architecture" => operating_system_architecture, - "zone.name" => zone_name, - "tag" => tag + "tag" => tag, + "zone.name" => zone_name } method_url = "/volumes" @@ -9326,8 +9626,8 @@ def delete_snapshots(source_volume_id:) # `id` property matching the specified identifier. # @param copies_name [String] Filters the collection to snapshots with an item in the `copies` property with a # `name` property matching the exact specified name. - # @param copies_crn [String] Filters the collection to snapshots with an item in the `copies` property with an - # `id` property matching the specified CRN. + # @param copies_crn [String] Filters the collection to snapshots with an item in the `copies` property with a + # `crn` property matching the specified CRN. # @param copies_remote_region_name [String] Filters the collection to snapshots with an item in the `copies` property with a # `remote.region.name` property matching the exact specified name. # @param source_snapshot_id [String] Filters the collection to resources with a `source_snapshot.id` property matching @@ -10019,7 +10319,8 @@ def update_share(id:, share_patch:, if_match: nil) # @!method list_share_accessor_bindings(id:, start: nil, limit: nil) # List accessor bindings for a file share. # This request lists accessor bindings for a share. Each accessor binding identifies - # a resource (possibly in another account) with access to this file share's data. + # a resource (possibly in another account) with access to this file share including + # its snapshots. # # The share accessor bindings will be sorted by their `created_at` property values, # with newest bindings first. @@ -10419,17 +10720,28 @@ def update_share_mount_target(share_id:, id:, share_mount_target_patch:) end ## - # @!method delete_share_source(share_id:) - # Split the source file share from a replica file share. - # This request removes the replication relationship between a source share and the - # replica share specified by the identifier in the URL. The replication relationship - # cannot be removed if a source share or the replica share has a `lifecycle_state` - # of `updating`, or has a replication operation in progress. + # @!method list_share_snapshots(share_id:, backup_policy_plan_id: nil, name: nil, start: nil, limit: nil, sort: nil) + # List file share snapshots. + # This request lists snapshots for the specified file share, or across all + # accessible file shares. A snapshot preserves the data of a share at the time the + # snapshot was captured. # - # This operation cannot be reversed. - # @param share_id [String] The file share identifier. - # @return [nil] - def delete_share_source(share_id:) + # If the file share is a replica, the list will contain snapshots corresponding to + # snapshots on the source. + # @param share_id [String] The file share identifier, or `-` to wildcard all accessible file shares. + # @param backup_policy_plan_id [String] Filters the collection to backup policy jobs with a `backup_policy_plan.id` + # property matching the specified identifier. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param sort [String] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def list_share_snapshots(share_id:, backup_policy_plan_id: nil, name: nil, start: nil, limit: nil, sort: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? @@ -10438,18 +10750,266 @@ def delete_share_source(share_id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_share_source") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_share_snapshots") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "generation" => @generation, + "backup_policy_plan.id" => backup_policy_plan_id, + "name" => name, + "start" => start, + "limit" => limit, + "sort" => sort } - method_url = "/shares/%s/source" % [ERB::Util.url_encode(share_id)] + method_url = "/shares/%s/snapshots" % [ERB::Util.url_encode(share_id)] - request( - method: "DELETE", + response = request( + method: "GET", + url: method_url, + headers: headers, + params: params, + accept_json: true + ) + response + end + + ## + # @!method create_share_snapshot(share_id:, name: nil, user_tags: nil) + # Create a snapshot for a file share. + # This request creates a new share snapshot from a share snapshot prototype object. + # The prototype object is structured in the same way as a retrieved share snapshot, + # and contains the information necessary to create the new share snapshot. + # + # The share must have an `access_control_mode` of `security_group` and a + # `replication_role` of `source` or `none`. + # + # The snapshot will inherit its `resource_group` and encryption settings from the + # share. + # + # If the share has a `replication_role` of `source`, a corresponding snapshot on the + # replica share will be created with a `status` of `pending`. It will remain in + # `pending` until the data is synchronized per the replication schedule determined + # by the replica share's `replication_cron_spec`. + # @param share_id [String] The file share identifier. + # @param name [String] The name for this share snapshot. The name must not be used by another snapshot + # for the file share. If unspecified, the name will be a hyphenated list of + # randomly-selected words. + # @param user_tags [Array[String]] The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated + # with this share snapshot. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def create_share_snapshot(share_id:, name: nil, user_tags: nil) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("share_id must be provided") if share_id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_share_snapshot") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + data = { + "name" => name, + "user_tags" => user_tags + } + + method_url = "/shares/%s/snapshots" % [ERB::Util.url_encode(share_id)] + + response = request( + method: "POST", + url: method_url, + headers: headers, + params: params, + json: data, + accept_json: true + ) + response + end + + ## + # @!method delete_share_snapshot(share_id:, id:) + # Delete a share snapshot. + # This request deletes a share snapshot. This operation cannot be reversed. For this + # request to succeed, the share must have a `replication_role` of `source` or + # `none`. + # + # If the request is accepted, the share snapshot `lifecycle_state` will be set to + # `deleting`. Once deletion processing completes, the share snapshot will no longer + # be retrievable. + # + # Deleting a share snapshot will not affect any previously-accepted requests to + # create a share from it. + # + # If the share has a `replication_role` of `source`, the corresponding snapshot on + # the replica share will be subsequently moved to a `lifecycle_state` of `deleting`. + # If the data for the corresponding snapshot has already been synchronized via the + # replication schedule determined by `replication_cron_spec`, the snapshot will + # remain available in the replica share's `.snapshot` directory until the next + # replication sync. + # @param share_id [String] The file share identifier. + # @param id [String] The share snapshot identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def delete_share_snapshot(share_id:, id:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("share_id must be provided") if share_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_share_snapshot") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/shares/%s/snapshots/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)] + + response = request( + method: "DELETE", + url: method_url, + headers: headers, + params: params, + accept_json: true + ) + response + end + + ## + # @!method get_share_snapshot(share_id:, id:) + # Retrieve a share snapshot. + # This request retrieves a single share snapshot specified by the identifier in the + # URL. + # @param share_id [String] The file share identifier. + # @param id [String] The share snapshot identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def get_share_snapshot(share_id:, id:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("share_id must be provided") if share_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_share_snapshot") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/shares/%s/snapshots/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)] + + response = request( + method: "GET", + url: method_url, + headers: headers, + params: params, + accept_json: true + ) + response + end + + ## + # @!method update_share_snapshot(share_id:, id:, share_snapshot_patch:, if_match: nil) + # Update a share snapshot. + # This request updates a share snapshot with the information provided in a share + # snapshot patch object. The share snapshot patch object is structured in the same + # way as a retrieved share snapshot and needs to contain only the information to be + # updated. + # @param share_id [String] The file share identifier. + # @param id [String] The share snapshot identifier. + # @param share_snapshot_patch [Hash] The share snapshot patch. + # @param if_match [String] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def update_share_snapshot(share_id:, id:, share_snapshot_patch:, if_match: nil) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("share_id must be provided") if share_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + raise ArgumentError.new("share_snapshot_patch must be provided") if share_snapshot_patch.nil? + + headers = { + "If-Match" => if_match + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_share_snapshot") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + data = share_snapshot_patch + headers["Content-Type"] = "application/merge-patch+json" + + method_url = "/shares/%s/snapshots/%s" % [ERB::Util.url_encode(share_id), ERB::Util.url_encode(id)] + + response = request( + method: "PATCH", + url: method_url, + headers: headers, + params: params, + data: data, + accept_json: true + ) + response + end + + ## + # @!method delete_share_source(share_id:) + # Split the source file share from a replica file share. + # This request removes the replication relationship between a source share and the + # replica share specified by the identifier in the URL. The replication relationship + # cannot be removed if a source share or the replica share has a `lifecycle_state` + # of `updating`, or has a replication operation in progress. + # + # This operation cannot be reversed. + # @param share_id [String] The file share identifier. + # @return [nil] + 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, @@ -10745,8 +11305,7 @@ def list_backup_policy_plans(backup_policy_id:, name: nil) # # All backup schedules for plans in the same policy must be at least an hour apart. # @param active [Boolean] Indicates whether the plan is active. - # @param attach_user_tags [Array[String]] User tags to attach to each backup (snapshot) created by this plan. If - # unspecified, no user tags will be attached. + # @param attach_user_tags [Array[String]] The user tags to attach to each backup (snapshot) created by this plan. # @param clone_policy [BackupPolicyPlanClonePolicyPrototype] # @param copy_user_tags [Boolean] Indicates whether to copy the source's user tags to the created backups # (snapshots). @@ -11285,9 +11844,9 @@ def list_virtual_network_interfaces(start: nil, limit: nil, resource_group_id: n # - `allow_ip_spoofing` must be `false`. # - Can only be attached to a `target` with a `resource_type` of # `bare_metal_server_network_attachment`. - # @param ips [Array[VirtualNetworkInterfaceIPPrototype]] 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 + # @param ips [Array[VirtualNetworkInterfaceIPPrototype]] The additional IP addresses to bind to the virtual network interface. Each item + # may be either a reserved IP identity, or a reserved IP prototype object which will + # be used to create a new reserved IP. All IP addresses must be in the primary IP's # subnet. # # If reserved IP identities are provided, the specified reserved IPs must be @@ -11839,40 +12398,36 @@ def add_virtual_network_interface_ip(virtual_network_interface_id:, id:) response end ######################### - # Public gateways + # Cluster networks ######################### ## - # @!method list_public_gateways(start: nil, limit: nil, resource_group_id: nil) - # List public gateways. - # This request lists public gateways in the region. A public gateway is a virtual - # network device associated with a VPC, which allows access to the Internet. A - # public gateway resides in a zone and can be connected to subnets in the same zone - # only. + # @!method list_cluster_network_profiles(start: nil, limit: nil) + # List cluster network profiles. + # This request lists cluster network profiles available in the region. A cluster + # network profile specifies the performance characteristics and capabilities for a + # cluster network. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. - # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching - # the specified identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_public_gateways(start: nil, limit: nil, resource_group_id: nil) + def list_cluster_network_profiles(start: nil, limit: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_public_gateways") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_network_profiles") headers.merge!(sdk_headers) params = { "version" => @version, "generation" => @generation, "start" => start, - "limit" => limit, - "resource_group.id" => resource_group_id + "limit" => limit } - method_url = "/public_gateways" + method_url = "/cluster_network/profiles" response = request( method: "GET", @@ -11885,37 +12440,22 @@ def list_public_gateways(start: nil, limit: nil, resource_group_id: nil) end ## - # @!method create_public_gateway(vpc:, zone:, floating_ip: nil, name: nil, resource_group: nil) - # 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. - # @param vpc [VPCIdentity] The VPC this public gateway will reside in. - # @param zone [ZoneIdentity] The zone this public gateway will reside in. - # @param floating_ip [PublicGatewayFloatingIPPrototype] - # @param name [String] 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. - # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource - # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @!method get_cluster_network_profile(name:) + # Retrieve a cluster network profile. + # This request retrieves a single cluster network profile specified by the name in + # the URL. + # @param name [String] The cluster network profile name. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_public_gateway(vpc:, zone:, floating_ip: nil, name: nil, resource_group: nil) + def get_cluster_network_profile(name:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("vpc must be provided") if vpc.nil? - - raise ArgumentError.new("zone must be provided") if zone.nil? + raise ArgumentError.new("name must be provided") if name.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_public_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network_profile") headers.merge!(sdk_headers) params = { @@ -11923,90 +12463,67 @@ def create_public_gateway(vpc:, zone:, floating_ip: nil, name: nil, resource_gro "generation" => @generation } - data = { - "vpc" => vpc, - "zone" => zone, - "floating_ip" => floating_ip, - "name" => name, - "resource_group" => resource_group - } - - method_url = "/public_gateways" + method_url = "/cluster_network/profiles/%s" % [ERB::Util.url_encode(name)] response = request( - method: "POST", + method: "GET", url: method_url, headers: headers, params: params, - json: data, accept_json: true ) response end ## - # @!method delete_public_gateway(id:) - # 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. - # @param id [String] The public gateway identifier. - # @return [nil] - 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 - - ## - # @!method get_public_gateway(id:) - # Retrieve a public gateway. - # This request retrieves a single public gateway specified by the identifier in the - # URL. - # @param id [String] The public gateway identifier. + # @!method list_cluster_networks(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) + # List cluster networks. + # This request lists [cluster + # networks](https://cloud.ibm.com/docs/vpc?topic=vpc-about-cluster-network) in the + # region. A cluster network is a grouping of resources in a separate networking + # space for high performance computing and networking. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. + # @param sort [String] 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. + # @param vpc_id [String] Filters the collection to cluster networks with a `vpc.id` property matching the + # specified id. + # @param vpc_crn [String] Filters the collection to cluster networks with a `vpc.crn` property matching the + # specified CRN. + # @param vpc_name [String] Filters the collection to cluster networks with a `vpc.name` property matching the + # specified name. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_public_gateway(id:) + def list_cluster_networks(start: nil, limit: nil, resource_group_id: nil, name: nil, sort: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("id must be provided") if id.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_public_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_networks") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "generation" => @generation, + "start" => start, + "limit" => limit, + "resource_group.id" => resource_group_id, + "name" => name, + "sort" => sort, + "vpc.id" => vpc_id, + "vpc.crn" => vpc_crn, + "vpc.name" => vpc_name } - method_url = "/public_gateways/%s" % [ERB::Util.url_encode(id)] + method_url = "/cluster_networks" response = request( method: "GET", @@ -12019,24 +12536,37 @@ def get_public_gateway(id:) end ## - # @!method update_public_gateway(id:, public_gateway_patch:) - # Update a public gateway. - # This request updates a public gateway's name. - # @param id [String] The public gateway identifier. - # @param public_gateway_patch [Hash] The public gateway patch. + # @!method create_cluster_network(profile:, vpc:, zone:, name: nil, resource_group: nil, subnet_prefixes: nil) + # Create a cluster network. + # This request creates a new cluster network from a cluster network prototype + # object. The prototype object is structured in the same way as a retrieved cluster + # network, and contains the information necessary to create the new cluster network. + # @param profile [ClusterNetworkProfileIdentity] The profile to use for this cluster network. + # @param vpc [VPCIdentity] The VPC this cluster network will reside in. + # @param zone [ZoneIdentity] The zone this cluster network will reside in. The zone must be listed + # as supported on the specified cluster network profile. + # @param name [String] The name for this cluster network. The name must not be used by another cluster + # network in the region. Names starting with `ibm-` are reserved for provider-owned + # resources, and are not allowed. If unspecified, the name will be a hyphenated list + # of randomly-selected words. + # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource + # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @param subnet_prefixes [Array[ClusterNetworkSubnetPrefixPrototype]] # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_public_gateway(id:, public_gateway_patch:) + def create_cluster_network(profile:, vpc:, zone:, name: nil, resource_group: nil, subnet_prefixes: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("profile must be provided") if profile.nil? - raise ArgumentError.new("public_gateway_patch must be provided") if public_gateway_patch.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", "update_public_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network") headers.merge!(sdk_headers) params = { @@ -12044,56 +12574,61 @@ def update_public_gateway(id:, public_gateway_patch:) "generation" => @generation } - data = public_gateway_patch - headers["Content-Type"] = "application/merge-patch+json" + data = { + "profile" => profile, + "vpc" => vpc, + "zone" => zone, + "name" => name, + "resource_group" => resource_group, + "subnet_prefixes" => subnet_prefixes + } - method_url = "/public_gateways/%s" % [ERB::Util.url_encode(id)] + method_url = "/cluster_networks" response = request( - method: "PATCH", + method: "POST", url: method_url, headers: headers, params: params, - data: data, + json: data, accept_json: true ) response end - ######################### - # Floating IPs - ######################### ## - # @!method 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) - # List floating IPs. - # This request lists floating IPs in the region. Floating IPs allow inbound and - # outbound traffic from the Internet to an instance. + # @!method list_cluster_network_interfaces(cluster_network_id:, start: nil, limit: nil, name: nil, sort: nil) + # List cluster network interfaces. + # This request lists cluster network interfaces in the region. A cluster network + # interface is a logical abstraction of a cluster network interface in a subnet, and + # may be attached to a target resource. + # + # The cluster network interfaces will be sorted by their `created_at` property + # values, with newest cluster network interfaces first. Cluster network interfaces + # with identical + # `created_at` property values will in turn be sorted by ascending `name` property + # values. + # @param cluster_network_id [String] The cluster network identifier. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. - # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching - # the specified identifier. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. # @param sort [String] 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. - # @param target_id [String] Filters the collection to resources with a `target.id` property matching the - # specified identifier. - # @param target_crn [String] Filters the collection to resources with a `target.crn` property matching the - # specified CRN. - # @param target_name [String] Filters the collection to resources with a `target.name` property matching the - # exact specified name. - # @param target_resource_type [String] Filters the collection to resources with a `target.resource_type` property - # matching the specified value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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) + def list_cluster_network_interfaces(cluster_network_id:, start: nil, limit: nil, name: nil, sort: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_floating_ips") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_network_interfaces") headers.merge!(sdk_headers) params = { @@ -12101,15 +12636,11 @@ def list_floating_ips(start: nil, limit: nil, resource_group_id: nil, sort: nil, "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 + "name" => name, + "sort" => sort } - method_url = "/floating_ips" + method_url = "/cluster_networks/%s/interfaces" % [ERB::Util.url_encode(cluster_network_id)] response = request( method: "GET", @@ -12122,21 +12653,47 @@ def list_floating_ips(start: nil, limit: nil, resource_group_id: nil, sort: nil, end ## - # @!method create_floating_ip(floating_ip_prototype:) - # Reserve a floating IP. - # This request reserves a new floating IP. - # @param floating_ip_prototype [FloatingIPPrototype] The floating IP prototype object. + # @!method create_cluster_network_interface(cluster_network_id:, name: nil, primary_ip: nil, subnet: nil) + # Create a cluster network interface. + # This request creates a new cluster network interface from a cluster network + # interface prototype object. The prototype object is structured in the same way as + # a retrieved cluster network interface, and contains the information necessary to + # create the new cluster network interface. + # @param cluster_network_id [String] The cluster network identifier. + # @param name [String] The name for this cluster network interface. The name must not be used by another + # interface in the cluster network. Names beginning with `ibm-` are reserved for + # provider-owned resources, and are not allowed. If unspecified, the name will be a + # hyphenated list of randomly-selected words. + # @param primary_ip [ClusterNetworkInterfacePrimaryIPPrototype] The primary IP address to bind to the cluster network interface. May be either + # a cluster network subnet reserved IP identity, or a cluster network subnet + # reserved IP + # prototype object which will be used to create a new cluster network subnet + # reserved IP. + # + # If a cluster network subnet reserved IP identity is provided, the specified + # cluster + # network subnet reserved IP must be unbound. + # + # If a cluster network subnet reserved IP prototype object with an address is + # provided, + # the address must be available on the cluster network interface's cluster network + # subnet. If no address is specified, an available address on the cluster network + # subnet + # will be automatically selected and reserved. + # @param subnet [ClusterNetworkSubnetIdentity] The associated cluster network subnet. Required if `primary_ip` does not specify a + # cluster + # network subnet reserved IP identity. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_floating_ip(floating_ip_prototype:) + def create_cluster_network_interface(cluster_network_id:, name: nil, primary_ip: nil, subnet: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - 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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network_interface") headers.merge!(sdk_headers) params = { @@ -12144,40 +12701,50 @@ def create_floating_ip(floating_ip_prototype:) "generation" => @generation } - data = floating_ip_prototype - headers["Content-Type"] = "application/json" + data = { + "name" => name, + "primary_ip" => primary_ip, + "subnet" => subnet + } - method_url = "/floating_ips" + method_url = "/cluster_networks/%s/interfaces" % [ERB::Util.url_encode(cluster_network_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, - data: data, + json: data, accept_json: true ) response end ## - # @!method delete_floating_ip(id:) - # 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. - # @param id [String] The floating IP identifier. - # @return [nil] - def delete_floating_ip(id:) + # @!method delete_cluster_network_interface(cluster_network_id:, id:, if_match: nil) + # Delete a cluster network interface. + # This request deletes a cluster network interface. This operation cannot be + # reversed. For this request to succeed, the cluster network interface must not be + # required by another resource, such as a cluster network attachment for a virtual + # server instance. + # @param cluster_network_id [String] The cluster network identifier. + # @param id [String] The cluster network interface identifier. + # @param if_match [String] If present, the request will fail if the specified ETag value does not match the + # resource's current ETag value. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def delete_cluster_network_interface(cluster_network_id:, id:, if_match: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - 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_floating_ip") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_cluster_network_interface") headers.merge!(sdk_headers) params = { @@ -12185,35 +12752,38 @@ def delete_floating_ip(id:) "generation" => @generation } - method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)] + method_url = "/cluster_networks/%s/interfaces/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)] - request( + response = request( method: "DELETE", url: method_url, headers: headers, params: params, - accept_json: false + accept_json: true ) - nil + response end ## - # @!method get_floating_ip(id:) - # Retrieve a floating IP. - # This request retrieves a single floating IP specified by the identifier in the - # URL. - # @param id [String] The floating IP identifier. + # @!method get_cluster_network_interface(cluster_network_id:, id:) + # Retrieve a cluster network interface. + # This request retrieves a single cluster network interface specified by the + # identifier in the URL. + # @param cluster_network_id [String] The cluster network identifier. + # @param id [String] The cluster network interface identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_floating_ip(id:) + def get_cluster_network_interface(cluster_network_id:, id:) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("id must be provided") if id.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_floating_ip") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network_interface") headers.merge!(sdk_headers) params = { @@ -12221,7 +12791,7 @@ def get_floating_ip(id:) "generation" => @generation } - method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)] + method_url = "/cluster_networks/%s/interfaces/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -12234,24 +12804,33 @@ def get_floating_ip(id:) end ## - # @!method update_floating_ip(id:, floating_ip_patch:) - # Update a floating IP. - # This request updates a floating IP's name and/or target. - # @param id [String] The floating IP identifier. - # @param floating_ip_patch [Hash] The floating IP patch. + # @!method update_cluster_network_interface(cluster_network_id:, id:, cluster_network_interface_patch:, if_match: nil) + # Update a cluster network interface. + # This request updates a cluster network interface with the information provided in + # a cluster network interface patch object. The patch object is structured in the + # same way as a retrieved cluster network interface and needs to contain only the + # information to be updated. + # @param cluster_network_id [String] The cluster network identifier. + # @param id [String] The cluster network interface identifier. + # @param cluster_network_interface_patch [Hash] The cluster network interface patch. + # @param if_match [String] 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. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_floating_ip(id:, floating_ip_patch:) + def update_cluster_network_interface(cluster_network_id:, id:, cluster_network_interface_patch:, if_match: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("id must be provided") if id.nil? - - raise ArgumentError.new("floating_ip_patch must be provided") if floating_ip_patch.nil? + raise ArgumentError.new("cluster_network_interface_patch must be provided") if cluster_network_interface_patch.nil? headers = { + "If-Match" => if_match } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_floating_ip") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_cluster_network_interface") headers.merge!(sdk_headers) params = { @@ -12259,10 +12838,10 @@ def update_floating_ip(id:, floating_ip_patch:) "generation" => @generation } - data = floating_ip_patch + data = cluster_network_interface_patch headers["Content-Type"] = "application/merge-patch+json" - method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)] + method_url = "/cluster_networks/%s/interfaces/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -12274,30 +12853,34 @@ def update_floating_ip(id:, floating_ip_patch:) ) response end - ######################### - # Network ACLs - ######################### ## - # @!method list_network_acls(start: nil, limit: nil, resource_group_id: nil) - # List network ACLs. - # This request lists 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. + # @!method list_cluster_network_subnets(cluster_network_id:, start: nil, limit: nil, name: nil, sort: nil) + # List cluster network subnets. + # This request lists cluster network subnets in the cluster network. A cluster + # network subnet provides network routing between other cluster network subnets + # within a cluster network. + # @param cluster_network_id [String] The cluster network identifier. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. - # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching - # the specified identifier. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. + # @param sort [String] 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. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_network_acls(start: nil, limit: nil, resource_group_id: nil) + def list_cluster_network_subnets(cluster_network_id:, start: nil, limit: nil, name: nil, sort: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_network_acls") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_network_subnets") headers.merge!(sdk_headers) params = { @@ -12305,10 +12888,11 @@ def list_network_acls(start: nil, limit: nil, resource_group_id: nil) "generation" => @generation, "start" => start, "limit" => limit, - "resource_group.id" => resource_group_id + "name" => name, + "sort" => sort } - method_url = "/network_acls" + method_url = "/cluster_networks/%s/subnets" % [ERB::Util.url_encode(cluster_network_id)] response = request( method: "GET", @@ -12321,23 +12905,27 @@ def list_network_acls(start: nil, limit: nil, resource_group_id: nil) end ## - # @!method create_network_acl(network_acl_prototype:) - # 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. - # @param network_acl_prototype [NetworkACLPrototype] The network ACL prototype object. + # @!method create_cluster_network_subnet(cluster_network_id:, cluster_network_subnet_prototype:) + # Create a cluster network subnet. + # This request creates a new cluster network subnet from a cluster network subnet + # prototype object. The prototype object is structured in the same way as a + # retrieved cluster network subnet, and contains the information necessary to create + # the new cluster network subnet. + # @param cluster_network_id [String] The cluster network identifier. + # @param cluster_network_subnet_prototype [ClusterNetworkSubnetPrototype] The cluster network subnet prototype object. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_network_acl(network_acl_prototype:) + def create_cluster_network_subnet(cluster_network_id:, cluster_network_subnet_prototype:) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("network_acl_prototype must be provided") if network_acl_prototype.nil? + raise ArgumentError.new("cluster_network_subnet_prototype must be provided") if cluster_network_subnet_prototype.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_network_acl") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network_subnet") headers.merge!(sdk_headers) params = { @@ -12345,10 +12933,10 @@ def create_network_acl(network_acl_prototype:) "generation" => @generation } - data = network_acl_prototype + data = cluster_network_subnet_prototype headers["Content-Type"] = "application/json" - method_url = "/network_acls" + method_url = "/cluster_networks/%s/subnets" % [ERB::Util.url_encode(cluster_network_id)] response = request( method: "POST", @@ -12362,59 +12950,85 @@ def create_network_acl(network_acl_prototype:) end ## - # @!method delete_network_acl(id:) - # 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. - # @param id [String] The network ACL identifier. - # @return [nil] - def delete_network_acl(id:) + # @!method list_cluster_network_subnet_reserved_ips(cluster_network_id:, cluster_network_subnet_id:, start: nil, limit: nil, name: nil, sort: nil) + # List cluster network subnet reserved IPs. + # This request lists cluster network subnet reserved IPs in the cluster network. + # @param cluster_network_id [String] The cluster network identifier. + # @param cluster_network_subnet_id [String] The cluster network subnet identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. + # @param sort [String] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def list_cluster_network_subnet_reserved_ips(cluster_network_id:, cluster_network_subnet_id:, start: nil, limit: nil, name: nil, sort: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + + raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("id must be provided") if id.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_network_acl") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_cluster_network_subnet_reserved_ips") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation - } + "generation" => @generation, + "start" => start, + "limit" => limit, + "name" => name, + "sort" => sort + } - method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)] + method_url = "/cluster_networks/%s/subnets/%s/reserved_ips" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id)] - request( - method: "DELETE", + response = request( + method: "GET", url: method_url, headers: headers, params: params, - accept_json: false + accept_json: true ) - nil + response end ## - # @!method get_network_acl(id:) - # Retrieve a network ACL. - # This request retrieves a single network ACL specified by the identifier in the - # URL. - # @param id [String] The network ACL identifier. + # @!method create_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, address: nil, name: nil) + # Create a cluster network subnet reserved IP. + # This request creates a new cluster network subnet reserved IP from a cluster + # network subnet reserved IP prototype object. The prototype object is structured in + # the same way as a retrieved cluster network subnet reserved IP, and contains the + # information necessary to create the new cluster network subnet reserved IP. + # @param cluster_network_id [String] The cluster network identifier. + # @param cluster_network_subnet_id [String] The cluster network subnet identifier. + # @param address [String] 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. + # @param name [String] The name for this cluster network subnet reserved IP. The name must not be used by + # another reserved IP in the cluster network subnet. Names starting with `ibm-` are + # reserved for provider-owned resources, and are not allowed. If unspecified, the + # name will be a hyphenated list of randomly-selected words. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_network_acl(id:) + def create_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, address: nil, name: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + + raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("id must be provided") if id.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_network_acl") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_cluster_network_subnet_reserved_ip") headers.merge!(sdk_headers) params = { @@ -12422,37 +13036,53 @@ def get_network_acl(id:) "generation" => @generation } - method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)] + data = { + "address" => address, + "name" => name + } + + method_url = "/cluster_networks/%s/subnets/%s/reserved_ips" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id)] response = request( - method: "GET", + method: "POST", url: method_url, headers: headers, params: params, + json: data, accept_json: true ) response end ## - # @!method update_network_acl(id:, network_acl_patch:) - # Update a network ACL. - # This request updates a network ACL's name. - # @param id [String] The network ACL identifier. - # @param network_acl_patch [Hash] The network ACL patch. + # @!method delete_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:, if_match: nil) + # Delete a cluster network subnet reserved IP. + # This request deletes a cluster network subnet reserved IP. This operation cannot + # be reversed. + # + # For this request to succeed, the reserved IP must be unbound. A provider-owned + # reserved IP is not allowed to be deleted. + # @param cluster_network_id [String] The cluster network identifier. + # @param cluster_network_subnet_id [String] The cluster network subnet identifier. + # @param id [String] The cluster network subnet reserved IP identifier. + # @param if_match [String] If present, the request will fail if the specified ETag value does not match the + # resource's current ETag value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_network_acl(id:, network_acl_patch:) - raise ArgumentError.new("version must be provided") if version.nil? + def delete_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:, if_match: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? - raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil? raise ArgumentError.new("id must be provided") if id.nil? - raise ArgumentError.new("network_acl_patch must be provided") if network_acl_patch.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", "update_network_acl") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_cluster_network_subnet_reserved_ip") headers.merge!(sdk_headers) params = { @@ -12460,55 +13090,49 @@ def update_network_acl(id:, network_acl_patch:) "generation" => @generation } - data = network_acl_patch - headers["Content-Type"] = "application/merge-patch+json" - - method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)] + method_url = "/cluster_networks/%s/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id), ERB::Util.url_encode(id)] response = request( - method: "PATCH", + method: "DELETE", url: method_url, headers: headers, params: params, - data: data, accept_json: true ) response end ## - # @!method list_network_acl_rules(network_acl_id:, start: nil, limit: nil, direction: nil) - # List rules for a network ACL. - # This request lists rules for a network ACL. These rules can allow or deny traffic - # between a source CIDR block and a destination CIDR block over a particular - # protocol and port range. - # @param network_acl_id [String] The network ACL identifier. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. - # @param direction [String] Filters the collection to rules with a `direction` property matching the specified - # value. + # @!method get_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:) + # Retrieve a cluster network subnet reserved IP. + # This request retrieves a single cluster network subnet reserved IP specified by + # the identifier in the URL. + # @param cluster_network_id [String] The cluster network identifier. + # @param cluster_network_subnet_id [String] The cluster network subnet identifier. + # @param id [String] The cluster network subnet reserved IP identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_network_acl_rules(network_acl_id:, start: nil, limit: nil, direction: nil) + def get_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + + raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - 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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network_subnet_reserved_ip") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation, - "start" => start, - "limit" => limit, - "direction" => direction + "generation" => @generation } - method_url = "/network_acls/%s/rules" % [ERB::Util.url_encode(network_acl_id)] + method_url = "/cluster_networks/%s/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -12521,26 +13145,36 @@ def list_network_acl_rules(network_acl_id:, start: nil, limit: nil, direction: n end ## - # @!method create_network_acl_rule(network_acl_id:, network_acl_rule_prototype:) - # 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. - # @param network_acl_id [String] The network ACL identifier. - # @param network_acl_rule_prototype [NetworkACLRulePrototype] The network ACL rule prototype object. + # @!method update_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:, cluster_network_subnet_reserved_ip_patch:, if_match: nil) + # Update a cluster network subnet reserved IP. + # This request updates a cluster network subnet reserved IP with the information + # provided in a cluster network subnet reserved IP patch object. The patch object is + # structured in the same way as a retrieved cluster network subnet reserved IP and + # needs to contain only the information to be updated. + # @param cluster_network_id [String] The cluster network identifier. + # @param cluster_network_subnet_id [String] The cluster network subnet identifier. + # @param id [String] The cluster network subnet reserved IP identifier. + # @param cluster_network_subnet_reserved_ip_patch [Hash] The cluster network subnet reserved IP patch. + # @param if_match [String] 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. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_network_acl_rule(network_acl_id:, network_acl_rule_prototype:) + def update_cluster_network_subnet_reserved_ip(cluster_network_id:, cluster_network_subnet_id:, id:, cluster_network_subnet_reserved_ip_patch:, if_match: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? + + raise ArgumentError.new("cluster_network_subnet_id must be provided") if cluster_network_subnet_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("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? + raise ArgumentError.new("cluster_network_subnet_reserved_ip_patch must be provided") if cluster_network_subnet_reserved_ip_patch.nil? headers = { + "If-Match" => if_match } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_network_acl_rule") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_cluster_network_subnet_reserved_ip") headers.merge!(sdk_headers) params = { @@ -12548,13 +13182,13 @@ def create_network_acl_rule(network_acl_id:, network_acl_rule_prototype:) "generation" => @generation } - data = network_acl_rule_prototype - headers["Content-Type"] = "application/json" + data = cluster_network_subnet_reserved_ip_patch + headers["Content-Type"] = "application/merge-patch+json" - method_url = "/network_acls/%s/rules" % [ERB::Util.url_encode(network_acl_id)] + method_url = "/cluster_networks/%s/subnets/%s/reserved_ips/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(cluster_network_subnet_id), ERB::Util.url_encode(id)] response = request( - method: "POST", + method: "PATCH", url: method_url, headers: headers, params: params, @@ -12565,24 +13199,30 @@ def create_network_acl_rule(network_acl_id:, network_acl_rule_prototype:) end ## - # @!method delete_network_acl_rule(network_acl_id:, id:) - # Delete a network ACL rule. - # This request deletes a rule. This operation cannot be reversed. - # @param network_acl_id [String] The network ACL identifier. - # @param id [String] The rule identifier. - # @return [nil] - def delete_network_acl_rule(network_acl_id:, id:) - raise ArgumentError.new("version must be provided") if version.nil? + # @!method delete_cluster_network_subnet(cluster_network_id:, id:, if_match: nil) + # Delete a cluster network subnet. + # This request deletes a cluster network subnet. This operation cannot be reversed. + # + # For this request to succeed, this cluster subnet must not be attached to a cluster + # network interface. + # @param cluster_network_id [String] The cluster network identifier. + # @param id [String] The cluster network subnet identifier. + # @param if_match [String] If present, the request will fail if the specified ETag value does not match the + # resource's current ETag value. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def delete_cluster_network_subnet(cluster_network_id:, id:, if_match: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? - raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("id must be provided") if id.nil? - raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? - raise ArgumentError.new("id must be provided") if id.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_network_acl_rule") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_cluster_network_subnet") headers.merge!(sdk_headers) params = { @@ -12590,37 +13230,38 @@ def delete_network_acl_rule(network_acl_id:, id:) "generation" => @generation } - method_url = "/network_acls/%s/rules/%s" % [ERB::Util.url_encode(network_acl_id), ERB::Util.url_encode(id)] + method_url = "/cluster_networks/%s/subnets/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)] - request( + response = request( method: "DELETE", url: method_url, headers: headers, params: params, - accept_json: false + accept_json: true ) - nil + response end ## - # @!method get_network_acl_rule(network_acl_id:, id:) - # Retrieve a network ACL rule. - # This request retrieves a single rule specified by the identifier in the URL. - # @param network_acl_id [String] The network ACL identifier. - # @param id [String] The rule identifier. + # @!method get_cluster_network_subnet(cluster_network_id:, id:) + # Retrieve a cluster network subnet. + # This request retrieves a single cluster network subnet specified by the identifier + # in the URL. + # @param cluster_network_id [String] The cluster network identifier. + # @param id [String] The cluster network subnet identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_network_acl_rule(network_acl_id:, id:) - raise ArgumentError.new("version must be provided") if version.nil? + def get_cluster_network_subnet(cluster_network_id:, id:) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? - raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("id must be provided") if id.nil? - raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("generation must be provided") if generation.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_network_acl_rule") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network_subnet") headers.merge!(sdk_headers) params = { @@ -12628,7 +13269,7 @@ def get_network_acl_rule(network_acl_id:, id:) "generation" => @generation } - method_url = "/network_acls/%s/rules/%s" % [ERB::Util.url_encode(network_acl_id), ERB::Util.url_encode(id)] + method_url = "/cluster_networks/%s/subnets/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -12641,29 +13282,33 @@ def get_network_acl_rule(network_acl_id:, id:) end ## - # @!method update_network_acl_rule(network_acl_id:, id:, network_acl_rule_patch:) - # 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. - # @param network_acl_id [String] The network ACL identifier. - # @param id [String] The rule identifier. - # @param network_acl_rule_patch [Hash] The network ACL rule patch. + # @!method update_cluster_network_subnet(cluster_network_id:, id:, cluster_network_subnet_patch:, if_match: nil) + # Update a cluster network subnet. + # This request updates a cluster network subnet with the information provided in a + # cluster network subnet patch object. The patch object is structured in the same + # way as a retrieved cluster network subnet and needs to contain only the + # information to be updated. + # @param cluster_network_id [String] The cluster network identifier. + # @param id [String] The cluster network subnet identifier. + # @param cluster_network_subnet_patch [Hash] The cluster network subnet patch. + # @param if_match [String] 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. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_network_acl_rule(network_acl_id:, id:, network_acl_rule_patch:) - raise ArgumentError.new("version must be provided") if version.nil? + def update_cluster_network_subnet(cluster_network_id:, id:, cluster_network_subnet_patch:, if_match: nil) + raise ArgumentError.new("cluster_network_id must be provided") if cluster_network_id.nil? - raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("id must be provided") if id.nil? - raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil? + raise ArgumentError.new("version must be provided") if version.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("network_acl_rule_patch must be provided") if network_acl_rule_patch.nil? + raise ArgumentError.new("cluster_network_subnet_patch must be provided") if cluster_network_subnet_patch.nil? headers = { + "If-Match" => if_match } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_network_acl_rule") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_cluster_network_subnet") headers.merge!(sdk_headers) params = { @@ -12671,10 +13316,10 @@ def update_network_acl_rule(network_acl_id:, id:, network_acl_rule_patch:) "generation" => @generation } - data = network_acl_rule_patch + data = cluster_network_subnet_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)] + method_url = "/cluster_networks/%s/subnets/%s" % [ERB::Util.url_encode(cluster_network_id), ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -12686,54 +13331,40 @@ def update_network_acl_rule(network_acl_id:, id:, network_acl_rule_patch:) ) response end - ######################### - # Security groups - ######################### ## - # @!method list_security_groups(start: nil, limit: nil, resource_group_id: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) - # List security groups. - # This request lists 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. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. - # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching - # the specified identifier. - # @param vpc_id [String] Filters the collection to resources with a `vpc.id` property matching the - # specified identifier. - # @param vpc_crn [String] Filters the collection to resources with a `vpc.crn` property matching the - # specified CRN. - # @param vpc_name [String] Filters the collection to resources with a `vpc.name` property matching the exact - # specified name. + # @!method delete_cluster_network(id:, if_match: nil) + # Delete a cluster network. + # This request deletes a cluster network. This operation cannot be reversed. + # + # For this request to succeed, virtual server instances must not reside in this + # cluster network. + # @param id [String] The cluster network identifier. + # @param if_match [String] If present, the request will fail if the specified ETag value does not match the + # resource's current ETag value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_security_groups(start: nil, limit: nil, resource_group_id: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) + def delete_cluster_network(id:, if_match: nil) + raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? headers = { + "If-Match" => if_match } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_security_groups") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_cluster_network") 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 + "generation" => @generation } - method_url = "/security_groups" + method_url = "/cluster_networks/%s" % [ERB::Util.url_encode(id)] response = request( - method: "GET", + method: "DELETE", url: method_url, headers: headers, params: params, @@ -12743,33 +13374,22 @@ def list_security_groups(start: nil, limit: nil, resource_group_id: nil, vpc_id: end ## - # @!method create_security_group(vpc:, name: nil, resource_group: nil, rules: nil) - # 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. - # @param vpc [VPCIdentity] The VPC this security group will reside in. - # @param name [String] 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. - # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource - # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. - # @param rules [Array[SecurityGroupRulePrototype]] 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. + # @!method get_cluster_network(id:) + # Retrieve a cluster network. + # This request retrieves a single cluster network specified by the identifier in the + # URL. + # @param id [String] The cluster network identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_security_group(vpc:, name: nil, resource_group: nil, rules: nil) + def get_cluster_network(id:) + raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("vpc must be provided") if vpc.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_cluster_network") headers.merge!(sdk_headers) params = { @@ -12777,120 +13397,42 @@ def create_security_group(vpc:, name: nil, resource_group: nil, rules: nil) "generation" => @generation } - data = { - "vpc" => vpc, - "name" => name, - "resource_group" => resource_group, - "rules" => rules - } - - method_url = "/security_groups" + method_url = "/cluster_networks/%s" % [ERB::Util.url_encode(id)] response = request( - method: "POST", + method: "GET", url: method_url, headers: headers, params: params, - json: data, accept_json: true ) response end ## - # @!method delete_security_group(id:) - # 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. - # @param id [String] The security group identifier. - # @return [nil] - 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 - - ## - # @!method get_security_group(id:) - # Retrieve a security group. - # This request retrieves a single security group specified by the identifier in the - # URL path. - # @param id [String] The security group identifier. + # @!method update_cluster_network(id:, cluster_network_patch:, if_match: nil) + # Update a cluster. + # This request updates a cluster network with the information provided in a cluster + # network patch object. The patch object is structured in the same way as a + # retrieved cluster network and needs to contain only the information to be updated. + # @param id [String] The cluster network identifier. + # @param cluster_network_patch [Hash] The cluster network patch. + # @param if_match [String] 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. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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? - + def update_cluster_network(id:, cluster_network_patch:, if_match: 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 - - ## - # @!method update_security_group(id:, security_group_patch:) - # 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. - # @param id [String] The security group identifier. - # @param security_group_patch [Hash] The security group patch. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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? + raise ArgumentError.new("cluster_network_patch must be provided") if cluster_network_patch.nil? headers = { + "If-Match" => if_match } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_security_group") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_cluster_network") headers.merge!(sdk_headers) params = { @@ -12898,10 +13440,10 @@ def update_security_group(id:, security_group_patch:) "generation" => @generation } - data = security_group_patch + data = cluster_network_patch headers["Content-Type"] = "application/merge-patch+json" - method_url = "/security_groups/%s" % [ERB::Util.url_encode(id)] + method_url = "/cluster_networks/%s" % [ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -12913,33 +13455,41 @@ def update_security_group(id:, security_group_patch:) ) response end + ######################### + # Public gateways + ######################### ## - # @!method list_security_group_rules(security_group_id:) - # List rules in a security group. - # This request lists rules in a security group. These rules define what traffic the - # security group permits. Security group rules are stateful, such that reverse - # traffic in response to allowed traffic is automatically permitted. - # @param security_group_id [String] The security group identifier. + # @!method list_public_gateways(start: nil, limit: nil, resource_group_id: nil) + # List public gateways. + # This request lists public gateways in the region. A public gateway is a virtual + # network device associated with a VPC, which allows access to the Internet. A + # public gateway resides in a zone and can be connected to subnets in the same zone + # only. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_security_group_rules(security_group_id:) + 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? - 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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_public_gateways") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "generation" => @generation, + "start" => start, + "limit" => limit, + "resource_group.id" => resource_group_id } - method_url = "/security_groups/%s/rules" % [ERB::Util.url_encode(security_group_id)] + method_url = "/public_gateways" response = request( method: "GET", @@ -12952,32 +13502,37 @@ def list_security_group_rules(security_group_id:) end ## - # @!method create_security_group_rule(security_group_id:, security_group_rule_prototype:) - # 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. - # @param security_group_id [String] The security group identifier. - # @param security_group_rule_prototype [SecurityGroupRulePrototype] The properties of the security group rule to be created. + # @!method create_public_gateway(vpc:, zone:, floating_ip: nil, name: nil, resource_group: nil) + # 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. + # @param vpc [VPCIdentity] The VPC this public gateway will reside in. + # @param zone [ZoneIdentity] The zone this public gateway will reside in. + # @param floating_ip [PublicGatewayFloatingIPPrototype] + # @param name [String] 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. + # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource + # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_security_group_rule(security_group_id:, security_group_rule_prototype:) + 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("security_group_id must be provided") if security_group_id.nil? + raise ArgumentError.new("vpc must be provided") if vpc.nil? - raise ArgumentError.new("security_group_rule_prototype must be provided") if security_group_rule_prototype.nil? + raise ArgumentError.new("zone must be provided") if zone.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group_rule") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_public_gateway") headers.merge!(sdk_headers) params = { @@ -12985,43 +13540,46 @@ def create_security_group_rule(security_group_id:, security_group_rule_prototype "generation" => @generation } - data = security_group_rule_prototype - headers["Content-Type"] = "application/json" + data = { + "vpc" => vpc, + "zone" => zone, + "floating_ip" => floating_ip, + "name" => name, + "resource_group" => resource_group + } - method_url = "/security_groups/%s/rules" % [ERB::Util.url_encode(security_group_id)] + method_url = "/public_gateways" response = request( method: "POST", url: method_url, headers: headers, params: params, - data: data, + json: data, accept_json: true ) response end ## - # @!method delete_security_group_rule(security_group_id:, id:) - # 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. - # @param security_group_id [String] The security group identifier. - # @param id [String] The rule identifier. + # @!method delete_public_gateway(id:) + # 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. + # @param id [String] The public gateway identifier. # @return [nil] - def delete_security_group_rule(security_group_id:, id:) + 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("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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_public_gateway") headers.merge!(sdk_headers) params = { @@ -13029,7 +13587,7 @@ def delete_security_group_rule(security_group_id:, id:) "generation" => @generation } - method_url = "/security_groups/%s/rules/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] + method_url = "/public_gateways/%s" % [ERB::Util.url_encode(id)] request( method: "DELETE", @@ -13042,25 +13600,22 @@ def delete_security_group_rule(security_group_id:, id:) end ## - # @!method get_security_group_rule(security_group_id:, id:) - # Retrieve a security group rule. - # This request retrieves a single security group rule specified by the identifier in - # the URL path. - # @param security_group_id [String] The security group identifier. - # @param id [String] The rule identifier. + # @!method get_public_gateway(id:) + # Retrieve a public gateway. + # This request retrieves a single public gateway specified by the identifier in the + # URL. + # @param id [String] The public gateway identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_security_group_rule(security_group_id:, id:) + 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("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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_public_gateway") headers.merge!(sdk_headers) params = { @@ -13068,7 +13623,7 @@ def get_security_group_rule(security_group_id:, id:) "generation" => @generation } - method_url = "/security_groups/%s/rules/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] + method_url = "/public_gateways/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -13081,29 +13636,24 @@ def get_security_group_rule(security_group_id:, id:) end ## - # @!method update_security_group_rule(security_group_id:, id:, security_group_rule_patch:) - # 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. - # @param security_group_id [String] The security group identifier. - # @param id [String] The rule identifier. - # @param security_group_rule_patch [Hash] The security group rule patch. + # @!method update_public_gateway(id:, public_gateway_patch:) + # Update a public gateway. + # This request updates a public gateway's name. + # @param id [String] The public gateway identifier. + # @param public_gateway_patch [Hash] The public gateway patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_security_group_rule(security_group_id:, id:, security_group_rule_patch:) + 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("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? + 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_security_group_rule") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_public_gateway") headers.merge!(sdk_headers) params = { @@ -13111,10 +13661,10 @@ def update_security_group_rule(security_group_id:, id:, security_group_rule_patc "generation" => @generation } - data = security_group_rule_patch + data = public_gateway_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)] + method_url = "/public_gateways/%s" % [ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -13126,36 +13676,57 @@ def update_security_group_rule(security_group_id:, id:, security_group_rule_patc ) response end + ######################### + # Floating IPs + ######################### ## - # @!method list_security_group_targets(security_group_id:, start: nil, limit: nil) - # List targets associated with a security group. - # This request lists targets associated with a security group, to which the rules in - # the security group are applied. - # @param security_group_id [String] The security group identifier. + # @!method 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) + # List floating IPs. + # This request lists floating IPs in the region. Floating IPs allow inbound and + # outbound traffic from the Internet to an instance. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. + # @param sort [String] 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. + # @param target_id [String] Filters the collection to resources with a `target.id` property matching the + # specified identifier. + # @param target_crn [String] Filters the collection to resources with a `target.crn` property matching the + # specified CRN. + # @param target_name [String] Filters the collection to resources with a `target.name` property matching the + # exact specified name. + # @param target_resource_type [String] Filters the collection to resources with a `target.resource_type` property + # matching the specified value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_security_group_targets(security_group_id:, start: nil, limit: nil) + 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? - 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") + 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 + "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 = "/security_groups/%s/targets" % [ERB::Util.url_encode(security_group_id)] + method_url = "/floating_ips" response = request( method: "GET", @@ -13168,36 +13739,62 @@ def list_security_group_targets(security_group_id:, start: nil, limit: nil) end ## - # @!method delete_security_group_target_binding(security_group_id:, id:) - # 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. - # @param security_group_id [String] The security group identifier. - # @param id [String] The security group target identifier. - # @return [nil] - def delete_security_group_target_binding(security_group_id:, id:) + # @!method create_floating_ip(floating_ip_prototype:) + # Reserve a floating IP. + # This request reserves a new floating IP. + # @param floating_ip_prototype [FloatingIPPrototype] The floating IP prototype object. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("security_group_id must be provided") if security_group_id.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 + + ## + # @!method delete_floating_ip(id:) + # 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. + # @param id [String] The floating IP identifier. + # @return [nil] + 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_security_group_target_binding") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_floating_ip") headers.merge!(sdk_headers) params = { @@ -13205,7 +13802,7 @@ def delete_security_group_target_binding(security_group_id:, id:) "generation" => @generation } - method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] + method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)] request( method: "DELETE", @@ -13218,25 +13815,22 @@ def delete_security_group_target_binding(security_group_id:, id:) end ## - # @!method get_security_group_target(security_group_id:, id:) - # 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. - # @param security_group_id [String] The security group identifier. - # @param id [String] The security group target identifier. + # @!method get_floating_ip(id:) + # Retrieve a floating IP. + # This request retrieves a single floating IP specified by the identifier in the + # URL. + # @param id [String] The floating IP identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_security_group_target(security_group_id:, id:) + 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("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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_floating_ip") headers.merge!(sdk_headers) params = { @@ -13244,7 +13838,7 @@ def get_security_group_target(security_group_id:, id:) "generation" => @generation } - method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] + method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -13257,35 +13851,24 @@ def get_security_group_target(security_group_id:, id:) end ## - # @!method create_security_group_target_binding(security_group_id:, id:) - # 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. - # @param security_group_id [String] The security group identifier. - # @param id [String] The security group target identifier. + # @!method update_floating_ip(id:, floating_ip_patch:) + # Update a floating IP. + # This request updates a floating IP's name and/or target. + # @param id [String] The floating IP identifier. + # @param floating_ip_patch [Hash] The floating IP patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_security_group_target_binding(security_group_id:, id:) + 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("security_group_id must be provided") if security_group_id.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", "create_security_group_target_binding") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_floating_ip") headers.merge!(sdk_headers) params = { @@ -13293,46 +13876,57 @@ def create_security_group_target_binding(security_group_id:, id:) "generation" => @generation } - method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] + data = floating_ip_patch + headers["Content-Type"] = "application/merge-patch+json" + + method_url = "/floating_ips/%s" % [ERB::Util.url_encode(id)] response = request( - method: "PUT", + method: "PATCH", url: method_url, headers: headers, params: params, + data: data, accept_json: true ) response end ######################### - # VPN gateways + # Network ACLs ######################### ## - # @!method list_ike_policies(start: nil, limit: nil) - # List IKE policies. - # This request lists IKE policies in the region. + # @!method list_network_acls(start: nil, limit: nil, resource_group_id: nil) + # List network ACLs. + # This request lists network ACLs in the region. A network ACL defines a set of + # packet filtering rules for traffic in and out of the subnets the network ACL is + # attached to. No traffic is allowed by default. Both allow and deny rules can be + # defined, and rules are stateless so that reverse traffic in response to allowed + # traffic is not automatically allowed. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_ike_policies(start: nil, limit: nil) + 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_ike_policies") + 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 + "limit" => limit, + "resource_group.id" => resource_group_id } - method_url = "/ike_policies" + method_url = "/network_acls" response = request( method: "GET", @@ -13345,36 +13939,23 @@ def list_ike_policies(start: nil, limit: nil) end ## - # @!method create_ike_policy(authentication_algorithm:, dh_group:, encryption_algorithm:, ike_version:, key_lifetime: nil, name: nil, resource_group: nil) - # Create an IKE policy. - # This request creates a new IKE policy. - # @param authentication_algorithm [String] The authentication algorithm. - # @param dh_group [Fixnum] The Diffie-Hellman group. - # @param encryption_algorithm [String] The encryption algorithm. - # @param ike_version [Fixnum] The IKE protocol version. - # @param key_lifetime [Fixnum] The key lifetime in seconds. - # @param name [String] 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. - # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource - # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @!method create_network_acl(network_acl_prototype:) + # 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. + # @param network_acl_prototype [NetworkACLPrototype] The network ACL prototype object. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_ike_policy(authentication_algorithm:, dh_group:, encryption_algorithm:, ike_version:, key_lifetime: nil, name: nil, resource_group: nil) + 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("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? + 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_ike_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_network_acl") headers.merge!(sdk_headers) params = { @@ -13382,38 +13963,31 @@ def create_ike_policy(authentication_algorithm:, dh_group:, encryption_algorithm "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 - } + data = network_acl_prototype + headers["Content-Type"] = "application/json" - method_url = "/ike_policies" + method_url = "/network_acls" response = request( method: "POST", url: method_url, headers: headers, params: params, - json: data, + data: data, accept_json: true ) response end ## - # @!method delete_ike_policy(id:) - # 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. - # @param id [String] The IKE policy identifier. + # @!method delete_network_acl(id:) + # 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. + # @param id [String] The network ACL identifier. # @return [nil] - def delete_ike_policy(id:) + 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? @@ -13422,7 +13996,7 @@ def delete_ike_policy(id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_ike_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_network_acl") headers.merge!(sdk_headers) params = { @@ -13430,7 +14004,7 @@ def delete_ike_policy(id:) "generation" => @generation } - method_url = "/ike_policies/%s" % [ERB::Util.url_encode(id)] + method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)] request( method: "DELETE", @@ -13443,12 +14017,13 @@ def delete_ike_policy(id:) end ## - # @!method get_ike_policy(id:) - # Retrieve an IKE policy. - # This request retrieves a single IKE policy specified by the identifier in the URL. - # @param id [String] The IKE policy identifier. + # @!method get_network_acl(id:) + # Retrieve a network ACL. + # This request retrieves a single network ACL specified by the identifier in the + # URL. + # @param id [String] The network ACL identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_ike_policy(id:) + 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? @@ -13457,7 +14032,7 @@ def get_ike_policy(id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_ike_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_network_acl") headers.merge!(sdk_headers) params = { @@ -13465,7 +14040,7 @@ def get_ike_policy(id:) "generation" => @generation } - method_url = "/ike_policies/%s" % [ERB::Util.url_encode(id)] + method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -13478,24 +14053,24 @@ def get_ike_policy(id:) end ## - # @!method update_ike_policy(id:, ike_policy_patch:) - # Update an IKE policy. - # This request updates the properties of an existing IKE policy. - # @param id [String] The IKE policy identifier. - # @param ike_policy_patch [Hash] The IKE policy patch. + # @!method update_network_acl(id:, network_acl_patch:) + # Update a network ACL. + # This request updates a network ACL's name. + # @param id [String] The network ACL identifier. + # @param network_acl_patch [Hash] The network ACL patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_ike_policy(id:, ike_policy_patch:) + 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("ike_policy_patch must be provided") if ike_policy_patch.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_ike_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_network_acl") headers.merge!(sdk_headers) params = { @@ -13503,10 +14078,10 @@ def update_ike_policy(id:, ike_policy_patch:) "generation" => @generation } - data = ike_policy_patch + data = network_acl_patch headers["Content-Type"] = "application/merge-patch+json" - method_url = "/ike_policies/%s" % [ERB::Util.url_encode(id)] + method_url = "/network_acls/%s" % [ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -13520,69 +14095,38 @@ def update_ike_policy(id:, ike_policy_patch:) end ## - # @!method list_ike_policy_connections(id:, start: nil, limit: nil) - # List VPN gateway connections that use a specified IKE policy. - # This request lists VPN gateway connections that use a IKE policy. - # @param id [String] The IKE policy identifier. + # @!method list_network_acl_rules(network_acl_id:, start: nil, limit: nil, direction: nil) + # List rules for a network ACL. + # This request lists rules for a network ACL. These rules can allow or deny traffic + # between a source CIDR block and a destination CIDR block over a particular + # protocol and port range. + # @param network_acl_id [String] The network ACL identifier. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. + # @param direction [String] Filters the collection to rules with a `direction` property matching the specified + # value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_ike_policy_connections(id:, start: nil, limit: nil) + 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("id must be provided") if id.nil? - - headers = { - } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ike_policy_connections") - headers.merge!(sdk_headers) - - params = { - "version" => @version, - "generation" => @generation, - "start" => start, - "limit" => limit - } - - method_url = "/ike_policies/%s/connections" % [ERB::Util.url_encode(id)] - - response = request( - method: "GET", - url: method_url, - headers: headers, - params: params, - accept_json: true - ) - response - end - - ## - # @!method list_ipsec_policies(start: nil, limit: nil) - # List IPsec policies. - # This request lists IPsec policies in the region. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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? + 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_ipsec_policies") + 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 + "limit" => limit, + "direction" => direction } - method_url = "/ipsec_policies" + method_url = "/network_acls/%s/rules" % [ERB::Util.url_encode(network_acl_id)] response = request( method: "GET", @@ -13595,40 +14139,26 @@ def list_ipsec_policies(start: nil, limit: nil) end ## - # @!method create_ipsec_policy(authentication_algorithm:, encryption_algorithm:, pfs:, key_lifetime: nil, name: nil, resource_group: nil) - # Create an IPsec policy. - # This request creates a new IPsec policy. - # @param authentication_algorithm [String] The authentication algorithm - # - # Must be `disabled` if and only if the `encryption_algorithm` is - # `aes128gcm16`, `aes192gcm16`, or `aes256gcm16`. - # @param encryption_algorithm [String] The encryption algorithm - # - # The `authentication_algorithm` must be `disabled` if and only if - # `encryption_algorithm` is `aes128gcm16`, `aes192gcm16`, or - # `aes256gcm16`. - # @param pfs [String] Perfect Forward Secrecy. - # @param key_lifetime [Fixnum] The key lifetime in seconds. - # @param name [String] 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. - # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource - # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @!method create_network_acl_rule(network_acl_id:, network_acl_rule_prototype:) + # 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. + # @param network_acl_id [String] The network ACL identifier. + # @param network_acl_rule_prototype [NetworkACLRulePrototype] The network ACL rule prototype object. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_ipsec_policy(authentication_algorithm:, encryption_algorithm:, pfs:, key_lifetime: nil, name: nil, resource_group: nil) + 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("authentication_algorithm must be provided") if authentication_algorithm.nil? - - raise ArgumentError.new("encryption_algorithm must be provided") if encryption_algorithm.nil? + raise ArgumentError.new("network_acl_id must be provided") if network_acl_id.nil? - raise ArgumentError.new("pfs must be provided") if pfs.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_ipsec_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_network_acl_rule") headers.merge!(sdk_headers) params = { @@ -13636,46 +14166,41 @@ def create_ipsec_policy(authentication_algorithm:, encryption_algorithm:, pfs:, "generation" => @generation } - data = { - "authentication_algorithm" => authentication_algorithm, - "encryption_algorithm" => encryption_algorithm, - "pfs" => pfs, - "key_lifetime" => key_lifetime, - "name" => name, - "resource_group" => resource_group - } + data = network_acl_rule_prototype + headers["Content-Type"] = "application/json" - method_url = "/ipsec_policies" + method_url = "/network_acls/%s/rules" % [ERB::Util.url_encode(network_acl_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, - json: data, + data: data, accept_json: true ) response end ## - # @!method delete_ipsec_policy(id:) - # 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. - # @param id [String] The IPsec policy identifier. + # @!method delete_network_acl_rule(network_acl_id:, id:) + # Delete a network ACL rule. + # This request deletes a rule. This operation cannot be reversed. + # @param network_acl_id [String] The network ACL identifier. + # @param id [String] The rule identifier. # @return [nil] - def delete_ipsec_policy(id:) + 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_ipsec_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_network_acl_rule") headers.merge!(sdk_headers) params = { @@ -13683,7 +14208,7 @@ def delete_ipsec_policy(id:) "generation" => @generation } - method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)] + method_url = "/network_acls/%s/rules/%s" % [ERB::Util.url_encode(network_acl_id), ERB::Util.url_encode(id)] request( method: "DELETE", @@ -13696,22 +14221,24 @@ def delete_ipsec_policy(id:) end ## - # @!method get_ipsec_policy(id:) - # Retrieve an IPsec policy. - # This request retrieves a single IPsec policy specified by the identifier in the - # URL. - # @param id [String] The IPsec policy identifier. + # @!method get_network_acl_rule(network_acl_id:, id:) + # Retrieve a network ACL rule. + # This request retrieves a single rule specified by the identifier in the URL. + # @param network_acl_id [String] The network ACL identifier. + # @param id [String] The rule identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_ipsec_policy(id:) + 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_ipsec_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_network_acl_rule") headers.merge!(sdk_headers) params = { @@ -13719,7 +14246,7 @@ def get_ipsec_policy(id:) "generation" => @generation } - method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)] + method_url = "/network_acls/%s/rules/%s" % [ERB::Util.url_encode(network_acl_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -13732,24 +14259,30 @@ def get_ipsec_policy(id:) end ## - # @!method update_ipsec_policy(id:, i_psec_policy_patch:) - # Update an IPsec policy. - # This request updates the properties of an existing IPsec policy. - # @param id [String] The IPsec policy identifier. - # @param i_psec_policy_patch [Hash] The IPsec policy patch. + # @!method update_network_acl_rule(network_acl_id:, id:, network_acl_rule_patch:) + # Update a network ACL rule. + # This request updates a rule with the information in a provided rule patch. The + # rule patch object contains only the information to be updated. The request will + # fail if the provided patch includes properties that are not used by the rule's + # protocol. + # @param network_acl_id [String] The network ACL identifier. + # @param id [String] The rule identifier. + # @param network_acl_rule_patch [Hash] The network ACL rule patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_ipsec_policy(id:, i_psec_policy_patch:) + 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("i_psec_policy_patch must be provided") if i_psec_policy_patch.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_ipsec_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_network_acl_rule") headers.merge!(sdk_headers) params = { @@ -13757,10 +14290,10 @@ def update_ipsec_policy(id:, i_psec_policy_patch:) "generation" => @generation } - data = i_psec_policy_patch + data = network_acl_rule_patch headers["Content-Type"] = "application/merge-patch+json" - method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)] + method_url = "/network_acls/%s/rules/%s" % [ERB::Util.url_encode(network_acl_id), ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -13772,35 +14305,51 @@ def update_ipsec_policy(id:, i_psec_policy_patch:) ) response end + ######################### + # Security groups + ######################### ## - # @!method list_ipsec_policy_connections(id:, start: nil, limit: nil) - # List VPN gateway connections that use a specified IPsec policy. - # This request lists VPN gateway connections that use a IPsec policy. - # @param id [String] The IPsec policy identifier. + # @!method list_security_groups(start: nil, limit: nil, resource_group_id: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) + # List security groups. + # This request lists security groups in the region. A security group defines a set + # of packet filtering rules to allow traffic in and out of the resources targeted by + # the security group. No traffic is allowed by default. Security group rules are + # stateful so that reverse traffic in response to allowed traffic is automatically + # allowed. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. + # @param vpc_id [String] Filters the collection to resources with a `vpc.id` property matching the + # specified identifier. + # @param vpc_crn [String] Filters the collection to resources with a `vpc.crn` property matching the + # specified CRN. + # @param vpc_name [String] Filters the collection to resources with a `vpc.name` property matching the exact + # specified name. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_ipsec_policy_connections(id:, start: nil, limit: nil) + 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? - raise ArgumentError.new("id must be provided") if id.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ipsec_policy_connections") + 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 + "limit" => limit, + "resource_group.id" => resource_group_id, + "vpc.id" => vpc_id, + "vpc.crn" => vpc_crn, + "vpc.name" => vpc_name } - method_url = "/ipsec_policies/%s/connections" % [ERB::Util.url_encode(id)] + method_url = "/security_groups" response = request( method: "GET", @@ -13813,102 +14362,69 @@ def list_ipsec_policy_connections(id:, start: nil, limit: nil) end ## - # @!method list_vpn_gateways(start: nil, limit: nil, resource_group_id: nil, sort: nil, mode: nil) - # List VPN gateways. - # This request lists VPN gateways in the region. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. - # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching - # the specified identifier. - # @param sort [String] 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. - # @param mode [String] Filters the collection to VPN gateways with a `mode` property matching the - # specified value. + # @!method create_security_group(vpc:, name: nil, resource_group: nil, rules: nil) + # 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. + # @param vpc [VPCIdentity] The VPC this security group will reside in. + # @param name [String] 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. + # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource + # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @param rules [Array[SecurityGroupRulePrototype]] The prototype objects for rules to be created for this security group. If + # unspecified, no rules will be created, resulting in no traffic being allowed. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_vpn_gateways(start: nil, limit: nil, resource_group_id: nil, sort: nil, mode: nil) + 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", "list_vpn_gateways") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation, - "start" => start, - "limit" => limit, - "resource_group.id" => resource_group_id, - "sort" => sort, - "mode" => mode + "generation" => @generation } - method_url = "/vpn_gateways" + data = { + "vpc" => vpc, + "name" => name, + "resource_group" => resource_group, + "rules" => rules + } + + method_url = "/security_groups" response = request( - method: "GET", + method: "POST", url: method_url, headers: headers, params: params, + json: data, accept_json: true ) response end ## - # @!method create_vpn_gateway(vpn_gateway_prototype:) - # Create a VPN gateway. - # This request creates a new VPN gateway. - # @param vpn_gateway_prototype [VPNGatewayPrototype] The VPN gateway prototype object. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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 - - ## - # @!method delete_vpn_gateway(id:) - # 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. - # @param id [String] The VPN gateway identifier. + # @!method delete_security_group(id:) + # 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. + # @param id [String] The security group identifier. # @return [nil] - def delete_vpn_gateway(id:) + 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? @@ -13917,7 +14433,7 @@ def delete_vpn_gateway(id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpn_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_security_group") headers.merge!(sdk_headers) params = { @@ -13925,7 +14441,7 @@ def delete_vpn_gateway(id:) "generation" => @generation } - method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)] + method_url = "/security_groups/%s" % [ERB::Util.url_encode(id)] request( method: "DELETE", @@ -13938,13 +14454,13 @@ def delete_vpn_gateway(id:) end ## - # @!method get_vpn_gateway(id:) - # Retrieve a VPN gateway. - # This request retrieves a single VPN gateway specified by the identifier in the - # URL. - # @param id [String] The VPN gateway identifier. + # @!method get_security_group(id:) + # Retrieve a security group. + # This request retrieves a single security group specified by the identifier in the + # URL path. + # @param id [String] The security group identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_vpn_gateway(id:) + 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? @@ -13953,7 +14469,7 @@ def get_vpn_gateway(id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_security_group") headers.merge!(sdk_headers) params = { @@ -13961,7 +14477,7 @@ def get_vpn_gateway(id:) "generation" => @generation } - method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)] + method_url = "/security_groups/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -13974,24 +14490,26 @@ def get_vpn_gateway(id:) end ## - # @!method update_vpn_gateway(id:, vpn_gateway_patch:) - # Update a VPN gateway. - # This request updates the properties of an existing VPN gateway. - # @param id [String] The VPN gateway identifier. - # @param vpn_gateway_patch [Hash] The VPN gateway patch. + # @!method update_security_group(id:, security_group_patch:) + # 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. + # @param id [String] The security group identifier. + # @param security_group_patch [Hash] The security group patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_vpn_gateway(id:, vpn_gateway_patch:) + 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("vpn_gateway_patch must be provided") if vpn_gateway_patch.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_vpn_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_security_group") headers.merge!(sdk_headers) params = { @@ -13999,10 +14517,10 @@ def update_vpn_gateway(id:, vpn_gateway_patch:) "generation" => @generation } - data = vpn_gateway_patch + data = security_group_patch headers["Content-Type"] = "application/merge-patch+json" - method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)] + method_url = "/security_groups/%s" % [ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -14016,36 +14534,31 @@ def update_vpn_gateway(id:, vpn_gateway_patch:) end ## - # @!method list_vpn_gateway_connections(vpn_gateway_id:, start: nil, limit: nil, status: nil) - # List connections of a VPN gateway. - # This request lists connections of a VPN gateway. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. - # @param status [String] Filters the collection to VPN gateway connections with a `status` property - # matching the specified value. + # @!method list_security_group_rules(security_group_id:) + # List rules in a security group. + # This request lists rules in a security group. These rules define what traffic the + # security group permits. Security group rules are stateful, such that reverse + # traffic in response to allowed traffic is automatically permitted. + # @param security_group_id [String] The security group identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_vpn_gateway_connections(vpn_gateway_id:, start: nil, limit: nil, status: nil) + 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("vpn_gateway_id must be provided") if vpn_gateway_id.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_vpn_gateway_connections") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_security_group_rules") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation, - "start" => start, - "limit" => limit, - "status" => status + "generation" => @generation } - method_url = "/vpn_gateways/%s/connections" % [ERB::Util.url_encode(vpn_gateway_id)] + method_url = "/security_groups/%s/rules" % [ERB::Util.url_encode(security_group_id)] response = request( method: "GET", @@ -14058,24 +14571,32 @@ def list_vpn_gateway_connections(vpn_gateway_id:, start: nil, limit: nil, status end ## - # @!method create_vpn_gateway_connection(vpn_gateway_id:, vpn_gateway_connection_prototype:) - # Create a connection for a VPN gateway. - # This request creates a new VPN gateway connection. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param vpn_gateway_connection_prototype [VPNGatewayConnectionPrototype] The VPN gateway connection prototype object. + # @!method create_security_group_rule(security_group_id:, security_group_rule_prototype:) + # 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. + # @param security_group_id [String] The security group identifier. + # @param security_group_rule_prototype [SecurityGroupRulePrototype] The properties of the security group rule to be created. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_vpn_gateway_connection(vpn_gateway_id:, vpn_gateway_connection_prototype:) + 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("vpn_gateway_id must be provided") if vpn_gateway_id.nil? + raise ArgumentError.new("security_group_id must be provided") if security_group_id.nil? - raise ArgumentError.new("vpn_gateway_connection_prototype must be provided") if vpn_gateway_connection_prototype.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_vpn_gateway_connection") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group_rule") headers.merge!(sdk_headers) params = { @@ -14083,10 +14604,10 @@ def create_vpn_gateway_connection(vpn_gateway_id:, vpn_gateway_connection_protot "generation" => @generation } - data = vpn_gateway_connection_prototype + data = security_group_rule_prototype headers["Content-Type"] = "application/json" - method_url = "/vpn_gateways/%s/connections" % [ERB::Util.url_encode(vpn_gateway_id)] + method_url = "/security_groups/%s/rules" % [ERB::Util.url_encode(security_group_id)] response = request( method: "POST", @@ -14100,26 +14621,26 @@ def create_vpn_gateway_connection(vpn_gateway_id:, vpn_gateway_connection_protot end ## - # @!method delete_vpn_gateway_connection(vpn_gateway_id:, id:) - # 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. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. + # @!method delete_security_group_rule(security_group_id:, id:) + # 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. + # @param security_group_id [String] The security group identifier. + # @param id [String] The rule identifier. # @return [nil] - def delete_vpn_gateway_connection(vpn_gateway_id:, id:) + 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("vpn_gateway_id must be provided") if vpn_gateway_id.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_vpn_gateway_connection") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_security_group_rule") headers.merge!(sdk_headers) params = { @@ -14127,7 +14648,7 @@ def delete_vpn_gateway_connection(vpn_gateway_id:, id:) "generation" => @generation } - method_url = "/vpn_gateways/%s/connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)] + method_url = "/security_groups/%s/rules/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] request( method: "DELETE", @@ -14140,25 +14661,25 @@ def delete_vpn_gateway_connection(vpn_gateway_id:, id:) end ## - # @!method get_vpn_gateway_connection(vpn_gateway_id:, id:) - # Retrieve a VPN gateway connection. - # This request retrieves a single VPN gateway connection specified by the identifier - # in the URL. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. + # @!method get_security_group_rule(security_group_id:, id:) + # Retrieve a security group rule. + # This request retrieves a single security group rule specified by the identifier in + # the URL path. + # @param security_group_id [String] The security group identifier. + # @param id [String] The rule identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_vpn_gateway_connection(vpn_gateway_id:, id:) + 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("vpn_gateway_id must be provided") if vpn_gateway_id.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_vpn_gateway_connection") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_security_group_rule") headers.merge!(sdk_headers) params = { @@ -14166,7 +14687,7 @@ def get_vpn_gateway_connection(vpn_gateway_id:, id:) "generation" => @generation } - method_url = "/vpn_gateways/%s/connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)] + method_url = "/security_groups/%s/rules/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -14179,27 +14700,30 @@ def get_vpn_gateway_connection(vpn_gateway_id:, id:) end ## - # @!method update_vpn_gateway_connection(vpn_gateway_id:, id:, vpn_gateway_connection_patch:) - # Update a VPN gateway connection. - # This request updates the properties of an existing VPN gateway connection. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. - # @param vpn_gateway_connection_patch [Hash] The VPN gateway connection patch. + # @!method update_security_group_rule(security_group_id:, id:, security_group_rule_patch:) + # Update a security group rule. + # This request updates a security group rule with the information in a provided rule + # patch object. The rule patch object contains only the information to be updated. + # The request will fail if the provided patch includes properties that are not used + # by the rule's protocol. + # @param security_group_id [String] The security group identifier. + # @param id [String] The rule identifier. + # @param security_group_rule_patch [Hash] The security group rule patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_vpn_gateway_connection(vpn_gateway_id:, id:, vpn_gateway_connection_patch:) + 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("vpn_gateway_id must be provided") if vpn_gateway_id.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("vpn_gateway_connection_patch must be provided") if vpn_gateway_connection_patch.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_vpn_gateway_connection") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_security_group_rule") headers.merge!(sdk_headers) params = { @@ -14207,10 +14731,10 @@ def update_vpn_gateway_connection(vpn_gateway_id:, id:, vpn_gateway_connection_p "generation" => @generation } - data = vpn_gateway_connection_patch + data = security_group_rule_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)] + method_url = "/security_groups/%s/rules/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -14224,34 +14748,34 @@ def update_vpn_gateway_connection(vpn_gateway_id:, id:, vpn_gateway_connection_p end ## - # @!method list_vpn_gateway_connections_local_cidrs(vpn_gateway_id:, id:) - # List local CIDRs for a VPN gateway connection. - # This request lists local CIDRs for a VPN gateway connection. - # - # This request is only supported for policy mode VPN gateways. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. + # @!method list_security_group_targets(security_group_id:, start: nil, limit: nil) + # List targets associated with a security group. + # This request lists targets associated with a security group, to which the rules in + # the security group are applied. + # @param security_group_id [String] The security group identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_vpn_gateway_connections_local_cidrs(vpn_gateway_id:, id:) + 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("vpn_gateway_id must be provided") if vpn_gateway_id.nil? - - raise ArgumentError.new("id must be provided") if id.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_vpn_gateway_connections_local_cidrs") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_security_group_targets") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "generation" => @generation, + "start" => start, + "limit" => limit } - method_url = "/vpn_gateways/%s/connections/%s/local/cidrs" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)] + method_url = "/security_groups/%s/targets" % [ERB::Util.url_encode(security_group_id)] response = request( method: "GET", @@ -14264,29 +14788,36 @@ def list_vpn_gateway_connections_local_cidrs(vpn_gateway_id:, id:) end ## - # @!method remove_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) - # Remove a local CIDR from a VPN gateway connection. - # This request removes a CIDR from a VPN gateway connection. + # @!method delete_security_group_target_binding(security_group_id:, id:) + # 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: # - # This request is only supported for policy mode VPN gateways. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. - # @param cidr [String] The IP address range in CIDR block notation. - # @return [nil] - def remove_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) + # - 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. + # @param security_group_id [String] The security group identifier. + # @param id [String] The security group target identifier. + # @return [nil] + 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("vpn_gateway_id must be provided") if vpn_gateway_id.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("cidr must be provided") if cidr.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_vpn_gateway_connections_local_cidr") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_security_group_target_binding") headers.merge!(sdk_headers) params = { @@ -14294,7 +14825,7 @@ def remove_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) "generation" => @generation } - method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] request( method: "DELETE", @@ -14307,30 +14838,25 @@ def remove_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) end ## - # @!method check_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) - # 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. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. - # @param cidr [String] The IP address range in CIDR block notation. - # @return [nil] - def check_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) + # @!method get_security_group_target(security_group_id:, id:) + # 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. + # @param security_group_id [String] The security group identifier. + # @param id [String] The security group target identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("vpn_gateway_id must be provided") if vpn_gateway_id.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("cidr must be provided") if cidr.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "check_vpn_gateway_connections_local_cidr") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_security_group_target") headers.merge!(sdk_headers) params = { @@ -14338,44 +14864,48 @@ def check_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) "generation" => @generation } - method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] - request( + response = request( method: "GET", url: method_url, headers: headers, params: params, - accept_json: false + accept_json: true ) - nil + response end ## - # @!method add_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) - # 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. + # @!method create_security_group_target_binding(security_group_id:, id:) + # Add a target to a security group. + # This request adds a resource to an existing security group. The specified target + # identifier can be: # - # This request is only supported for policy mode VPN gateways. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. - # @param cidr [String] The IP address range in CIDR block notation. - # @return [nil] - def add_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) + # - 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. + # @param security_group_id [String] The security group identifier. + # @param id [String] The security group target identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("vpn_gateway_id must be provided") if vpn_gateway_id.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("cidr must be provided") if cidr.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_vpn_gateway_connections_local_cidr") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_security_group_target_binding") headers.merge!(sdk_headers) params = { @@ -14383,47 +14913,46 @@ def add_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) "generation" => @generation } - method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + method_url = "/security_groups/%s/targets/%s" % [ERB::Util.url_encode(security_group_id), ERB::Util.url_encode(id)] - request( + response = request( method: "PUT", url: method_url, headers: headers, params: params, - accept_json: false + accept_json: true ) - nil + response end + ######################### + # VPN gateways + ######################### ## - # @!method list_vpn_gateway_connections_peer_cidrs(vpn_gateway_id:, id:) - # List peer CIDRs for a VPN gateway connection. - # This request lists peer CIDRs for a VPN gateway connection. - # - # This request is only supported for policy mode VPN gateways. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. + # @!method list_ike_policies(start: nil, limit: nil) + # List IKE policies. + # This request lists IKE policies in the region. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_vpn_gateway_connections_peer_cidrs(vpn_gateway_id:, id:) + 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? - raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? - - raise ArgumentError.new("id must be provided") if id.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_connections_peer_cidrs") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ike_policies") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "generation" => @generation, + "start" => start, + "limit" => limit } - method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)] + method_url = "/ike_policies" response = request( method: "GET", @@ -14436,29 +14965,36 @@ def list_vpn_gateway_connections_peer_cidrs(vpn_gateway_id:, id:) end ## - # @!method remove_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) - # 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. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. - # @param cidr [String] The IP address range in CIDR block notation. - # @return [nil] - def remove_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + # @!method create_ike_policy(authentication_algorithm:, dh_group:, encryption_algorithm:, ike_version:, key_lifetime: nil, name: nil, resource_group: nil) + # Create an IKE policy. + # This request creates a new IKE policy. + # @param authentication_algorithm [String] The authentication algorithm. + # @param dh_group [Fixnum] The Diffie-Hellman group. + # @param encryption_algorithm [String] The encryption algorithm. + # @param ike_version [Fixnum] The IKE protocol version. + # @param key_lifetime [Fixnum] The key lifetime in seconds. + # @param name [String] 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. + # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource + # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("vpn_gateway_id must be provided") if vpn_gateway_id.nil? + raise ArgumentError.new("authentication_algorithm must be provided") if authentication_algorithm.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("dh_group must be provided") if dh_group.nil? - raise ArgumentError.new("cidr must be provided") if cidr.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", "remove_vpn_gateway_connections_peer_cidr") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_ike_policy") headers.merge!(sdk_headers) params = { @@ -14466,43 +15002,47 @@ def remove_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) "generation" => @generation } - method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + 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 + } - request( - method: "DELETE", + method_url = "/ike_policies" + + response = request( + method: "POST", url: method_url, headers: headers, params: params, - accept_json: false + json: data, + accept_json: true ) - nil + response end ## - # @!method check_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) - # 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. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. - # @param cidr [String] The IP address range in CIDR block notation. + # @!method delete_ike_policy(id:) + # 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. + # @param id [String] The IKE policy identifier. # @return [nil] - def check_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + 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("vpn_gateway_id must be provided") if vpn_gateway_id.nil? - raise ArgumentError.new("id must be provided") if id.nil? - raise ArgumentError.new("cidr must be provided") if cidr.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "check_vpn_gateway_connections_peer_cidr") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_ike_policy") headers.merge!(sdk_headers) params = { @@ -14510,10 +15050,10 @@ def check_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) "generation" => @generation } - method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + method_url = "/ike_policies/%s" % [ERB::Util.url_encode(id)] request( - method: "GET", + method: "DELETE", url: method_url, headers: headers, params: params, @@ -14523,31 +15063,21 @@ def check_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) end ## - # @!method add_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) - # 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. - # @param vpn_gateway_id [String] The VPN gateway identifier. - # @param id [String] The VPN gateway connection identifier. - # @param cidr [String] The IP address range in CIDR block notation. - # @return [nil] - def add_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + # @!method get_ike_policy(id:) + # Retrieve an IKE policy. + # This request retrieves a single IKE policy specified by the identifier in the URL. + # @param id [String] The IKE policy identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("vpn_gateway_id must be provided") if vpn_gateway_id.nil? - raise ArgumentError.new("id must be provided") if id.nil? - raise ArgumentError.new("cidr must be provided") if cidr.nil? - headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_vpn_gateway_connections_peer_cidr") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_ike_policy") headers.merge!(sdk_headers) params = { @@ -14555,58 +15085,88 @@ def add_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) "generation" => @generation } - method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + method_url = "/ike_policies/%s" % [ERB::Util.url_encode(id)] - request( - method: "PUT", + response = request( + method: "GET", url: method_url, headers: headers, params: params, - accept_json: false + accept_json: true ) - nil + response end - ######################### - # VPN servers - ######################### ## - # @!method list_vpn_servers(name: nil, start: nil, limit: nil, resource_group_id: nil, sort: nil) - # List VPN servers. - # This request lists VPN servers. - # @param name [String] Filters the collection to resources with a `name` property matching the exact - # specified name. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. - # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching - # the specified identifier. - # @param sort [String] 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. + # @!method update_ike_policy(id:, ike_policy_patch:) + # Update an IKE policy. + # This request updates the properties of an existing IKE policy. + # @param id [String] The IKE policy identifier. + # @param ike_policy_patch [Hash] The IKE policy patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_vpn_servers(name: nil, start: nil, limit: nil, resource_group_id: nil, sort: nil) + 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", "list_vpn_servers") + 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 + + ## + # @!method list_ike_policy_connections(id:, start: nil, limit: nil) + # List VPN gateway connections that use a specified IKE policy. + # This request lists VPN gateway connections that use an IKE policy. + # @param id [String] The IKE policy identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def list_ike_policy_connections(id:, start: nil, limit: nil) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ike_policy_connections") headers.merge!(sdk_headers) params = { "version" => @version, "generation" => @generation, - "name" => name, "start" => start, - "limit" => limit, - "resource_group.id" => resource_group_id, - "sort" => sort + "limit" => limit } - method_url = "/vpn_servers" + method_url = "/ike_policies/%s/connections" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -14619,58 +15179,81 @@ def list_vpn_servers(name: nil, start: nil, limit: nil, resource_group_id: nil, end ## - # @!method 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) - # Create a VPN server. - # This request creates a new VPN server. - # @param certificate [CertificateInstanceIdentity] The certificate instance for this VPN server. - # @param client_authentication [Array[VPNServerAuthenticationPrototype]] The methods used to authenticate VPN clients to this VPN server. VPN clients must - # authenticate against all specified methods. - # @param client_ip_pool [String] The VPN client IPv4 address pool, expressed in CIDR format. The request must not - # overlap with any existing address prefixes in the VPC or any of the following - # reserved address ranges: - # - `127.0.0.0/8` (IPv4 loopback addresses) - # - `161.26.0.0/16` (IBM services) - # - `166.8.0.0/14` (Cloud Service Endpoints) - # - `169.254.0.0/16` (IPv4 link-local addresses) - # - `224.0.0.0/4` (IPv4 multicast addresses) + # @!method list_ipsec_policies(start: nil, limit: nil) + # List IPsec policies. + # This request lists IPsec policies in the region. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method create_ipsec_policy(authentication_algorithm:, encryption_algorithm:, pfs:, key_lifetime: nil, name: nil, resource_group: nil) + # Create an IPsec policy. + # This request creates a new IPsec policy. + # @param authentication_algorithm [String] The authentication algorithm # - # 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. - # @param subnets [Array[SubnetIdentity]] The subnets to provision this VPN server in. Use subnets in different zones for - # high availability. - # @param client_dns_server_ips [Array[IP]] The DNS server addresses that will be provided to VPN clients connected to this - # VPN server. - # @param client_idle_timeout [Fixnum] 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. - # @param enable_split_tunneling [Boolean] Indicates whether the split tunneling is enabled on this VPN server. - # @param name [String] 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. - # @param port [Fixnum] The port number to use for this VPN server. - # @param protocol [String] The transport protocol to use for this VPN server. + # Must be `disabled` if and only if the `encryption_algorithm` is `aes128gcm16`, + # `aes192gcm16`, or `aes256gcm16` + # + # The `md5` and `sha1` algorithms have been deprecated. + # @param encryption_algorithm [String] The encryption algorithm + # + # The `authentication_algorithm` must be `disabled` if and only if + # `encryption_algorithm` is `aes128gcm16`, `aes192gcm16`, or `aes256gcm16` + # + # The `triple_des` algorithm has been deprecated. + # @param pfs [String] The Perfect Forward Secrecy group. + # + # Groups `group_2` and `group_5` have been deprecated. + # @param key_lifetime [Fixnum] The key lifetime in seconds. + # @param name [String] 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. # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. - # @param security_groups [Array[SecurityGroupIdentity]] The security groups to use for this VPN server. If unspecified, the VPC's default - # security group is used. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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) + 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("certificate must be provided") if certificate.nil? - - raise ArgumentError.new("client_authentication must be provided") if client_authentication.nil? + raise ArgumentError.new("authentication_algorithm must be provided") if authentication_algorithm.nil? - raise ArgumentError.new("client_ip_pool must be provided") if client_ip_pool.nil? + raise ArgumentError.new("encryption_algorithm must be provided") if encryption_algorithm.nil? - raise ArgumentError.new("subnets must be provided") if subnets.nil? + raise ArgumentError.new("pfs must be provided") if pfs.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpn_server") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_ipsec_policy") headers.merge!(sdk_headers) params = { @@ -14679,21 +15262,15 @@ def create_vpn_server(certificate:, client_authentication:, client_ip_pool:, sub } 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, + "authentication_algorithm" => authentication_algorithm, + "encryption_algorithm" => encryption_algorithm, + "pfs" => pfs, + "key_lifetime" => key_lifetime, "name" => name, - "port" => port, - "protocol" => protocol, - "resource_group" => resource_group, - "security_groups" => security_groups + "resource_group" => resource_group } - method_url = "/vpn_servers" + method_url = "/ipsec_policies" response = request( method: "POST", @@ -14707,14 +15284,14 @@ def create_vpn_server(certificate:, client_authentication:, client_ip_pool:, sub end ## - # @!method delete_vpn_server(id:, if_match: nil) - # Delete a VPN server. - # This request deletes a VPN server. This operation cannot be reversed. - # @param id [String] The VPN server identifier. - # @param if_match [String] If present, the request will fail if the specified ETag value does not match the - # resource's current ETag value. + # @!method delete_ipsec_policy(id:) + # 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. + # @param id [String] The IPsec policy identifier. # @return [nil] - def delete_vpn_server(id:, if_match: nil) + 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? @@ -14722,9 +15299,8 @@ def delete_vpn_server(id:, if_match: 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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_ipsec_policy") headers.merge!(sdk_headers) params = { @@ -14732,7 +15308,7 @@ def delete_vpn_server(id:, if_match: nil) "generation" => @generation } - method_url = "/vpn_servers/%s" % [ERB::Util.url_encode(id)] + method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)] request( method: "DELETE", @@ -14745,12 +15321,13 @@ def delete_vpn_server(id:, if_match: nil) end ## - # @!method get_vpn_server(id:) - # Retrieve a VPN server. - # This request retrieves a single VPN server specified by the identifier in the URL. - # @param id [String] The VPN server identifier. + # @!method get_ipsec_policy(id:) + # Retrieve an IPsec policy. + # This request retrieves a single IPsec policy specified by the identifier in the + # URL. + # @param id [String] The IPsec policy identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_vpn_server(id:) + 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? @@ -14759,7 +15336,7 @@ def get_vpn_server(id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_server") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_ipsec_policy") headers.merge!(sdk_headers) params = { @@ -14767,7 +15344,7 @@ def get_vpn_server(id:) "generation" => @generation } - method_url = "/vpn_servers/%s" % [ERB::Util.url_encode(id)] + method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -14780,28 +15357,24 @@ def get_vpn_server(id:) end ## - # @!method update_vpn_server(id:, vpn_server_patch:, if_match: nil) - # Update a VPN server. - # This request updates the properties of an existing VPN server. Any updates other - # than to `name` will cause all connected VPN clients to be disconnected. - # @param id [String] The VPN server identifier. - # @param vpn_server_patch [Hash] The VPN server patch. - # @param if_match [String] 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. + # @!method update_ipsec_policy(id:, i_psec_policy_patch:) + # Update an IPsec policy. + # This request updates the properties of an existing IPsec policy. + # @param id [String] The IPsec policy identifier. + # @param i_psec_policy_patch [Hash] The IPsec policy patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_vpn_server(id:, vpn_server_patch:, if_match: nil) + 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("vpn_server_patch must be provided") if vpn_server_patch.nil? + raise ArgumentError.new("i_psec_policy_patch must be provided") if i_psec_policy_patch.nil? headers = { - "If-Match" => if_match } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpn_server") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_ipsec_policy") headers.merge!(sdk_headers) params = { @@ -14809,10 +15382,10 @@ def update_vpn_server(id:, vpn_server_patch:, if_match: nil) "generation" => @generation } - data = vpn_server_patch + data = i_psec_policy_patch headers["Content-Type"] = "application/merge-patch+json" - method_url = "/vpn_servers/%s" % [ERB::Util.url_encode(id)] + method_url = "/ipsec_policies/%s" % [ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -14826,14 +15399,14 @@ def update_vpn_server(id:, vpn_server_patch:, if_match: nil) end ## - # @!method get_vpn_server_client_configuration(id:) - # 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. - # @param id [String] The VPN server identifier. + # @!method list_ipsec_policy_connections(id:, start: nil, limit: nil) + # List VPN gateway connections that use a specified IPsec policy. + # This request lists VPN gateway connections that use an IPsec policy. + # @param id [String] The IPsec policy identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_vpn_server_client_configuration(id:) + def list_ipsec_policy_connections(id:, start: nil, limit: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? @@ -14842,49 +15415,52 @@ def get_vpn_server_client_configuration(id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_server_client_configuration") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_ipsec_policy_connections") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "generation" => @generation, + "start" => start, + "limit" => limit } - method_url = "/vpn_servers/%s/client_configuration" % [ERB::Util.url_encode(id)] + method_url = "/ipsec_policies/%s/connections" % [ERB::Util.url_encode(id)] response = request( method: "GET", url: method_url, headers: headers, params: params, - accept_json: false + accept_json: true ) response end ## - # @!method list_vpn_server_clients(vpn_server_id:, start: nil, limit: nil, sort: nil) - # List VPN clients for a VPN server. - # This request retrieves connected VPN clients, and any disconnected VPN clients - # that the VPN server has not yet deleted based on its auto-deletion policy. - # @param vpn_server_id [String] The VPN server identifier. + # @!method list_vpn_gateways(start: nil, limit: nil, resource_group_id: nil, sort: nil, mode: nil) + # List VPN gateways. + # This request lists VPN gateways in the region. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. # @param sort [String] 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. + # descending order, and the value `name` sorts it by the `name` property in + # ascending order. + # @param mode [String] Filters the collection to VPN gateways with a `mode` property matching the + # specified value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_vpn_server_clients(vpn_server_id:, start: nil, limit: nil, sort: nil) + 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? - 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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateways") headers.merge!(sdk_headers) params = { @@ -14892,10 +15468,12 @@ def list_vpn_server_clients(vpn_server_id:, start: nil, limit: nil, sort: nil) "generation" => @generation, "start" => start, "limit" => limit, - "sort" => sort + "resource_group.id" => resource_group_id, + "sort" => sort, + "mode" => mode } - method_url = "/vpn_servers/%s/clients" % [ERB::Util.url_encode(vpn_server_id)] + method_url = "/vpn_gateways" response = request( method: "GET", @@ -14908,26 +15486,63 @@ def list_vpn_server_clients(vpn_server_id:, start: nil, limit: nil, sort: nil) end ## - # @!method delete_vpn_server_client(vpn_server_id:, id:) - # 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. - # @param vpn_server_id [String] The VPN server identifier. - # @param id [String] The VPN client identifier. - # @return [nil] - def delete_vpn_server_client(vpn_server_id:, id:) + # @!method create_vpn_gateway(vpn_gateway_prototype:) + # Create a VPN gateway. + # This request creates a new VPN gateway. + # @param vpn_gateway_prototype [VPNGatewayPrototype] The VPN gateway prototype object. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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_server_id must be provided") if vpn_server_id.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 + + ## + # @!method delete_vpn_gateway(id:) + # 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. + # @param id [String] The VPN gateway identifier. + # @return [nil] + 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_server_client") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpn_gateway") headers.merge!(sdk_headers) params = { @@ -14935,7 +15550,7 @@ def delete_vpn_server_client(vpn_server_id:, id:) "generation" => @generation } - method_url = "/vpn_servers/%s/clients/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)] + method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)] request( method: "DELETE", @@ -14948,24 +15563,22 @@ def delete_vpn_server_client(vpn_server_id:, id:) end ## - # @!method get_vpn_server_client(vpn_server_id:, id:) - # Retrieve a VPN client. - # This request retrieves a single VPN client specified by the identifier in the URL. - # @param vpn_server_id [String] The VPN server identifier. - # @param id [String] The VPN client identifier. + # @!method get_vpn_gateway(id:) + # Retrieve a VPN gateway. + # This request retrieves a single VPN gateway specified by the identifier in the + # URL. + # @param id [String] The VPN gateway identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_vpn_server_client(vpn_server_id:, id:) + 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("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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_gateway") headers.merge!(sdk_headers) params = { @@ -14973,7 +15586,7 @@ def get_vpn_server_client(vpn_server_id:, id:) "generation" => @generation } - method_url = "/vpn_servers/%s/clients/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)] + method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -14986,27 +15599,24 @@ def get_vpn_server_client(vpn_server_id:, id:) end ## - # @!method disconnect_vpn_client(vpn_server_id:, id:) - # 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. - # @param vpn_server_id [String] The VPN server identifier. - # @param id [String] The VPN client identifier. - # @return [nil] - def disconnect_vpn_client(vpn_server_id:, id:) + # @!method update_vpn_gateway(id:, vpn_gateway_patch:) + # Update a VPN gateway. + # This request updates the properties of an existing VPN gateway. + # @param id [String] The VPN gateway identifier. + # @param vpn_gateway_patch [Hash] The VPN gateway patch. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("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_gateway_patch must be provided") if vpn_gateway_patch.nil? + headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "disconnect_vpn_client") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpn_gateway") headers.merge!(sdk_headers) params = { @@ -15014,44 +15624,42 @@ def disconnect_vpn_client(vpn_server_id:, id:) "generation" => @generation } - method_url = "/vpn_servers/%s/clients/%s/disconnect" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)] + data = vpn_gateway_patch + headers["Content-Type"] = "application/merge-patch+json" - request( - method: "POST", + method_url = "/vpn_gateways/%s" % [ERB::Util.url_encode(id)] + + response = request( + method: "PATCH", url: method_url, headers: headers, params: params, - accept_json: false + data: data, + accept_json: true ) - nil + response end ## - # @!method list_vpn_server_routes(vpn_server_id:, start: nil, limit: nil, sort: nil) - # List VPN routes for a VPN server. - # This request lists VPN routes in a VPN server. All VPN routes are provided to the - # VPN client when the connection is established. Packets received from the VPN - # client will be dropped by the VPN server if there is no VPN route matching their - # specified destinations. All VPN routes must be unique within the VPN server. - # @param vpn_server_id [String] The VPN server identifier. + # @!method list_vpn_gateway_connections(vpn_gateway_id:, start: nil, limit: nil, status: nil) + # List connections of a VPN gateway. + # This request lists connections of a VPN gateway. + # @param vpn_gateway_id [String] The VPN gateway identifier. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. - # @param sort [String] 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. + # @param status [String] Filters the collection to VPN gateway connections with a `status` property + # matching the specified value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_vpn_server_routes(vpn_server_id:, start: nil, limit: nil, sort: nil) + def list_vpn_gateway_connections(vpn_gateway_id:, start: nil, limit: nil, status: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("vpn_server_id must be provided") if vpn_server_id.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_server_routes") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_connections") headers.merge!(sdk_headers) params = { @@ -15059,10 +15667,10 @@ def list_vpn_server_routes(vpn_server_id:, start: nil, limit: nil, sort: nil) "generation" => @generation, "start" => start, "limit" => limit, - "sort" => sort + "status" => status } - method_url = "/vpn_servers/%s/routes" % [ERB::Util.url_encode(vpn_server_id)] + method_url = "/vpn_gateways/%s/connections" % [ERB::Util.url_encode(vpn_gateway_id)] response = request( method: "GET", @@ -15075,39 +15683,24 @@ def list_vpn_server_routes(vpn_server_id:, start: nil, limit: nil, sort: nil) end ## - # @!method create_vpn_server_route(vpn_server_id:, destination:, action: nil, name: nil) - # 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. - # @param vpn_server_id [String] The VPN server identifier. - # @param destination [String] The destination to use for this VPN route in the VPN server. Must be unique within - # the VPN server. If an incoming packet does not match any destination, it will be - # dropped. - # @param action [String] 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. - # @param name [String] 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. + # @!method create_vpn_gateway_connection(vpn_gateway_id:, vpn_gateway_connection_prototype:) + # Create a connection for a VPN gateway. + # This request creates a new VPN gateway connection. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param vpn_gateway_connection_prototype [VPNGatewayConnectionPrototype] The VPN gateway connection prototype object. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_vpn_server_route(vpn_server_id:, destination:, action: nil, name: nil) + 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_server_id must be provided") if vpn_server_id.nil? + raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? - raise ArgumentError.new("destination must be provided") if destination.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_server_route") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_vpn_gateway_connection") headers.merge!(sdk_headers) params = { @@ -15115,44 +15708,43 @@ def create_vpn_server_route(vpn_server_id:, destination:, action: nil, name: nil "generation" => @generation } - data = { - "destination" => destination, - "action" => action, - "name" => name - } + data = vpn_gateway_connection_prototype + headers["Content-Type"] = "application/json" - method_url = "/vpn_servers/%s/routes" % [ERB::Util.url_encode(vpn_server_id)] + method_url = "/vpn_gateways/%s/connections" % [ERB::Util.url_encode(vpn_gateway_id)] response = request( method: "POST", url: method_url, headers: headers, params: params, - json: data, + data: data, accept_json: true ) response end ## - # @!method delete_vpn_server_route(vpn_server_id:, id:) - # Delete a VPN route. - # This request deletes a VPN route. This operation cannot be reversed. - # @param vpn_server_id [String] The VPN server identifier. - # @param id [String] The VPN route identifier. + # @!method delete_vpn_gateway_connection(vpn_gateway_id:, id:) + # 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. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. # @return [nil] - def delete_vpn_server_route(vpn_server_id:, id:) + 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_server_id must be provided") if vpn_server_id.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_server_route") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_vpn_gateway_connection") headers.merge!(sdk_headers) params = { @@ -15160,7 +15752,7 @@ def delete_vpn_server_route(vpn_server_id:, id:) "generation" => @generation } - method_url = "/vpn_servers/%s/routes/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)] + method_url = "/vpn_gateways/%s/connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)] request( method: "DELETE", @@ -15173,24 +15765,25 @@ def delete_vpn_server_route(vpn_server_id:, id:) end ## - # @!method get_vpn_server_route(vpn_server_id:, id:) - # Retrieve a VPN route. - # This request retrieves a single VPN route specified by the identifier in the URL. - # @param vpn_server_id [String] The VPN server identifier. - # @param id [String] The VPN route identifier. + # @!method get_vpn_gateway_connection(vpn_gateway_id:, id:) + # Retrieve a VPN gateway connection. + # This request retrieves a single VPN gateway connection specified by the identifier + # in the URL. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_vpn_server_route(vpn_server_id:, id:) + 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_server_id must be provided") if vpn_server_id.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_server_route") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_vpn_gateway_connection") headers.merge!(sdk_headers) params = { @@ -15198,7 +15791,7 @@ def get_vpn_server_route(vpn_server_id:, id:) "generation" => @generation } - method_url = "/vpn_servers/%s/routes/%s" % [ERB::Util.url_encode(vpn_server_id), ERB::Util.url_encode(id)] + method_url = "/vpn_gateways/%s/connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -15211,29 +15804,27 @@ def get_vpn_server_route(vpn_server_id:, id:) end ## - # @!method update_vpn_server_route(vpn_server_id:, id:, vpn_server_route_patch:) - # 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. - # @param vpn_server_id [String] The VPN server identifier. - # @param id [String] The VPN route identifier. - # @param vpn_server_route_patch [Hash] The VPN route patch. + # @!method update_vpn_gateway_connection(vpn_gateway_id:, id:, vpn_gateway_connection_patch:) + # Update a VPN gateway connection. + # This request updates the properties of an existing VPN gateway connection. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. + # @param vpn_gateway_connection_patch [Hash] The VPN gateway connection patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_vpn_server_route(vpn_server_id:, id:, vpn_server_route_patch:) + 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_server_id must be provided") if vpn_server_id.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_server_route_patch must be provided") if vpn_server_route_patch.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_server_route") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_vpn_gateway_connection") headers.merge!(sdk_headers) params = { @@ -15241,10 +15832,10 @@ def update_vpn_server_route(vpn_server_id:, id:, vpn_server_route_patch:) "generation" => @generation } - data = vpn_server_route_patch + data = vpn_gateway_connection_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)] + method_url = "/vpn_gateways/%s/connections/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -15256,64 +15847,28 @@ def update_vpn_server_route(vpn_server_id:, id:, vpn_server_route_patch:) ) response end - ######################### - # Load balancers - ######################### ## - # @!method list_load_balancer_profiles(start: nil, limit: nil) - # List load balancer profiles. - # This request lists load balancer profiles available in the region. A load balancer - # profile specifies the performance characteristics and pricing model for a load - # balancer. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. + # @!method list_vpn_gateway_connections_local_cidrs(vpn_gateway_id:, id:) + # List local CIDRs for a VPN gateway connection. + # This request lists local CIDRs for a VPN gateway connection. + # + # This request is only supported for policy mode VPN gateways. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_load_balancer_profiles(start: nil, limit: nil) + def list_vpn_gateway_connections_local_cidrs(vpn_gateway_id:, id:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - 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 - - ## - # @!method get_load_balancer_profile(name:) - # Retrieve a load balancer profile. - # This request retrieves a load balancer profile specified by the name in the URL. - # @param name [String] The load balancer profile name. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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("vpn_gateway_id must be provided") if vpn_gateway_id.nil? - raise ArgumentError.new("name must be provided") if name.nil? + raise ArgumentError.new("id must be provided") if id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_profile") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_connections_local_cidrs") headers.merge!(sdk_headers) params = { @@ -15321,7 +15876,7 @@ def get_load_balancer_profile(name:) "generation" => @generation } - method_url = "/load_balancer/profiles/%s" % [ERB::Util.url_encode(name)] + 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", @@ -15334,97 +15889,73 @@ def get_load_balancer_profile(name:) end ## - # @!method list_load_balancers(start: nil, limit: nil) - # List load balancers. - # This request lists load balancers in the region. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_load_balancers(start: nil, limit: nil) + # @!method remove_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) + # 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. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. + # @param cidr [String] The IP address range in CIDR block notation. + # @return [nil] + def remove_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + raise ArgumentError.new("cidr must be provided") if cidr.nil? + headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancers") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_vpn_gateway_connections_local_cidr") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation, - "start" => start, - "limit" => limit + "generation" => @generation } - method_url = "/load_balancers" + method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] - response = request( - method: "GET", + request( + method: "DELETE", url: method_url, headers: headers, params: params, - accept_json: true + accept_json: false ) - response + nil end ## - # @!method 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) - # Create a load balancer. - # This request creates and provisions a new load balancer. - # @param is_public [Boolean] Indicates whether this load balancer is public. - # - # At present, if route mode is enabled, the load balancer must not be public. - # @param subnets [Array[SubnetIdentity]] 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. - # @param dns [LoadBalancerDNSPrototype] 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`. - # @param listeners [Array[LoadBalancerListenerPrototypeLoadBalancerContext]] The listeners of this load balancer. - # @param logging [LoadBalancerLoggingPrototype] The logging configuration to use for this load balancer. See [VPC Datapath - # Logging](https://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. - # @param name [String] 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. - # @param pools [Array[LoadBalancerPoolPrototype]] The pools of this load balancer. - # @param profile [LoadBalancerProfileIdentity] The profile to use for this load balancer. - # - # If unspecified, `application` will be used. - # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource - # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. - # @param route_mode [Boolean] Indicates whether route mode is enabled for this load balancer. - # - # At present, public load balancers are not supported with route mode enabled. - # @param security_groups [Array[SecurityGroupIdentity]] The security groups to use for this load balancer. If unspecified, the VPC's - # default security group is used. + # @!method check_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) + # 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. # - # The load balancer profile must support security groups. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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) + # This request is only supported for policy mode VPN gateways. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. + # @param cidr [String] The IP address range in CIDR block notation. + # @return [nil] + def check_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("is_public must be provided") if is_public.nil? + raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? - raise ArgumentError.new("subnets must be provided") if subnets.nil? + raise ArgumentError.new("id must be provided") if id.nil? + + raise ArgumentError.new("cidr must be provided") if cidr.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "check_vpn_gateway_connections_local_cidr") headers.merge!(sdk_headers) params = { @@ -15432,54 +15963,44 @@ def create_load_balancer(is_public:, subnets:, dns: nil, listeners: nil, logging "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" + method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] - response = request( - method: "POST", + request( + method: "GET", url: method_url, headers: headers, params: params, - json: data, - accept_json: true + accept_json: false ) - response + nil end ## - # @!method delete_load_balancer(id:, if_match: 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. - # @param id [String] The load balancer identifier. - # @param if_match [String] If present, the request will fail if the specified ETag value does not match the - # resource's current ETag value. + # @!method add_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) + # 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. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. + # @param cidr [String] The IP address range in CIDR block notation. # @return [nil] - def delete_load_balancer(id:, if_match: nil) + def add_vpn_gateway_connections_local_cidr(vpn_gateway_id:, id:, cidr:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? + raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("cidr must be provided") if cidr.nil? + headers = { - "If-Match" => if_match } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_vpn_gateway_connections_local_cidr") headers.merge!(sdk_headers) params = { @@ -15487,10 +16008,10 @@ def delete_load_balancer(id:, if_match: nil) "generation" => @generation } - method_url = "/load_balancers/%s" % [ERB::Util.url_encode(id)] + method_url = "/vpn_gateways/%s/connections/%s/local/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] request( - method: "DELETE", + method: "PUT", url: method_url, headers: headers, params: params, @@ -15500,22 +16021,26 @@ def delete_load_balancer(id:, if_match: nil) end ## - # @!method get_load_balancer(id:) - # Retrieve a load balancer. - # This request retrieves a single load balancer specified by the identifier in the - # URL path. - # @param id [String] The load balancer identifier. + # @!method list_vpn_gateway_connections_peer_cidrs(vpn_gateway_id:, id:) + # List peer CIDRs for a VPN gateway connection. + # This request lists peer CIDRs for a VPN gateway connection. + # + # This request is only supported for policy mode VPN gateways. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_load_balancer(id:) + def list_vpn_gateway_connections_peer_cidrs(vpn_gateway_id:, id:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? + raise ArgumentError.new("id must be provided") if id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_vpn_gateway_connections_peer_cidrs") headers.merge!(sdk_headers) params = { @@ -15523,7 +16048,7 @@ def get_load_balancer(id:) "generation" => @generation } - method_url = "/load_balancers/%s" % [ERB::Util.url_encode(id)] + 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", @@ -15536,10 +16061,1123 @@ def get_load_balancer(id:) end ## - # @!method update_load_balancer(id:, load_balancer_patch:, if_match: nil) - # 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 + # @!method remove_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + # 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. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. + # @param cidr [String] The IP address range in CIDR block notation. + # @return [nil] + def remove_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + raise ArgumentError.new("cidr must be provided") if cidr.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_vpn_gateway_connections_peer_cidr") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + + request( + method: "DELETE", + url: method_url, + headers: headers, + params: params, + accept_json: false + ) + nil + end + + ## + # @!method check_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + # 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. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. + # @param cidr [String] The IP address range in CIDR block notation. + # @return [nil] + def check_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + raise ArgumentError.new("cidr must be provided") if cidr.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "check_vpn_gateway_connections_peer_cidr") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + + request( + method: "GET", + url: method_url, + headers: headers, + params: params, + accept_json: false + ) + nil + end + + ## + # @!method add_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + # 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. + # @param vpn_gateway_id [String] The VPN gateway identifier. + # @param id [String] The VPN gateway connection identifier. + # @param cidr [String] The IP address range in CIDR block notation. + # @return [nil] + def add_vpn_gateway_connections_peer_cidr(vpn_gateway_id:, id:, cidr:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("vpn_gateway_id must be provided") if vpn_gateway_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + raise ArgumentError.new("cidr must be provided") if cidr.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_vpn_gateway_connections_peer_cidr") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/vpn_gateways/%s/connections/%s/peer/cidrs/%s" % [ERB::Util.url_encode(vpn_gateway_id), ERB::Util.url_encode(id), ERB::Util.url_encode(cidr)] + + request( + method: "PUT", + url: method_url, + headers: headers, + params: params, + accept_json: false + ) + nil + end + ######################### + # VPN servers + ######################### + + ## + # @!method list_vpn_servers(name: nil, start: nil, limit: nil, resource_group_id: nil, sort: nil) + # List VPN servers. + # This request lists VPN servers. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. + # @param sort [String] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method 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) + # Create a VPN server. + # This request creates a new VPN server. + # @param certificate [CertificateInstanceIdentity] The certificate instance for this VPN server. + # @param client_authentication [Array[VPNServerAuthenticationPrototype]] The methods used to authenticate VPN clients to this VPN server. VPN clients must + # authenticate against all specified methods. + # @param client_ip_pool [String] The VPN client IPv4 address pool, expressed in CIDR format. The request must not + # overlap with any existing address prefixes in the VPC or any of the following + # reserved address ranges: + # - `127.0.0.0/8` (IPv4 loopback addresses) + # - `161.26.0.0/16` (IBM services) + # - `166.8.0.0/14` (Cloud Service Endpoints) + # - `169.254.0.0/16` (IPv4 link-local addresses) + # - `224.0.0.0/4` (IPv4 multicast addresses) + # + # The prefix length of the client IP address pool's CIDR must be between + # `/9` (8,388,608 addresses) and `/22` (1024 addresses). A CIDR block that contains + # twice the number of IP addresses that are required to enable the maximum number of + # concurrent connections is recommended. + # @param subnets [Array[SubnetIdentity]] The subnets to provision this VPN server in. Use subnets in different zones for + # high availability. + # @param client_dns_server_ips [Array[IP]] The DNS server addresses that will be provided to VPN clients connected to this + # VPN server. + # @param client_idle_timeout [Fixnum] 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. + # @param enable_split_tunneling [Boolean] Indicates whether the split tunneling is enabled on this VPN server. + # @param name [String] 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. + # @param port [Fixnum] The port number to use for this VPN server. + # @param protocol [String] The transport protocol to use for this VPN server. + # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource + # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @param security_groups [Array[SecurityGroupIdentity]] The security groups to use for this VPN server. If unspecified, the VPC's default + # security group is used. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method delete_vpn_server(id:, if_match: nil) + # Delete a VPN server. + # This request deletes a VPN server. This operation cannot be reversed. + # @param id [String] The VPN server identifier. + # @param if_match [String] If present, the request will fail if the specified ETag value does not match the + # resource's current ETag value. + # @return [nil] + 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 + + ## + # @!method get_vpn_server(id:) + # Retrieve a VPN server. + # This request retrieves a single VPN server specified by the identifier in the URL. + # @param id [String] The VPN server identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method update_vpn_server(id:, vpn_server_patch:, if_match: nil) + # Update a VPN server. + # This request updates the properties of an existing VPN server. Any updates other + # than to `name` will cause all connected VPN clients to be disconnected. + # @param id [String] The VPN server identifier. + # @param vpn_server_patch [Hash] The VPN server patch. + # @param if_match [String] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method get_vpn_server_client_configuration(id:) + # 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. + # @param id [String] The VPN server identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method list_vpn_server_clients(vpn_server_id:, start: nil, limit: nil, sort: nil) + # List VPN clients for a VPN server. + # This request retrieves connected VPN clients, and any disconnected VPN clients + # that the VPN server has not yet deleted based on its auto-deletion policy. + # @param vpn_server_id [String] The VPN server identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param sort [String] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method delete_vpn_server_client(vpn_server_id:, id:) + # 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. + # @param vpn_server_id [String] The VPN server identifier. + # @param id [String] The VPN client identifier. + # @return [nil] + 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 + + ## + # @!method get_vpn_server_client(vpn_server_id:, id:) + # Retrieve a VPN client. + # This request retrieves a single VPN client specified by the identifier in the URL. + # @param vpn_server_id [String] The VPN server identifier. + # @param id [String] The VPN client identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method disconnect_vpn_client(vpn_server_id:, id:) + # 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. + # @param vpn_server_id [String] The VPN server identifier. + # @param id [String] The VPN client identifier. + # @return [nil] + 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 + + ## + # @!method list_vpn_server_routes(vpn_server_id:, start: nil, limit: nil, sort: nil) + # List VPN routes for a VPN server. + # This request lists VPN routes in a VPN server. All VPN routes are provided to the + # VPN client when the connection is established. Packets received from the VPN + # client will be dropped by the VPN server if there is no VPN route matching their + # specified destinations. All VPN routes must be unique within the VPN server. + # @param vpn_server_id [String] The VPN server identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param sort [String] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method create_vpn_server_route(vpn_server_id:, destination:, action: nil, name: nil) + # 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. + # @param vpn_server_id [String] The VPN server identifier. + # @param destination [String] The destination to use for this VPN route in the VPN server. Must be unique within + # the VPN server. If an incoming packet does not match any destination, it will be + # dropped. + # @param action [String] 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. + # @param name [String] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method delete_vpn_server_route(vpn_server_id:, id:) + # Delete a VPN route. + # This request deletes a VPN route. This operation cannot be reversed. + # @param vpn_server_id [String] The VPN server identifier. + # @param id [String] The VPN route identifier. + # @return [nil] + 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 + + ## + # @!method get_vpn_server_route(vpn_server_id:, id:) + # Retrieve a VPN route. + # This request retrieves a single VPN route specified by the identifier in the URL. + # @param vpn_server_id [String] The VPN server identifier. + # @param id [String] The VPN route identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method update_vpn_server_route(vpn_server_id:, id:, vpn_server_route_patch:) + # 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. + # @param vpn_server_id [String] The VPN server identifier. + # @param id [String] The VPN route identifier. + # @param vpn_server_route_patch [Hash] The VPN route patch. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + ######################### + # Load balancers + ######################### + + ## + # @!method list_load_balancer_profiles(start: nil, limit: nil) + # List load balancer profiles. + # This request lists load balancer profiles available in the region. A load balancer + # profile specifies the performance characteristics and pricing model for a load + # balancer. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method get_load_balancer_profile(name:) + # Retrieve a load balancer profile. + # This request retrieves a load balancer profile specified by the name in the URL. + # @param name [String] The load balancer profile name. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method list_load_balancers(start: nil, limit: nil) + # List load balancers. + # This request lists load balancers in the region. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method create_load_balancer(is_public:, subnets:, dns: nil, is_private_path: nil, listeners: nil, logging: nil, name: nil, pools: nil, profile: nil, resource_group: nil, route_mode: nil, security_groups: nil) + # Create a load balancer. + # This request creates and provisions a new load balancer. + # @param is_public [Boolean] Indicates whether this load balancer is public. + # + # At present, + # - If `route_mode` is set to `true`, the load balancer must be private. + # - If `is_private_path` is specified, it must be set to `false`. + # @param subnets [Array[SubnetIdentity]] The subnets to provision this load balancer in. The subnets must be in the same + # VPC. + # - If 'availability' is specified as `subnet` in the profile, the load balancer's + # availability will depend on the availability of the zones that the subnets reside + # in. + # - If 'availability' is specified as `region` in the profile, the load balancer + # remains available as long as any zone in the region is available. Only members in + # healthy zones will be sent new connections. + # + # Load balancers in the `network` family allow only one subnet to be specified. + # @param dns [LoadBalancerDNSPrototype] The DNS configuration for this load balancer. + # + # If unspecified, DNS `A` records for this load balancer's `hostname` property will + # be added + # to the public DNS zone `lb.appdomain.cloud`. Otherwise, those DNS `A` records will + # be + # added to the specified `zone`. + # + # Not supported by private path load balancers. + # @param is_private_path [Boolean] Indicates whether this is a private path load balancer. + # @param listeners [Array[LoadBalancerListenerPrototypeLoadBalancerContext]] The listeners of this load balancer. + # @param logging [LoadBalancerLoggingPrototype] The logging configuration to use for this load balancer. See [VPC Datapath + # Logging](https://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. + # @param name [String] 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. + # @param pools [Array[LoadBalancerPoolPrototypeLoadBalancerContext]] The pools of this load balancer. + # @param profile [LoadBalancerProfileIdentity] The profile to use for this load balancer. + # + # If unspecified, `application` will be used. + # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource + # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @param route_mode [Boolean] Indicates whether [route + # mode](https://cloud.ibm.com/docs/vpc?topic=vpc-nlb-vnf&interface=ui) is enabled + # for this load balancer. + # + # At present, public load balancers are not supported with route mode enabled. + # @param security_groups [Array[SecurityGroupIdentity]] 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. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def create_load_balancer(is_public:, subnets:, dns: nil, is_private_path: nil, listeners: nil, logging: nil, name: nil, pools: nil, profile: nil, resource_group: nil, route_mode: nil, security_groups: nil) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("is_public must be provided") if is_public.nil? + + raise ArgumentError.new("subnets must be provided") if subnets.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + data = { + "is_public" => is_public, + "subnets" => subnets, + "dns" => dns, + "is_private_path" => is_private_path, + "listeners" => listeners, + "logging" => logging, + "name" => name, + "pools" => pools, + "profile" => profile, + "resource_group" => resource_group, + "route_mode" => route_mode, + "security_groups" => security_groups + } + + method_url = "/load_balancers" + + response = request( + method: "POST", + url: method_url, + headers: headers, + params: params, + json: data, + accept_json: true + ) + response + end + + ## + # @!method delete_load_balancer(id:, if_match: 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. + # @param id [String] The load balancer identifier. + # @param if_match [String] If present, the request will fail if the specified ETag value does not match the + # resource's current ETag value. + # @return [nil] + 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 + + ## + # @!method get_load_balancer(id:) + # Retrieve a load balancer. + # This request retrieves a single load balancer specified by the identifier in the + # URL path. + # @param id [String] The load balancer identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method update_load_balancer(id:, load_balancer_patch:, if_match: nil) + # 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`. # @param id [String] The load balancer identifier. @@ -15547,19 +17185,720 @@ def get_load_balancer(id:) # @param if_match [String] 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. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_load_balancer(id:, load_balancer_patch:, if_match: nil) + 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 + + ## + # @!method get_load_balancer_statistics(id:) + # List statistics of a load balancer. + # This request lists statistics of a load balancer. + # @param id [String] The load balancer identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method list_load_balancer_listeners(load_balancer_id:) + # List listeners for a load balancer. + # This request lists listeners for a load balancer. + # @param load_balancer_id [String] The load balancer identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method 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) + # Create a listener for a load balancer. + # This request creates a new listener for a load balancer. + # @param load_balancer_id [String] The load balancer identifier. + # @param protocol [String] The listener protocol. Each listener in the load balancer must have a + # non-overlapping port range and `protocol` combination. + # + # Load balancers in the `network` family support `tcp` and `udp` (if `udp_supported` + # is `true`). Load balancers in the `application` family support `tcp`, `http` and + # `https`. + # + # Additional restrictions: + # - If `default_pool` is set, the pool's protocol must match, or be compatible with + # the listener's protocol. At present, the compatible protocols are `http` and + # `https`. + # - If `https_redirect` is set, the protocol must be `http`. + # @param accept_proxy_protocol [Boolean] 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. + # @param certificate_instance [CertificateInstanceIdentity] The certificate instance to use for SSL termination. The listener must have a + # `protocol` of `https`. + # @param connection_limit [Fixnum] The concurrent connection limit for the listener. If reached, incoming connections + # may be queued or rejected. + # + # Supported for load balancers in the `application` family. + # + # If unspecified, the limit will be `15000` for load balancers in the `application` + # family. + # @param default_pool [LoadBalancerPoolIdentity] The default pool for this listener. If `https_redirect` is specified, the + # default pool will not be used. + # If specified, the pool must: + # + # - Belong to this load balancer. + # - Have the same `protocol` as this listener, or have a compatible protocol. + # At present, the compatible protocols are `http` and `https`. + # - Not already be the `default_pool` for another listener. + # + # If unspecified, this listener will be created with no default pool, but one may be + # subsequently set. + # @param https_redirect [LoadBalancerListenerHTTPSRedirectPrototype] The target listener that requests will be redirected to if none of the listener's + # `policies` match. + # + # If specified, this listener must have a `protocol` of `http`, and the target + # listener must have a `protocol` of `https`. + # @param idle_connection_timeout [Fixnum] The idle connection timeout of the listener in seconds. + # + # Supported for load balancers in the `application` family. + # + # If unspecified, the timeout will be `50` for load balancers in the `application` + # family. + # @param policies [Array[LoadBalancerListenerPolicyPrototype]] The policy prototype objects for this listener. The load balancer must be in the + # `application` family. + # @param port [Fixnum] The listener port number. Each listener in the load balancer must have a + # non-overlapping port range and `protocol` combination. Protocol values of `tcp`, + # `http` and `https` share the TCP port space. + # + # If `port_min` is also specified, `port` must have the same value as `port_min`. + # @param port_max [Fixnum] The inclusive upper bound of the range of ports used by this listener. Must not be + # less than `port_min`. + # + # Only network load balancers with `route_mode`, `is_public` or `is_private_path` + # set to + # `true` support different values for `port_min` and `port_max`. If `route_mode` is + # set to `true`, the value must be `65535`. + # + # The specified port range must not overlap with port ranges used by other listeners + # for this load balancer using the same protocol. Protocol values of `tcp`, `http` + # and + # `https` share the TCP port space. + # @param port_min [Fixnum] The inclusive lower bound of the range of ports used by this listener. Must not be + # greater than `port_max`. + # + # If specified, `port_max` must also be specified, and must not be smaller. If + # unspecified, `port_max` must also be unspecified. + # + # If `port` is also specified, `port_min` must have the same value as `port`. + # + # Only network load balancers with `route_mode`, `is_public` or `is_private_path` + # set to + # `true` support different values for `port_min` and `port_max`. If `route_mode` is + # set to `true`, the value must be `1`. + # + # The specified port range must not overlap with port ranges used by other listeners + # for this load balancer using the same protocol. Protocol values of `tcp`, `http` + # and + # `https` share the TCP port space. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method delete_load_balancer_listener(load_balancer_id:, id:) + # 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. + # @param load_balancer_id [String] The load balancer identifier. + # @param id [String] The listener identifier. + # @return [nil] + 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 + + ## + # @!method get_load_balancer_listener(load_balancer_id:, id:) + # Retrieve a load balancer listener. + # This request retrieves a single listener specified by the identifier in the URL + # path. + # @param load_balancer_id [String] The load balancer identifier. + # @param id [String] The listener identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener_patch:) + # Update a load balancer listener. + # This request updates a load balancer listener from a listener patch. + # @param load_balancer_id [String] The load balancer identifier. + # @param id [String] The listener identifier. + # @param load_balancer_listener_patch [Hash] The load balancer listener patch. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method list_load_balancer_listener_policies(load_balancer_id:, listener_id:) + # List policies for a load balancer listener. + # This request lists policies for a load balancer listener. A policy consists of + # rules to match against each incoming request, and an action to apply to the + # request if a rule matches. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action:, priority:, name: nil, rules: nil, target: nil) + # Create a policy for a load balancer listener. + # This request creates a new policy from a load balancer listener policy object. The + # prototype object is structured in the same way as a retrieved policy, and contains + # the information necessary to create the new policy. For this request to succeed, + # the load balancer must be in the `application` family. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param action [String] The policy action: + # - `forward_to_listener`: Requests will be forwarded to the specified + # `target` listener. + # - `forward_to_pool`: Requests will be forwarded to the specified `target` pool. + # - `https_redirect`: Requests will be redirected to the specified + # `target.listener`. + # This listener must have a `protocol` of `http`, and the target listener must + # have a `protocol` of `https`. + # - `redirect`: Requests will be redirected to the specified `target.url` + # - `reject`: Requests will be rejected with a `403` status code. + # @param priority [Fixnum] The priority of the policy. The priority is unique across all policies for this + # load balancer listener. Lower value indicates higher priority. + # @param name [String] 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. + # @param rules [Array[LoadBalancerListenerPolicyRulePrototype]] The rule prototype objects for this policy. + # @param target [LoadBalancerListenerPolicyTargetPrototype] - If `action` is `forward_to_listener`, specify a `LoadBalancerListenerIdentity` + # in this + # load balancer to forward to. + # - If `action` is `forward_to_pool`, use `LoadBalancerPoolIdentity` to specify a + # pool in + # this load balancer to forward to. + # - If `action` is `https_redirect`, use + # `LoadBalancerListenerPolicyHTTPSRedirectPrototype` to specify a listener on this + # load balancer to redirect to. + # - If `action` is `redirect`, use + # `LoadBalancerListenerPolicyRedirectURLPrototype`to + # specify a URL to redirect to. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method delete_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) + # Delete a load balancer listener policy. + # Deletes a policy of the load balancer listener. This operation cannot be reversed. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param id [String] The policy identifier. + # @return [nil] + 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 + + ## + # @!method get_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) + # Retrieve a load balancer listener policy. + # Retrieve a single policy specified by the identifier in the URL path. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param id [String] The policy identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method update_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:, load_balancer_listener_policy_patch:) + # Update a load balancer listener policy. + # This request updates a load balancer listener policy with the information in a + # provided policy patch. The policy patch object is structured in the same way as a + # retrieved policy and contains only the information to be updated. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param id [String] The policy identifier. + # @param load_balancer_listener_policy_patch [Hash] The listener policy patch. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method list_load_balancer_listener_policy_rules(load_balancer_id:, listener_id:, policy_id:) + # List rules of a load balancer listener policy. + # This request lists rules of a load balancer listener policy. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param policy_id [String] The policy identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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 + + ## + # @!method create_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, condition:, type:, value:, field: nil) + # Create a rule for a load balancer listener policy. + # Creates a new rule for the load balancer listener policy. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param policy_id [String] The policy identifier. + # @param condition [String] The condition for the rule. + # @param type [String] The content the rule applies to: + # - `body`: The UTF-8 form-encoded HTTP request body + # - `header`: The HTTP header + # - `hostname`: The fully-qualified domain name of the server specified in the Host + # HTTP request header + # - `path`: The path of the HTTP request + # - `query`: The query of the HTTP request URL + # - `sni_hostname`: The fully-qualified domain name of the server provided in the + # "server name indicator" extension during TLS negotiation + # + # - For listeners with `protocol` `http` or `https`, any type may be specified. + # - For listeners with `protocol` `tcp`, only type `sni_hostname` may be specified. + # @param value [String] The value to be matched for the rule condition. + # + # If the rule type is `query` and the rule condition is not `matches_regex`, the + # value must be percent-encoded. + # @param field [String] The field to match for this rule. + # - If the `type` is `header`, this property must be specified. + # - If the `type` is `body` or `query`, this property may be specified. + # - For all other types, this property must not be specified. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("id must be provided") if id.nil? + raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil? - raise ArgumentError.new("load_balancer_patch must be provided") if load_balancer_patch.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 = { - "If-Match" => if_match } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_listener_policy_rule") headers.merge!(sdk_headers) params = { @@ -15567,38 +17906,96 @@ def update_load_balancer(id:, load_balancer_patch:, if_match: nil) "generation" => @generation } - data = load_balancer_patch - headers["Content-Type"] = "application/merge-patch+json" + data = { + "condition" => condition, + "type" => type, + "value" => value, + "field" => field + } - method_url = "/load_balancers/%s" % [ERB::Util.url_encode(id)] + 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: "PATCH", + method: "POST", url: method_url, headers: headers, params: params, - data: data, + json: data, accept_json: true ) response end ## - # @!method get_load_balancer_statistics(id:) - # List statistics of a load balancer. - # This request lists statistics of a load balancer. - # @param id [String] The load balancer identifier. + # @!method delete_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:) + # Delete a load balancer listener policy rule. + # Deletes a rule from the load balancer listener policy. This operation cannot be + # reversed. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param policy_id [String] The policy identifier. + # @param id [String] The rule identifier. + # @return [nil] + 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 + + ## + # @!method get_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:) + # Retrieve a load balancer listener policy rule. + # Retrieves a single rule specified by the identifier in the URL path. + # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param policy_id [String] The policy identifier. + # @param id [String] The rule identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_load_balancer_statistics(id:) + 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_statistics") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_listener_policy_rule") headers.merge!(sdk_headers) params = { @@ -15606,7 +18003,7 @@ def get_load_balancer_statistics(id:) "generation" => @generation } - method_url = "/load_balancers/%s/statistics" % [ERB::Util.url_encode(id)] + 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", @@ -15619,21 +18016,33 @@ def get_load_balancer_statistics(id:) end ## - # @!method list_load_balancer_listeners(load_balancer_id:) - # List listeners for a load balancer. - # This request lists listeners for a load balancer. + # @!method update_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:, load_balancer_listener_policy_rule_patch:) + # Update a load balancer listener policy rule. + # Updates a rule of the load balancer listener policy. # @param load_balancer_id [String] The load balancer identifier. + # @param listener_id [String] The listener identifier. + # @param policy_id [String] The policy identifier. + # @param id [String] The rule identifier. + # @param load_balancer_listener_policy_rule_patch [Hash] The listener policy rule patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_load_balancer_listeners(load_balancer_id:) + 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", "list_load_balancer_listeners") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer_listener_policy_rule") headers.merge!(sdk_headers) params = { @@ -15641,7 +18050,46 @@ def list_load_balancer_listeners(load_balancer_id:) "generation" => @generation } - method_url = "/load_balancers/%s/listeners" % [ERB::Util.url_encode(load_balancer_id)] + 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 + + ## + # @!method list_load_balancer_pools(load_balancer_id:) + # List pools of a load balancer. + # This request lists pools of a load balancer. + # @param load_balancer_id [String] The load balancer identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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", @@ -15654,90 +18102,70 @@ def list_load_balancer_listeners(load_balancer_id:) end ## - # @!method 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) - # Create a listener for a load balancer. - # This request creates a new listener for a load balancer. + # @!method create_load_balancer_pool(load_balancer_id:, algorithm:, health_monitor:, protocol:, failsafe_policy: nil, members: nil, name: nil, proxy_protocol: nil, session_persistence: nil) + # Create a load balancer pool. + # This request creates a new pool from a pool prototype object. # @param load_balancer_id [String] The load balancer identifier. - # @param protocol [String] 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`. - # @param accept_proxy_protocol [Boolean] 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. - # @param certificate_instance [CertificateInstanceIdentity] The certificate instance to use for SSL termination. The listener must have a - # `protocol` of `https`. - # @param connection_limit [Fixnum] The connection limit of the listener. - # @param default_pool [LoadBalancerPoolIdentity] The default pool for this listener. If `https_redirect` is specified, the - # default pool will not be used. - # If specified, the pool must: - # - # - Belong to this load balancer. - # - Have the same `protocol` as this listener, or have a compatible protocol. - # At present, the compatible protocols are `http` and `https`. - # - Not already be the `default_pool` for another listener. - # - # If unspecified, this listener will be created with no default pool, but one may be - # subsequently set. - # @param https_redirect [LoadBalancerListenerHTTPSRedirectPrototype] The target listener that requests will be redirected to if none of the listener's - # `policies` match. + # @param algorithm [String] The load balancing algorithm. The `least_connections` algorithm is only supported + # for load balancers that have `availability` with value `subnet` in the profile. + # @param health_monitor [LoadBalancerPoolHealthMonitorPrototype] The health monitor of this pool. # - # If specified, this listener must have a `protocol` of `http`, and the target - # listener must have a `protocol` of `https`. - # @param idle_connection_timeout [Fixnum] The idle connection timeout of the listener in seconds. Supported for load - # balancers in the `application` family. - # @param policies [Array[LoadBalancerListenerPolicyPrototype]] The policy prototype objects for this listener. The load balancer must be in the - # `application` family. - # @param port [Fixnum] 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. + # If this pool has a member targeting a load balancer then: # - # Not supported for load balancers operating with route mode enabled. - # @param port_max [Fixnum] The inclusive upper bound of the range of ports used by this listener. Must not be - # less than `port_min`. + # - If the targeted load balancer has multiple subnets, this health monitor will be + # used to direct traffic to the available subnets. + # - The health checks spawned by this health monitor will be handled as any other + # traffic (that is, subject to the configuration of listeners and pools on the + # target + # load balancer). + # - This health monitor does not affect how pool member health is determined within + # the + # target load balancer. # - # 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. + # For more information, see [Private Path network load balancer frequently asked + # questions](https://cloud.ibm.com/docs/vpc?topic=vpc-nlb-faqs#ppnlb-faqs). + # @param protocol [String] The protocol used for this load balancer pool. Load balancers in the `network` + # family support `tcp` and `udp` (if `udp_supported` is `true`). Load balancers in + # the + # `application` family support `tcp`, `http`, and `https`. + # @param failsafe_policy [LoadBalancerPoolFailsafePolicyPrototype] The failsafe policy to use for this pool. # - # The specified port range must not overlap with port ranges used by other listeners - # for this load balancer using the same protocol. - # @param port_min [Fixnum] The inclusive lower bound of the range of ports used by this listener. Must not be - # greater than `port_max`. + # If unspecified, the default failsafe policy action from the profile will be used. + # @param members [Array[LoadBalancerPoolMemberPrototype]] 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. + # @param name [String] 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. + # @param proxy_protocol [String] 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 # - # 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. + # For load balancers in the `network` family, this property must be `disabled`. + # @param session_persistence [LoadBalancerPoolSessionPersistencePrototype] The session persistence of this pool. If specified, the load balancer must have + # `source_ip_session_persistence_supported` set to `true` in its profile. # - # The specified port range must not overlap with port ranges used by other listeners - # for this load balancer using the same protocol. + # If unspecified, session persistence will be disabled, and traffic will be + # distributed + # across members of the pool. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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) + def create_load_balancer_pool(load_balancer_id:, algorithm:, health_monitor:, protocol:, failsafe_policy: nil, members: nil, name: nil, proxy_protocol: nil, session_persistence: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? raise ArgumentError.new("load_balancer_id must be provided") if load_balancer_id.nil? + raise ArgumentError.new("algorithm must be provided") if algorithm.nil? + + raise ArgumentError.new("health_monitor must be provided") if health_monitor.nil? + raise ArgumentError.new("protocol must be provided") if protocol.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_listener") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_pool") headers.merge!(sdk_headers) params = { @@ -15746,20 +18174,17 @@ def create_load_balancer_listener(load_balancer_id:, protocol:, accept_proxy_pro } data = { + "algorithm" => algorithm, + "health_monitor" => health_monitor, "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 + "failsafe_policy" => failsafe_policy, + "members" => members, + "name" => name, + "proxy_protocol" => proxy_protocol, + "session_persistence" => session_persistence } - method_url = "/load_balancers/%s/listeners" % [ERB::Util.url_encode(load_balancer_id)] + method_url = "/load_balancers/%s/pools" % [ERB::Util.url_encode(load_balancer_id)] response = request( method: "POST", @@ -15773,15 +18198,15 @@ def create_load_balancer_listener(load_balancer_id:, protocol:, accept_proxy_pro end ## - # @!method delete_load_balancer_listener(load_balancer_id:, id:) - # 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. + # @!method delete_load_balancer_pool(load_balancer_id:, id:) + # Delete a load balancer pool. + # This request deletes a load balancer pool. This operation cannot be reversed. The + # pool must not currently be the default pool for any listener in the load balancer, + # nor be the target pool in the failsafe policy for any other pool. # @param load_balancer_id [String] The load balancer identifier. - # @param id [String] The listener identifier. + # @param id [String] The pool identifier. # @return [nil] - def delete_load_balancer_listener(load_balancer_id:, id:) + 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? @@ -15792,7 +18217,7 @@ def delete_load_balancer_listener(load_balancer_id:, id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_listener") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_pool") headers.merge!(sdk_headers) params = { @@ -15800,7 +18225,7 @@ def delete_load_balancer_listener(load_balancer_id:, id:) "generation" => @generation } - method_url = "/load_balancers/%s/listeners/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)] + method_url = "/load_balancers/%s/pools/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)] request( method: "DELETE", @@ -15813,14 +18238,13 @@ def delete_load_balancer_listener(load_balancer_id:, id:) end ## - # @!method get_load_balancer_listener(load_balancer_id:, id:) - # Retrieve a load balancer listener. - # This request retrieves a single listener specified by the identifier in the URL - # path. + # @!method get_load_balancer_pool(load_balancer_id:, id:) + # Retrieve a load balancer pool. + # This request retrieves a single pool specified by the identifier in the URL path. # @param load_balancer_id [String] The load balancer identifier. - # @param id [String] The listener identifier. + # @param id [String] The pool identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_load_balancer_listener(load_balancer_id:, id:) + 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? @@ -15831,7 +18255,7 @@ def get_load_balancer_listener(load_balancer_id:, id:) headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_listener") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_pool") headers.merge!(sdk_headers) params = { @@ -15839,7 +18263,7 @@ def get_load_balancer_listener(load_balancer_id:, id:) "generation" => @generation } - method_url = "/load_balancers/%s/listeners/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)] + method_url = "/load_balancers/%s/pools/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -15852,14 +18276,14 @@ def get_load_balancer_listener(load_balancer_id:, id:) end ## - # @!method update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener_patch:) - # Update a load balancer listener. - # This request updates a load balancer listener from a listener patch. + # @!method update_load_balancer_pool(load_balancer_id:, id:, load_balancer_pool_patch:) + # Update a load balancer pool. + # This request updates a load balancer pool from a pool patch. # @param load_balancer_id [String] The load balancer identifier. - # @param id [String] The listener identifier. - # @param load_balancer_listener_patch [Hash] The load balancer listener patch. + # @param id [String] The pool identifier. + # @param load_balancer_pool_patch [Hash] The load balancer pool patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener_patch:) + 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? @@ -15868,11 +18292,11 @@ def update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener 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? + 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_listener") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer_pool") headers.merge!(sdk_headers) params = { @@ -15880,10 +18304,10 @@ def update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener "generation" => @generation } - data = load_balancer_listener_patch + data = load_balancer_pool_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)] + method_url = "/load_balancers/%s/pools/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -15897,26 +18321,24 @@ def update_load_balancer_listener(load_balancer_id:, id:, load_balancer_listener end ## - # @!method list_load_balancer_listener_policies(load_balancer_id:, listener_id:) - # List policies for a load balancer listener. - # This request lists policies for a load balancer listener. A policy consists of - # rules to match against each incoming request, and an action to apply to the - # request if a rule matches. + # @!method list_load_balancer_pool_members(load_balancer_id:, pool_id:) + # List members of a load balancer pool. + # This request lists members of a load balancer pool. # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. + # @param pool_id [String] The pool identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_load_balancer_listener_policies(load_balancer_id:, listener_id:) + 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("listener_id must be provided") if listener_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_listener_policies") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancer_pool_members") headers.merge!(sdk_headers) params = { @@ -15924,7 +18346,7 @@ def list_load_balancer_listener_policies(load_balancer_id:, listener_id:) "generation" => @generation } - method_url = "/load_balancers/%s/listeners/%s/policies" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id)] + 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", @@ -15937,55 +18359,59 @@ def list_load_balancer_listener_policies(load_balancer_id:, listener_id:) end ## - # @!method create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action:, priority:, name: nil, rules: nil, target: nil) - # Create a policy for a load balancer listener. - # This request creates a new policy from a load balancer listener policy object. The - # prototype object is structured in the same way as a retrieved policy, and contains - # the information necessary to create the new policy. For this request to succeed, - # the listener must have a `protocol` of `http` or `https`. + # @!method create_load_balancer_pool_member(load_balancer_id:, pool_id:, port:, target:, weight: nil) + # Create a member in a load balancer pool. + # This request creates a new member and adds the member to the pool. + # + # The pool must not already have a member targeting a load balancer. # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param action [String] The policy action. + # @param pool_id [String] The pool identifier. + # @param port [Fixnum] The port the member will receive load balancer traffic on. Applies only to load + # balancer traffic received on a listener with a single port. (If the traffic is + # received on a listener with a port range, the member will receive the traffic on + # the same port the listener received it on.) # - # - `forward`: Requests will be forwarded to the specified `target` pool - # - `https_redirect`: Requests will be redirected to the specified target listener. - # The - # listener must have a `protocol` of `http`, and the target listener must have a - # `protocol` of `https` - # - `redirect`: Requests will be redirected to the specified `target.url` - # - `reject`: Requests will be rejected with a `403` status code + # This port will also be used for health checks unless the `port` property of + # `health_monitor` property is specified. # - # The enumerated values for this property may - # [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the - # future. - # @param priority [Fixnum] Priority of the policy. The priority is unique across all policies for this load - # balancer listener. Lower value indicates higher priority. - # @param name [String] 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. - # @param rules [Array[LoadBalancerListenerPolicyRulePrototype]] The rule prototype objects for this policy. - # @param target [LoadBalancerListenerPolicyTargetPrototype] - If `action` is `forward`, specify a `LoadBalancerPoolIdentity`. - # - If `action` is `https_redirect`, specify a - # `LoadBalancerListenerPolicyHTTPSRedirectPrototype`. - # - If `action` is `redirect`, specify a - # `LoadBalancerListenerPolicyRedirectURLPrototype`. + # The port must be unique across all members for all pools associated with this + # pool's listener. + # + # For load balancers in the `network` family, the same `port` and `target` tuple + # cannot be shared by a pool member of any other load balancer in the same VPC. + # @param target [LoadBalancerPoolMemberTargetPrototype] The pool member target. + # + # If the load balancer has `route_mode` set to `true`, the member must be in a zone + # the load + # balancer has a subnet in. + # + # For load balancers in the `network` family, the same `port` and `target` tuple + # cannot + # be shared by a pool member of any other load balancer in the same VPC. + # @param weight [Fixnum] The weight of the member. + # + # If specified, the pool algorithm must be `weighted_round_robin` and the load + # balancer must be in the `application` family. + # + # If unspecified, the weight will be `50` for load balancers in the `application` + # family. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action:, priority:, name: nil, rules: nil, target: nil) + 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("listener_id must be provided") if listener_id.nil? + raise ArgumentError.new("pool_id must be provided") if pool_id.nil? - raise ArgumentError.new("action must be provided") if action.nil? + raise ArgumentError.new("port must be provided") if port.nil? - raise ArgumentError.new("priority must be provided") if priority.nil? + raise ArgumentError.new("target must be provided") if target.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_listener_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_pool_member") headers.merge!(sdk_headers) params = { @@ -15994,14 +18420,12 @@ def create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action } data = { - "action" => action, - "priority" => priority, - "name" => name, - "rules" => rules, - "target" => target + "port" => port, + "target" => target, + "weight" => weight } - method_url = "/load_balancers/%s/listeners/%s/policies" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(listener_id)] + 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", @@ -16015,27 +18439,28 @@ def create_load_balancer_listener_policy(load_balancer_id:, listener_id:, action end ## - # @!method delete_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) - # Delete a load balancer listener policy. - # Deletes a policy of the load balancer listener. This operation cannot be reversed. + # @!method replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:) + # 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. # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param id [String] The policy identifier. - # @return [nil] - def delete_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) + # @param pool_id [String] The pool identifier. + # @param members [Array[LoadBalancerPoolMemberPrototype]] The member prototype objects for this pool. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("listener_id must be provided") if listener_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("members must be provided") if members.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_listener_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "replace_load_balancer_pool_members") headers.merge!(sdk_headers) params = { @@ -16043,40 +18468,45 @@ def delete_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) "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)] + data = { + "members" => members + } - request( - method: "DELETE", + 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, - accept_json: false + json: data, + accept_json: true ) - nil + response end ## - # @!method get_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) - # Retrieve a load balancer listener policy. - # Retrieve a single policy specified by the identifier in the URL path. + # @!method delete_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) + # Delete a load balancer pool member. + # This request deletes a member from the pool. This operation cannot be reversed. # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param id [String] The policy identifier. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) + # @param pool_id [String] The pool identifier. + # @param id [String] The member identifier. + # @return [nil] + 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("listener_id must be provided") if listener_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_listener_policy") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_pool_member") headers.merge!(sdk_headers) params = { @@ -16084,45 +18514,41 @@ def get_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:) "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)] + 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", + request( + method: "DELETE", url: method_url, headers: headers, params: params, - accept_json: true + accept_json: false ) - response + nil end ## - # @!method update_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:, load_balancer_listener_policy_patch:) - # Update a load balancer listener policy. - # This request updates a load balancer listener policy with the information in a - # provided policy patch. The policy patch object is structured in the same way as a - # retrieved policy and contains only the information to be updated. + # @!method get_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) + # Retrieve a load balancer pool member. + # This request retrieves a single member specified by the identifier in the URL + # path. # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param id [String] The policy identifier. - # @param load_balancer_listener_policy_patch [Hash] The listener policy patch. + # @param pool_id [String] The pool identifier. + # @param id [String] The member identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:, load_balancer_listener_policy_patch:) + 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("listener_id must be provided") if listener_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_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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_pool_member") headers.merge!(sdk_headers) params = { @@ -16130,44 +18556,43 @@ def update_load_balancer_listener_policy(load_balancer_id:, listener_id:, id:, l "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)] + 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", + method: "GET", url: method_url, headers: headers, params: params, - data: data, accept_json: true ) response end ## - # @!method list_load_balancer_listener_policy_rules(load_balancer_id:, listener_id:, policy_id:) - # List rules of a load balancer listener policy. - # This request lists rules of a load balancer listener policy. - # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param policy_id [String] The policy identifier. + # @!method update_load_balancer_pool_member(load_balancer_id:, pool_id:, id:, load_balancer_pool_member_patch:) + # Update a load balancer pool member. + # This request updates an existing member from a member patch. + # @param load_balancer_id [String] The load balancer identifier. + # @param pool_id [String] The pool identifier. + # @param id [String] The member identifier. + # @param load_balancer_pool_member_patch [Hash] The load balancer pool member patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_load_balancer_listener_policy_rules(load_balancer_id:, listener_id:, policy_id:) + 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("listener_id must be provided") if listener_id.nil? + raise ArgumentError.new("pool_id must be provided") if pool_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_pool_member_patch must be provided") if load_balancer_pool_member_patch.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_load_balancer_listener_policy_rules") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_load_balancer_pool_member") headers.merge!(sdk_headers) params = { @@ -16175,117 +18600,124 @@ def list_load_balancer_listener_policy_rules(load_balancer_id:, listener_id:, po "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)] + 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: "GET", + method: "PATCH", url: method_url, headers: headers, params: params, + data: data, accept_json: true ) response end + ######################### + # Endpoint gateways + ######################### ## - # @!method create_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, condition:, type:, value:, field: nil) - # Create a rule for a load balancer listener policy. - # Creates a new rule for the load balancer listener policy. - # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param policy_id [String] The policy identifier. - # @param condition [String] The condition of the rule. - # @param type [String] The type of the rule. - # - # Body rules are applied to form-encoded request bodies using the `UTF-8` character - # set. - # @param value [String] 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. - # @param field [String] 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. + # @!method list_endpoint_gateways(name: nil, start: nil, limit: nil, resource_group_id: nil, lifecycle_state: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, allow_dns_resolution_binding: nil) + # List endpoint gateways. + # This request lists endpoint gateways in the region. An endpoint gateway maps one + # or more reserved IPs in a VPC to a target outside the VPC. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. + # @param lifecycle_state [Array[String]] Filters the collection to resources with a `lifecycle_state` property matching one + # of the specified comma-separated values. + # @param vpc_id [String] Filters the collection to resources with a `vpc.id` property matching the + # specified identifier. + # @param vpc_crn [String] Filters the collection to resources with a `vpc.crn` property matching the + # specified CRN. + # @param vpc_name [String] Filters the collection to resources with a `vpc.name` property matching the exact + # specified name. + # @param allow_dns_resolution_binding [Boolean] Filters the collection to endpoint gateways with an `allow_dns_resolution_binding` + # property matching the specified value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, condition:, type:, value:, field: nil) + def list_endpoint_gateways(name: nil, start: nil, limit: nil, resource_group_id: nil, lifecycle_state: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil, allow_dns_resolution_binding: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - 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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_endpoint_gateways") headers.merge!(sdk_headers) + lifecycle_state *= "," unless lifecycle_state.nil? params = { "version" => @version, - "generation" => @generation - } - - data = { - "condition" => condition, - "type" => type, - "value" => value, - "field" => field + "generation" => @generation, + "name" => name, + "start" => start, + "limit" => limit, + "resource_group.id" => resource_group_id, + "lifecycle_state" => lifecycle_state, + "vpc.id" => vpc_id, + "vpc.crn" => vpc_crn, + "vpc.name" => vpc_name, + "allow_dns_resolution_binding" => allow_dns_resolution_binding } - method_url = "/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)] + method_url = "/endpoint_gateways" response = request( - method: "POST", + method: "GET", url: method_url, headers: headers, params: params, - json: data, accept_json: true ) response end ## - # @!method delete_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:) - # Delete a load balancer listener policy rule. - # Deletes a rule from the load balancer listener policy. This operation cannot be - # reversed. - # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param policy_id [String] The policy identifier. - # @param id [String] The rule identifier. - # @return [nil] - def delete_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:) + # @!method create_endpoint_gateway(target:, vpc:, allow_dns_resolution_binding: nil, ips: nil, name: nil, resource_group: nil, security_groups: nil) + # 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. + # @param target [EndpointGatewayTargetPrototype] The target to use for this endpoint gateway. The target: + # - Must not already be the target of another endpoint gateway in the VPC + # - Must not have a service endpoint that duplicates or overlaps with any + # `service_endpoints` + # of another endpoint gateway in the VPC. + # @param vpc [VPCIdentity] The VPC this endpoint gateway will reside in. + # @param allow_dns_resolution_binding [Boolean] 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`. + # @param ips [Array[EndpointGatewayReservedIP]] The reserved IPs to bind to this endpoint gateway. At most one reserved IP per + # zone is allowed. + # @param name [String] 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. + # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource + # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. + # @param security_groups [Array[SecurityGroupIdentity]] The security groups to use for this endpoint gateway. If unspecified, the VPC's + # default security group is used. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + 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("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("target must be provided") if target.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("vpc must be provided") if vpc.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_load_balancer_listener_policy_rule") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_endpoint_gateway") headers.merge!(sdk_headers) params = { @@ -16293,51 +18725,63 @@ def delete_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, p "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)] + 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 + } - request( - method: "DELETE", + method_url = "/endpoint_gateways" + + response = request( + method: "POST", url: method_url, headers: headers, params: params, - accept_json: false + json: data, + accept_json: true ) - nil + response end ## - # @!method get_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:) - # Retrieve a load balancer listener policy rule. - # Retrieves a single rule specified by the identifier in the URL path. - # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param policy_id [String] The policy identifier. - # @param id [String] The rule identifier. + # @!method list_endpoint_gateway_ips(endpoint_gateway_id:, start: nil, limit: nil, sort: nil) + # List reserved IPs bound to an endpoint gateway. + # This request lists reserved IPs bound to an endpoint gateway. + # @param endpoint_gateway_id [String] The endpoint gateway identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param sort [String] 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. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:) + 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("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("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_load_balancer_listener_policy_rule") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_endpoint_gateway_ips") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "generation" => @generation, + "start" => start, + "limit" => limit, + "sort" => sort } - 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)] + method_url = "/endpoint_gateways/%s/ips" % [ERB::Util.url_encode(endpoint_gateway_id)] response = request( method: "GET", @@ -16350,33 +18794,26 @@ def get_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, poli end ## - # @!method update_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:, load_balancer_listener_policy_rule_patch:) - # Update a load balancer listener policy rule. - # Updates a rule of the load balancer listener policy. - # @param load_balancer_id [String] The load balancer identifier. - # @param listener_id [String] The listener identifier. - # @param policy_id [String] The policy identifier. - # @param id [String] The rule identifier. - # @param load_balancer_listener_policy_rule_patch [Hash] The listener policy rule patch. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, policy_id:, id:, load_balancer_listener_policy_rule_patch:) + # @!method remove_endpoint_gateway_ip(endpoint_gateway_id:, id:) + # 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. + # @param endpoint_gateway_id [String] The endpoint gateway identifier. + # @param id [String] The reserved IP identifier. + # @return [nil] + 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("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("endpoint_gateway_id must be provided") if endpoint_gateway_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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_endpoint_gateway_ip") headers.merge!(sdk_headers) params = { @@ -16384,38 +18821,38 @@ def update_load_balancer_listener_policy_rule(load_balancer_id:, listener_id:, p "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)] + method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)] - response = request( - method: "PATCH", + request( + method: "DELETE", url: method_url, headers: headers, params: params, - data: data, - accept_json: true + accept_json: false ) - response + nil end ## - # @!method list_load_balancer_pools(load_balancer_id:) - # List pools of a load balancer. - # This request lists pools of a load balancer. - # @param load_balancer_id [String] The load balancer identifier. + # @!method get_endpoint_gateway_ip(endpoint_gateway_id:, id:) + # 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. + # @param endpoint_gateway_id [String] The endpoint gateway identifier. + # @param id [String] The reserved IP identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_load_balancer_pools(load_balancer_id:) + 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("load_balancer_id must be provided") if load_balancer_id.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", "list_load_balancer_pools") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_endpoint_gateway_ip") headers.merge!(sdk_headers) params = { @@ -16423,7 +18860,7 @@ def list_load_balancer_pools(load_balancer_id:) "generation" => @generation } - method_url = "/load_balancers/%s/pools" % [ERB::Util.url_encode(load_balancer_id)] + method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -16436,49 +18873,29 @@ def list_load_balancer_pools(load_balancer_id:) end ## - # @!method create_load_balancer_pool(load_balancer_id:, algorithm:, health_monitor:, protocol:, members: nil, name: nil, proxy_protocol: nil, session_persistence: nil) - # Create a load balancer pool. - # This request creates a new pool from a pool prototype object. - # @param load_balancer_id [String] The load balancer identifier. - # @param algorithm [String] The load balancing algorithm. - # @param health_monitor [LoadBalancerPoolHealthMonitorPrototype] The health monitor of this pool. - # @param protocol [String] The protocol used for this load balancer pool. Load balancers in the `network` - # family support `tcp` and `udp` (if `udp_supported` is `true`). Load balancers in - # the - # `application` family support `tcp`, `http`, and `https`. - # @param members [Array[LoadBalancerPoolMemberPrototype]] 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. - # @param name [String] 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. - # @param proxy_protocol [String] 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 + # @!method add_endpoint_gateway_ip(endpoint_gateway_id:, id:) + # Bind a reserved IP to an endpoint gateway. + # This request binds the specified reserved IP to the specified endpoint gateway. + # The reserved IP: # - # Supported by load balancers in the `application` family (otherwise always - # `disabled`). - # @param session_persistence [LoadBalancerPoolSessionPersistencePrototype] The session persistence of this pool. If unspecified, session persistence will be - # disabled, and traffic will be distributed across backend server members of the - # pool. + # - 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. + # @param endpoint_gateway_id [String] The endpoint gateway identifier. + # @param id [String] The reserved IP identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_load_balancer_pool(load_balancer_id:, algorithm:, health_monitor:, protocol:, members: nil, name: nil, proxy_protocol: nil, session_persistence: nil) + 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("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("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil? - raise ArgumentError.new("protocol must be provided") if protocol.nil? + raise ArgumentError.new("id must be provided") if id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_load_balancer_pool") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_endpoint_gateway_ip") headers.merge!(sdk_headers) params = { @@ -16486,49 +18903,37 @@ def create_load_balancer_pool(load_balancer_id:, algorithm:, health_monitor:, pr "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)] + method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)] response = request( - method: "POST", + method: "PUT", url: method_url, headers: headers, params: params, - json: data, accept_json: true ) response end ## - # @!method delete_load_balancer_pool(load_balancer_id:, id:) - # 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. - # @param load_balancer_id [String] The load balancer identifier. - # @param id [String] The pool identifier. + # @!method delete_endpoint_gateway(id:) + # 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. + # @param id [String] The endpoint gateway identifier. # @return [nil] - def delete_load_balancer_pool(load_balancer_id:, id:) + 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("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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_endpoint_gateway") headers.merge!(sdk_headers) params = { @@ -16536,7 +18941,7 @@ def delete_load_balancer_pool(load_balancer_id:, id:) "generation" => @generation } - method_url = "/load_balancers/%s/pools/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)] + method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)] request( method: "DELETE", @@ -16549,24 +18954,22 @@ def delete_load_balancer_pool(load_balancer_id:, id:) end ## - # @!method get_load_balancer_pool(load_balancer_id:, id:) - # Retrieve a load balancer pool. - # This request retrieves a single pool specified by the identifier in the URL path. - # @param load_balancer_id [String] The load balancer identifier. - # @param id [String] The pool identifier. + # @!method get_endpoint_gateway(id:) + # Retrieve an endpoint gateway. + # This request retrieves a single endpoint gateway specified by the identifier in + # the URL. + # @param id [String] The endpoint gateway identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_load_balancer_pool(load_balancer_id:, id:) + 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("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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_endpoint_gateway") headers.merge!(sdk_headers) params = { @@ -16574,7 +18977,7 @@ def get_load_balancer_pool(load_balancer_id:, id:) "generation" => @generation } - method_url = "/load_balancers/%s/pools/%s" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(id)] + method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -16587,27 +18990,24 @@ def get_load_balancer_pool(load_balancer_id:, id:) end ## - # @!method update_load_balancer_pool(load_balancer_id:, id:, load_balancer_pool_patch:) - # Update a load balancer pool. - # This request updates a load balancer pool from a pool patch. - # @param load_balancer_id [String] The load balancer identifier. - # @param id [String] The pool identifier. - # @param load_balancer_pool_patch [Hash] The load balancer pool patch. + # @!method update_endpoint_gateway(id:, endpoint_gateway_patch:) + # Update an endpoint gateway. + # This request updates an endpoint gateway's name. + # @param id [String] The endpoint gateway identifier. + # @param endpoint_gateway_patch [Hash] The endpoint gateway patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_load_balancer_pool(load_balancer_id:, id:, load_balancer_pool_patch:) + 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("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? + 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_load_balancer_pool") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_endpoint_gateway") headers.merge!(sdk_headers) params = { @@ -16615,10 +19015,10 @@ def update_load_balancer_pool(load_balancer_id:, id:, load_balancer_pool_patch:) "generation" => @generation } - data = load_balancer_pool_patch + data = endpoint_gateway_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)] + method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -16630,34 +19030,61 @@ def update_load_balancer_pool(load_balancer_id:, id:, load_balancer_pool_patch:) ) response end + ######################### + # Flow log collectors + ######################### ## - # @!method list_load_balancer_pool_members(load_balancer_id:, pool_id:) - # List members of a load balancer pool. - # This request lists members of a load balancer pool. - # @param load_balancer_id [String] The load balancer identifier. - # @param pool_id [String] The pool identifier. + # @!method 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) + # List flow log collectors. + # This request lists flow log collectors in the region. A [flow log + # collector](https://cloud.ibm.com/docs/vpc?topic=vpc-flow-logs) summarizes TCP and + # UDP data sent over the instance network interfaces and instance network + # attachments contained within its target. The collected flow logs are written to a + # cloud object storage bucket, where they can be + # [viewed](https://cloud.ibm.com/docs/vpc?topic=vpc-fl-analyze). + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching + # the specified identifier. + # @param name [String] Filters the collection to resources with a `name` property matching the exact + # specified name. + # @param vpc_id [String] Filters the collection to resources with a `vpc.id` property matching the + # specified identifier. + # @param vpc_crn [String] Filters the collection to resources with a `vpc.crn` property matching the + # specified CRN. + # @param vpc_name [String] Filters the collection to resources with a `vpc.name` property matching the exact + # specified name. + # @param target_id [String] Filters the collection to resources with a `target.id` property matching the + # specified identifier. + # @param target_resource_type [String] Filters the collection to resources with a `target.resource_type` property + # matching the specified value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_load_balancer_pool_members(load_balancer_id:, pool_id:) + 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? - 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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_flow_log_collectors") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "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 = "/load_balancers/%s/pools/%s/members" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(pool_id)] + method_url = "/flow_log_collectors" response = request( method: "GET", @@ -16670,96 +19097,48 @@ def list_load_balancer_pool_members(load_balancer_id:, pool_id:) end ## - # @!method create_load_balancer_pool_member(load_balancer_id:, pool_id:, port:, target:, weight: nil) - # Create a member in a load balancer pool. - # This request creates a new member and adds the member to the pool. - # @param load_balancer_id [String] The load balancer identifier. - # @param pool_id [String] The pool identifier. - # @param port [Fixnum] The port the member will receive load balancer traffic on. Applies only to load - # balancer traffic received on a listener with a single port. (If the traffic is - # received on a listener with a port range, the member will receive the traffic on - # the same port the listener received it on.) + # @!method create_flow_log_collector(storage_bucket:, target:, active: nil, name: nil, resource_group: nil) + # 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. + # @param storage_bucket [LegacyCloudObjectStorageBucketIdentity] The Cloud Object Storage bucket where the collected flows will be logged. + # The bucket must exist and an IAM service authorization must grant + # `IBM Cloud Flow Logs` resources of `VPC Infrastructure Services` writer + # access to the bucket. For more information, see [Creating a flow log + # collector](https://cloud.ibm.com/docs/vpc?topic=vpc-ordering-flow-log-collector). + # @param target [FlowLogCollectorTargetPrototype] The target this collector will collect flow logs for. # - # This port will also be used for health checks unless the `port` property of - # `health_monitor` property is specified. + # 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 port must be unique across all members for all pools associated with this - # pool's listener. - # @param target [LoadBalancerPoolMemberTargetPrototype] 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. - # @param weight [Fixnum] Weight of the server member. Applicable only if the pool algorithm is - # `weighted_round_robin`. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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 - - ## - # @!method replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:) - # 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. - # @param load_balancer_id [String] The load balancer identifier. - # @param pool_id [String] The pool identifier. - # @param members [Array[LoadBalancerPoolMemberPrototype]] The member prototype objects for this pool. + # 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. + # @param active [Boolean] Indicates whether this collector will be active upon creation. + # @param name [String] 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. + # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource + # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:) + 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("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("storage_bucket must be provided") if storage_bucket.nil? - raise ArgumentError.new("members must be provided") if members.nil? + raise ArgumentError.new("target must be provided") if target.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "replace_load_balancer_pool_members") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_flow_log_collector") headers.merge!(sdk_headers) params = { @@ -16768,13 +19147,17 @@ def replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:) } data = { - "members" => members + "storage_bucket" => storage_bucket, + "target" => target, + "active" => active, + "name" => name, + "resource_group" => resource_group } - method_url = "/load_balancers/%s/pools/%s/members" % [ERB::Util.url_encode(load_balancer_id), ERB::Util.url_encode(pool_id)] + method_url = "/flow_log_collectors" response = request( - method: "PUT", + method: "POST", url: method_url, headers: headers, params: params, @@ -16785,27 +19168,25 @@ def replace_load_balancer_pool_members(load_balancer_id:, pool_id:, members:) end ## - # @!method delete_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) - # Delete a load balancer pool member. - # This request deletes a member from the pool. This operation cannot be reversed. - # @param load_balancer_id [String] The load balancer identifier. - # @param pool_id [String] The pool identifier. - # @param id [String] The member identifier. + # @!method delete_flow_log_collector(id:) + # 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. + # @param id [String] The flow log collector identifier. # @return [nil] - def delete_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) + 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("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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_flow_log_collector") headers.merge!(sdk_headers) params = { @@ -16813,7 +19194,7 @@ def delete_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) "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)] + method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)] request( method: "DELETE", @@ -16826,28 +19207,22 @@ def delete_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) end ## - # @!method get_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) - # Retrieve a load balancer pool member. - # This request retrieves a single member specified by the identifier in the URL - # path. - # @param load_balancer_id [String] The load balancer identifier. - # @param pool_id [String] The pool identifier. - # @param id [String] The member identifier. + # @!method get_flow_log_collector(id:) + # Retrieve a flow log collector. + # This request retrieves a single flow log collector specified by the identifier in + # the URL. + # @param id [String] The flow log collector identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) + 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("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") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_flow_log_collector") headers.merge!(sdk_headers) params = { @@ -16855,7 +19230,7 @@ def get_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) "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)] + method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -16868,30 +19243,27 @@ def get_load_balancer_pool_member(load_balancer_id:, pool_id:, id:) end ## - # @!method update_load_balancer_pool_member(load_balancer_id:, pool_id:, id:, load_balancer_pool_member_patch:) - # Update a load balancer pool member. - # This request updates an existing member from a member patch. - # @param load_balancer_id [String] The load balancer identifier. - # @param pool_id [String] The pool identifier. - # @param id [String] The member identifier. - # @param load_balancer_pool_member_patch [Hash] The load balancer pool member patch. + # @!method update_flow_log_collector(id:, flow_log_collector_patch:) + # 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. + # @param id [String] The flow log collector identifier. + # @param flow_log_collector_patch [Hash] The flow log collector patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_load_balancer_pool_member(load_balancer_id:, pool_id:, id:, load_balancer_pool_member_patch:) + 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("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? + 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_load_balancer_pool_member") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_flow_log_collector") headers.merge!(sdk_headers) params = { @@ -16899,10 +19271,10 @@ def update_load_balancer_pool_member(load_balancer_id:, pool_id:, id:, load_bala "generation" => @generation } - data = load_balancer_pool_member_patch + data = flow_log_collector_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)] + method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -16915,53 +19287,46 @@ def update_load_balancer_pool_member(load_balancer_id:, pool_id:, id:, load_bala response end ######################### - # Endpoint gateways + # Private path service gateways ######################### ## - # @!method 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) - # List endpoint gateways. - # This request lists endpoint gateways in the region. An endpoint gateway maps one - # or more reserved IPs in a VPC to a target outside the VPC. - # @param name [String] Filters the collection to resources with a `name` property matching the exact - # specified name. + # @!method list_private_path_service_gateways(start: nil, limit: nil, resource_group_id: nil) + # List private path service gateways. + # This request lists private path service gateways in the region. Private path + # service gateways allow + # [service + # providers](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components) + # to make their services available using + # [private path + # connectivity](https://cloud.ibm.com/docs/private-path?topic=private-path-private-path-service-architecture#private-path-service-components). + # Private path service gateways are used to facilitate and manage the private path + # connectivity between private path network load balancers and their associated + # endpoint gateways. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching # the specified identifier. - # @param vpc_id [String] Filters the collection to resources with a `vpc.id` property matching the - # specified identifier. - # @param vpc_crn [String] Filters the collection to resources with a `vpc.crn` property matching the - # specified CRN. - # @param vpc_name [String] Filters the collection to resources with a `vpc.name` property matching the exact - # specified name. - # @param allow_dns_resolution_binding [Boolean] Filters the collection to endpoint gateways with an `allow_dns_resolution_binding` - # property matching the specified value. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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) + def list_private_path_service_gateways(start: nil, limit: nil, resource_group_id: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_endpoint_gateways") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_private_path_service_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 + "resource_group.id" => resource_group_id } - method_url = "/endpoint_gateways" + method_url = "/private_path_service_gateways" response = request( method: "GET", @@ -16974,43 +19339,45 @@ def list_endpoint_gateways(name: nil, start: nil, limit: nil, resource_group_id: end ## - # @!method create_endpoint_gateway(target:, vpc:, allow_dns_resolution_binding: nil, ips: nil, name: nil, resource_group: nil, security_groups: nil) - # 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. - # @param target [EndpointGatewayTargetPrototype] The target to use for this endpoint gateway. Must not already be the target of - # another - # endpoint gateway in the VPC. - # @param vpc [VPCIdentity] The VPC this endpoint gateway will reside in. - # @param allow_dns_resolution_binding [Boolean] 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`. + # @!method create_private_path_service_gateway(load_balancer:, service_endpoints:, default_access_policy: nil, name: nil, resource_group: nil, zonal_affinity: nil) + # Create a private path service gateway. + # This request creates a private path service gateway from a private path service + # gateway prototype object. The prototype object is structured in the same way as a + # retrieved private path service gateway, and contains the information necessary to + # create the new private path service gateway. + # @param load_balancer [LoadBalancerIdentity] The load balancer for this private path service gateway. The load balancer must + # have `is_private_path` set to `true`. # - # Must be `true` if the VPC this endpoint gateway resides in has `dns.enable_hub` - # set to - # `true`. - # @param ips [Array[EndpointGatewayReservedIP]] The reserved IPs to bind to this endpoint gateway. At most one reserved IP per - # zone is allowed. - # @param name [String] 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. + # The private path service gateway will reside in the same VPC as the specified load + # balancer. + # @param service_endpoints [Array[String]] The fully qualified domain names for this private path service gateway. Any + # uppercase letters will be converted to lowercase. + # @param default_access_policy [String] The policy to use for bindings from accounts without an explicit account policy. + # @param name [String] The name for this private path service gateway. The name must not be used by + # another private path service gateway in the VPC. If unspecified, the name will be + # a hyphenated list of randomly-selected words. # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. - # @param security_groups [Array[SecurityGroupIdentity]] The security groups to use for this endpoint gateway. If unspecified, the VPC's - # default security group is used. + # @param zonal_affinity [Boolean] Indicates whether this private path service gateway has zonal affinity. + # - `true`: Traffic to the service from a zone the service resides in will remain + # in + # that zone. + # - `false`: Traffic to the service from a zone will be load balanced across all + # zones + # in the region the service resides in. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_endpoint_gateway(target:, vpc:, allow_dns_resolution_binding: nil, ips: nil, name: nil, resource_group: nil, security_groups: nil) + def create_private_path_service_gateway(load_balancer:, service_endpoints:, default_access_policy: nil, name: nil, resource_group: nil, zonal_affinity: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("target must be provided") if target.nil? + raise ArgumentError.new("load_balancer must be provided") if load_balancer.nil? - raise ArgumentError.new("vpc must be provided") if vpc.nil? + raise ArgumentError.new("service_endpoints must be provided") if service_endpoints.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_endpoint_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_private_path_service_gateway") headers.merge!(sdk_headers) params = { @@ -17019,16 +19386,15 @@ def create_endpoint_gateway(target:, vpc:, allow_dns_resolution_binding: nil, ip } data = { - "target" => target, - "vpc" => vpc, - "allow_dns_resolution_binding" => allow_dns_resolution_binding, - "ips" => ips, + "load_balancer" => load_balancer, + "service_endpoints" => service_endpoints, + "default_access_policy" => default_access_policy, "name" => name, "resource_group" => resource_group, - "security_groups" => security_groups + "zonal_affinity" => zonal_affinity } - method_url = "/endpoint_gateways" + method_url = "/private_path_service_gateways" response = request( method: "POST", @@ -17042,39 +19408,67 @@ def create_endpoint_gateway(target:, vpc:, allow_dns_resolution_binding: nil, ip end ## - # @!method list_endpoint_gateway_ips(endpoint_gateway_id:, start: nil, limit: nil, sort: nil) - # List reserved IPs bound to an endpoint gateway. - # This request lists reserved IPs bound to an endpoint gateway. - # @param endpoint_gateway_id [String] The endpoint gateway identifier. - # @param start [String] A server-provided token determining what resource to start the page on. - # @param limit [Fixnum] The number of resources to return on a page. - # @param sort [String] 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. + # @!method delete_private_path_service_gateway(id:) + # Delete a private path service gateway. + # This request deletes a private path service gateway. For this request to succeed, + # the value of `endpoint_gateway_count` must be `0`. This operation cannot be + # reversed. + # @param id [String] The private path service gateway identifier. + # @return [nil] + def delete_private_path_service_gateway(id:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_private_path_service_gateway") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/private_path_service_gateways/%s" % [ERB::Util.url_encode(id)] + + request( + method: "DELETE", + url: method_url, + headers: headers, + params: params, + accept_json: false + ) + nil + end + + ## + # @!method get_private_path_service_gateway(id:) + # Retrieve a private path service gateway. + # This request retrieves the private path service gateway specified by the + # identifier in the URL. + # @param id [String] The private path service gateway identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def list_endpoint_gateway_ips(endpoint_gateway_id:, start: nil, limit: nil, sort: nil) + def get_private_path_service_gateway(id:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("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", "list_endpoint_gateway_ips") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_private_path_service_gateway") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation, - "start" => start, - "limit" => limit, - "sort" => sort + "generation" => @generation } - method_url = "/endpoint_gateways/%s/ips" % [ERB::Util.url_encode(endpoint_gateway_id)] + method_url = "/private_path_service_gateways/%s" % [ERB::Util.url_encode(id)] response = request( method: "GET", @@ -17087,26 +19481,27 @@ def list_endpoint_gateway_ips(endpoint_gateway_id:, start: nil, limit: nil, sort end ## - # @!method remove_endpoint_gateway_ip(endpoint_gateway_id:, id:) - # 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. - # @param endpoint_gateway_id [String] The endpoint gateway identifier. - # @param id [String] The reserved IP identifier. - # @return [nil] - def remove_endpoint_gateway_ip(endpoint_gateway_id:, id:) + # @!method update_private_path_service_gateway(id:, private_path_service_gateway_patch:) + # Update a private path service gateway. + # This request updates a private path service gateway with the information provided + # in a private path service gateway patch object. The private path service gateway + # patch object is structured in the same way as a retrieved private path service + # gateway and contains only the information to be updated. + # @param id [String] The private path service gateway identifier. + # @param private_path_service_gateway_patch [Hash] The private path service gateway patch. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def update_private_path_service_gateway(id:, private_path_service_gateway_patch:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("private_path_service_gateway_patch must be provided") if private_path_service_gateway_patch.nil? + headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "remove_endpoint_gateway_ip") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_private_path_service_gateway") headers.merge!(sdk_headers) params = { @@ -17114,46 +19509,59 @@ def remove_endpoint_gateway_ip(endpoint_gateway_id:, id:) "generation" => @generation } - method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)] + data = private_path_service_gateway_patch + headers["Content-Type"] = "application/merge-patch+json" - request( - method: "DELETE", + method_url = "/private_path_service_gateways/%s" % [ERB::Util.url_encode(id)] + + response = request( + method: "PATCH", url: method_url, headers: headers, params: params, - accept_json: false + data: data, + accept_json: true ) - nil + response end ## - # @!method get_endpoint_gateway_ip(endpoint_gateway_id:, id:) - # 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. - # @param endpoint_gateway_id [String] The endpoint gateway identifier. - # @param id [String] The reserved IP identifier. + # @!method list_private_path_service_gateway_account_policies(private_path_service_gateway_id:, start: nil, limit: nil, account_id: nil) + # List account policies for a private path service gateway. + # This request lists account policies for a private path service gateway. Each + # policy defines how requests to use the private path service gateway from that + # account will be handled. + # + # The account policies will be sorted by their `created_at` property values, with + # newest account policies first. Account policies with identical `created_at` + # property values will in turn be sorted by ascending `id` property values. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param start [String] A server-provided token determining what resource to start the page on. + # @param limit [Fixnum] The number of resources to return on a page. + # @param account_id [String] Filters the collection to resources with an `account.id` property matching the + # specified identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_endpoint_gateway_ip(endpoint_gateway_id:, id:) + def list_private_path_service_gateway_account_policies(private_path_service_gateway_id:, start: nil, limit: nil, account_id: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil? - - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_endpoint_gateway_ip") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_private_path_service_gateway_account_policies") headers.merge!(sdk_headers) params = { "version" => @version, - "generation" => @generation + "generation" => @generation, + "start" => start, + "limit" => limit, + "account.id" => account_id } - method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)] + method_url = "/private_path_service_gateways/%s/account_policies" % [ERB::Util.url_encode(private_path_service_gateway_id)] response = request( method: "GET", @@ -17166,29 +19574,43 @@ def get_endpoint_gateway_ip(endpoint_gateway_id:, id:) end ## - # @!method add_endpoint_gateway_ip(endpoint_gateway_id:, id:) - # 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. - # @param endpoint_gateway_id [String] The endpoint gateway identifier. - # @param id [String] The reserved IP identifier. + # @!method create_private_path_service_gateway_account_policy(private_path_service_gateway_id:, access_policy:, account:) + # Create an account policy for a private path service gateway. + # This request creates an account policy from an account policy prototype object. + # The prototype object is structured in the same way as a retrieved account policy, + # and contains the information necessary to create the new account policy. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param access_policy [String] The access policy for the account: + # - `permit`: access will be permitted + # - `deny`: access will be denied + # - `review`: access will be manually reviewed + # + # - Specifying `review` sets the status of future endpoint gateway bindings from + # this + # account to `pending`. + # - Specifying `permit` updates both the status of `pending` and future endpoint + # gateway + # bindings from this account to `permitted`. + # - Specifying `deny` updates both the status of `pending` and future endpoint + # gateway + # bindings from this account to `denied`. + # @param account [AccountIdentity] The account for this access policy. The account must be unique across all account + # policies for this private path service gateway. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def add_endpoint_gateway_ip(endpoint_gateway_id:, id:) + def create_private_path_service_gateway_account_policy(private_path_service_gateway_id:, access_policy:, account:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("endpoint_gateway_id must be provided") if endpoint_gateway_id.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("access_policy must be provided") if access_policy.nil? + + raise ArgumentError.new("account must be provided") if account.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "add_endpoint_gateway_ip") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_private_path_service_gateway_account_policy") headers.merge!(sdk_headers) params = { @@ -17196,37 +19618,44 @@ def add_endpoint_gateway_ip(endpoint_gateway_id:, id:) "generation" => @generation } - method_url = "/endpoint_gateways/%s/ips/%s" % [ERB::Util.url_encode(endpoint_gateway_id), ERB::Util.url_encode(id)] + data = { + "access_policy" => access_policy, + "account" => account + } + + method_url = "/private_path_service_gateways/%s/account_policies" % [ERB::Util.url_encode(private_path_service_gateway_id)] response = request( - method: "PUT", + method: "POST", url: method_url, headers: headers, params: params, + json: data, accept_json: true ) response end ## - # @!method delete_endpoint_gateway(id:) - # 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. - # @param id [String] The endpoint gateway identifier. + # @!method delete_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:) + # Delete an account policy for a private path service gateway. + # This request deletes an account policy. This operation cannot be reversed and it + # does not affect the `status` of any existing endpoint gateway bindings. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param id [String] The account policy identifier. # @return [nil] - def delete_endpoint_gateway(id:) + def delete_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? + raise ArgumentError.new("id must be provided") if id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_endpoint_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_private_path_service_gateway_account_policy") headers.merge!(sdk_headers) params = { @@ -17234,7 +19663,7 @@ def delete_endpoint_gateway(id:) "generation" => @generation } - method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)] + method_url = "/private_path_service_gateways/%s/account_policies/%s" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)] request( method: "DELETE", @@ -17247,22 +19676,25 @@ def delete_endpoint_gateway(id:) end ## - # @!method get_endpoint_gateway(id:) - # Retrieve an endpoint gateway. - # This request retrieves a single endpoint gateway specified by the identifier in - # the URL. - # @param id [String] The endpoint gateway identifier. + # @!method get_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:) + # Retrieve an account policy for a private path service gateway. + # This request retrieves a single account policy specified by the identifier in the + # URL. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param id [String] The account policy identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_endpoint_gateway(id:) + def get_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? + raise ArgumentError.new("id must be provided") if id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_endpoint_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_private_path_service_gateway_account_policy") headers.merge!(sdk_headers) params = { @@ -17270,7 +19702,7 @@ def get_endpoint_gateway(id:) "generation" => @generation } - method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)] + method_url = "/private_path_service_gateways/%s/account_policies/%s" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)] response = request( method: "GET", @@ -17283,24 +19715,29 @@ def get_endpoint_gateway(id:) end ## - # @!method update_endpoint_gateway(id:, endpoint_gateway_patch:) - # Update an endpoint gateway. - # This request updates an endpoint gateway's name. - # @param id [String] The endpoint gateway identifier. - # @param endpoint_gateway_patch [Hash] The endpoint gateway patch. + # @!method update_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:, private_path_service_gateway_account_policy_patch:) + # Update an account policy for a private path service gateway. + # This request updates an account policy with the information in a provided account + # policy patch. The account policy patch object is structured in the same way as a + # retrieved account policy and contains only the information to be updated. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param id [String] The account policy identifier. + # @param private_path_service_gateway_account_policy_patch [Hash] The account policy patch. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_endpoint_gateway(id:, endpoint_gateway_patch:) + def update_private_path_service_gateway_account_policy(private_path_service_gateway_id:, id:, private_path_service_gateway_account_policy_patch:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? + raise ArgumentError.new("id must be provided") if id.nil? - raise ArgumentError.new("endpoint_gateway_patch must be provided") if endpoint_gateway_patch.nil? + raise ArgumentError.new("private_path_service_gateway_account_policy_patch must be provided") if private_path_service_gateway_account_policy_patch.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_endpoint_gateway") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_private_path_service_gateway_account_policy") headers.merge!(sdk_headers) params = { @@ -17308,10 +19745,10 @@ def update_endpoint_gateway(id:, endpoint_gateway_patch:) "generation" => @generation } - data = endpoint_gateway_patch + data = private_path_service_gateway_account_policy_patch headers["Content-Type"] = "application/merge-patch+json" - method_url = "/endpoint_gateways/%s" % [ERB::Util.url_encode(id)] + method_url = "/private_path_service_gateways/%s/account_policies/%s" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)] response = request( method: "PATCH", @@ -17323,44 +19760,39 @@ def update_endpoint_gateway(id:, endpoint_gateway_patch:) ) response end - ######################### - # Flow log collectors - ######################### ## - # @!method 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) - # List flow log collectors. - # This request lists flow log collectors in the region. A [flow log - # collector](https://cloud.ibm.com/docs/vpc?topic=vpc-flow-logs) summarizes data - # sent over the instance network interfaces and instance network attachments - # contained within its target. The collected flow logs are written to a cloud object - # storage bucket, where they can be - # [viewed](https://cloud.ibm.com/docs/vpc?topic=vpc-fl-analyze). + # @!method list_private_path_service_gateway_endpoint_gateway_bindings(private_path_service_gateway_id:, start: nil, limit: nil, status: nil, account_id: nil) + # List endpoint gateway bindings for a private path service gateway. + # This request lists endpoint gateway bindings for a private path service gateway. + # Each endpoint gateway binding is implicitly created when an endpoint gateway is + # created targeting the private path service gateway. The associated account policy + # is applied to all new endpoint gateway bindings. If an associated account policy + # doesn't exist, the private path service gateway's `default_access_policy` is used. + # + # The endpoint gateway bindings will be sorted by their `created_at` property + # values, with newest endpoint gateway bindings first. Endpoint gateway bindings + # with identical + # `created_at` property values will in turn be sorted by ascending `name` property + # values. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. # @param start [String] A server-provided token determining what resource to start the page on. # @param limit [Fixnum] The number of resources to return on a page. - # @param resource_group_id [String] Filters the collection to resources with a `resource_group.id` property matching - # the specified identifier. - # @param name [String] Filters the collection to resources with a `name` property matching the exact - # specified name. - # @param vpc_id [String] Filters the collection to resources with a `vpc.id` property matching the - # specified identifier. - # @param vpc_crn [String] Filters the collection to resources with a `vpc.crn` property matching the - # specified CRN. - # @param vpc_name [String] Filters the collection to resources with a `vpc.name` property matching the exact - # specified name. - # @param target_id [String] Filters the collection to resources with a `target.id` property matching the - # specified identifier. - # @param target_resource_type [String] Filters the collection to resources with a `target.resource_type` property + # @param status [String] Filters the collection to endpoint gateway bindings with a `status` property # matching the specified value. + # @param account_id [String] Filters the collection to resources with an `account.id` property matching the + # specified identifier. # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - 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) + def list_private_path_service_gateway_endpoint_gateway_bindings(private_path_service_gateway_id:, start: nil, limit: nil, status: nil, account_id: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? + headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_flow_log_collectors") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "list_private_path_service_gateway_endpoint_gateway_bindings") headers.merge!(sdk_headers) params = { @@ -17368,16 +19800,11 @@ def list_flow_log_collectors(start: nil, limit: nil, resource_group_id: nil, nam "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 + "status" => status, + "account.id" => account_id } - method_url = "/flow_log_collectors" + method_url = "/private_path_service_gateways/%s/endpoint_gateway_bindings" % [ERB::Util.url_encode(private_path_service_gateway_id)] response = request( method: "GET", @@ -17390,48 +19817,76 @@ def list_flow_log_collectors(start: nil, limit: nil, resource_group_id: nil, nam end ## - # @!method create_flow_log_collector(storage_bucket:, target:, active: nil, name: nil, resource_group: nil) - # 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. - # @param storage_bucket [LegacyCloudObjectStorageBucketIdentity] The Cloud Object Storage bucket where the collected flows will be logged. - # The bucket must exist and an IAM service authorization must grant - # `IBM Cloud Flow Logs` resources of `VPC Infrastructure Services` writer - # access to the bucket. For more information, see [Creating a flow log - # collector](https://cloud.ibm.com/docs/vpc?topic=vpc-ordering-flow-log-collector). - # @param target [FlowLogCollectorTargetPrototype] The target this collector will collect flow logs for. + # @!method get_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:) + # Retrieve an endpoint gateway binding for a private path service gateway. + # This request retrieves a single endpoint gateway binding specified by the + # identifier in the URL. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param id [String] The endpoint gateway binding identifier. + # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. + def get_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? + + raise ArgumentError.new("id must be provided") if id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_private_path_service_gateway_endpoint_gateway_binding") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/private_path_service_gateways/%s/endpoint_gateway_bindings/%s" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)] + + response = request( + method: "GET", + url: method_url, + headers: headers, + params: params, + accept_json: true + ) + response + end + + ## + # @!method deny_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:, set_account_policy: nil) + # Deny an endpoint gateway binding for a private path service gateway. + # This request denies a `pending` endpoint gateway request, and optionally sets the + # policy to deny future requests from the same account. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param id [String] The endpoint gateway binding identifier. + # @param set_account_policy [Boolean] Indicates whether this will become the access policy for any `pending` and future + # endpoint gateway bindings from the same account. # - # 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. + # If set to `true`: + # - If the account has an existing access policy, that policy will be updated to + # `deny`. + # Otherwise, a new `deny` access policy will be created for the account. + # - All `pending` endpoint gateway bindings for the account will be denied. # - # 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. - # @param active [Boolean] Indicates whether this collector will be active upon creation. - # @param name [String] 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. - # @param resource_group [ResourceGroupIdentity] The resource group to use. If unspecified, the account's [default resource - # group](https://cloud.ibm.com/apidocs/resource-manager#introduction) will be used. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def create_flow_log_collector(storage_bucket:, target:, active: nil, name: nil, resource_group: nil) + # If set to `false`: + # - No access policies will be created or updated + # - All `pending` endpoint gateway bindings for the account will remain `pending`. + # @return [nil] + def deny_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:, set_account_policy: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("storage_bucket must be provided") if storage_bucket.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? - raise ArgumentError.new("target must be provided") if target.nil? + raise ArgumentError.new("id must be provided") if id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "create_flow_log_collector") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "deny_private_path_service_gateway_endpoint_gateway_binding") headers.merge!(sdk_headers) params = { @@ -17440,46 +19895,56 @@ def create_flow_log_collector(storage_bucket:, target:, active: nil, name: nil, } data = { - "storage_bucket" => storage_bucket, - "target" => target, - "active" => active, - "name" => name, - "resource_group" => resource_group + "set_account_policy" => set_account_policy } - method_url = "/flow_log_collectors" + method_url = "/private_path_service_gateways/%s/endpoint_gateway_bindings/%s/deny" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)] - response = request( + request( method: "POST", url: method_url, headers: headers, params: params, json: data, - accept_json: true + accept_json: false ) - response + nil end ## - # @!method delete_flow_log_collector(id:) - # Delete a flow log collector. - # This request stops and deletes a flow log collector. This operation cannot be - # reversed. + # @!method permit_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:, set_account_policy: nil) + # Permit an endpoint gateway binding for a private path service gateway. + # This request permits a `pending` endpoint gateway request, and optionally sets the + # policy to permit future requests from the same account. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param id [String] The endpoint gateway binding identifier. + # @param set_account_policy [Boolean] Indicates whether this will become the access policy for any `pending` and future + # endpoint gateway bindings from the same account. # - # Collected flow logs remain available within the flow log collector's Cloud Object - # Storage bucket. - # @param id [String] The flow log collector identifier. + # If set to `true`: + # + # - If the account has an existing access policy, that policy will be updated to + # `permit`. Otherwise, a new `permit` access policy will be created for the + # account. + # - All `pending` endpoint gateway bindings for the account will be permitted. + # + # If set to `false`: + # + # - No access policies will be created or updated + # - All `pending` endpoint gateway bindings for the account will remain `pending`. # @return [nil] - def delete_flow_log_collector(id:) + def permit_private_path_service_gateway_endpoint_gateway_binding(private_path_service_gateway_id:, id:, set_account_policy: nil) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? + raise ArgumentError.new("id must be provided") if id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "delete_flow_log_collector") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "permit_private_path_service_gateway_endpoint_gateway_binding") headers.merge!(sdk_headers) params = { @@ -17487,35 +19952,40 @@ def delete_flow_log_collector(id:) "generation" => @generation } - method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)] + data = { + "set_account_policy" => set_account_policy + } + + method_url = "/private_path_service_gateways/%s/endpoint_gateway_bindings/%s/permit" % [ERB::Util.url_encode(private_path_service_gateway_id), ERB::Util.url_encode(id)] request( - method: "DELETE", + method: "POST", url: method_url, headers: headers, params: params, + json: data, accept_json: false ) nil end ## - # @!method get_flow_log_collector(id:) - # Retrieve a flow log collector. - # This request retrieves a single flow log collector specified by the identifier in - # the URL. - # @param id [String] The flow log collector identifier. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def get_flow_log_collector(id:) + # @!method publish_private_path_service_gateway(private_path_service_gateway_id:) + # Publish a private path service gateway. + # This request publishes a private path service gateway, allowing any account to + # request access to it. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @return [nil] + def publish_private_path_service_gateway(private_path_service_gateway_id:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "get_flow_log_collector") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "publish_private_path_service_gateway") headers.merge!(sdk_headers) params = { @@ -17523,40 +19993,41 @@ def get_flow_log_collector(id:) "generation" => @generation } - method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)] + method_url = "/private_path_service_gateways/%s/publish" % [ERB::Util.url_encode(private_path_service_gateway_id)] - response = request( - method: "GET", + request( + method: "POST", url: method_url, headers: headers, params: params, - accept_json: true + accept_json: false ) - response + nil end ## - # @!method update_flow_log_collector(id:, flow_log_collector_patch:) - # 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. - # @param id [String] The flow log collector identifier. - # @param flow_log_collector_patch [Hash] The flow log collector patch. - # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response. - def update_flow_log_collector(id:, flow_log_collector_patch:) + # @!method revoke_account_for_private_path_service_gateway(private_path_service_gateway_id:, account:) + # Revoke access to a private path service gateway for an account. + # This request revokes a consumer account. This operation cannot be reversed. The + # `status` of all endpoint gateway bindings associated with the specified private + # path service gateway become `denied`. If the specified account has an existing + # access policy, that policy will be updated to `denied`. Otherwise, a new `deny` + # access policy will be created for the account. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @param account [AccountIdentity] The account that will be revoked access to the private path service gateway. + # @return [nil] + def revoke_account_for_private_path_service_gateway(private_path_service_gateway_id:, account:) raise ArgumentError.new("version must be provided") if version.nil? raise ArgumentError.new("generation must be provided") if generation.nil? - raise ArgumentError.new("id must be provided") if id.nil? + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? - raise ArgumentError.new("flow_log_collector_patch must be provided") if flow_log_collector_patch.nil? + raise ArgumentError.new("account must be provided") if account.nil? headers = { } - sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "update_flow_log_collector") + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "revoke_account_for_private_path_service_gateway") headers.merge!(sdk_headers) params = { @@ -17564,20 +20035,59 @@ def update_flow_log_collector(id:, flow_log_collector_patch:) "generation" => @generation } - data = flow_log_collector_patch - headers["Content-Type"] = "application/merge-patch+json" + data = { + "account" => account + } - method_url = "/flow_log_collectors/%s" % [ERB::Util.url_encode(id)] + method_url = "/private_path_service_gateways/%s/revoke_account" % [ERB::Util.url_encode(private_path_service_gateway_id)] - response = request( - method: "PATCH", + request( + method: "POST", url: method_url, headers: headers, params: params, - data: data, - accept_json: true + json: data, + accept_json: false ) - response + nil + end + + ## + # @!method unpublish_private_path_service_gateway(private_path_service_gateway_id:) + # Unpublish a private path service gateway. + # This request unpublishes a private path service gateway. For this request to + # succeed, any existing access from other accounts must first be revoked. Once + # unpublished, access will again be restricted to the account that created this + # private path service gateway. + # @param private_path_service_gateway_id [String] The private path service gateway identifier. + # @return [nil] + def unpublish_private_path_service_gateway(private_path_service_gateway_id:) + raise ArgumentError.new("version must be provided") if version.nil? + + raise ArgumentError.new("generation must be provided") if generation.nil? + + raise ArgumentError.new("private_path_service_gateway_id must be provided") if private_path_service_gateway_id.nil? + + headers = { + } + sdk_headers = Common.new.get_sdk_headers("vpc", "V1", "unpublish_private_path_service_gateway") + headers.merge!(sdk_headers) + + params = { + "version" => @version, + "generation" => @generation + } + + method_url = "/private_path_service_gateways/%s/unpublish" % [ERB::Util.url_encode(private_path_service_gateway_id)] + + request( + method: "POST", + url: method_url, + headers: headers, + params: params, + accept_json: false + ) + nil end end end diff --git a/test/unit/test_vpc_v1.rb b/test/unit/test_vpc_v1.rb index c87a27d..26684e2 100644 --- a/test/unit/test_vpc_v1.rb +++ b/test/unit/test_vpc_v1.rb @@ -38,7 +38,7 @@ def test_list_vpcs "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" @@ -57,7 +57,7 @@ def test_create_vpc "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -73,7 +73,7 @@ def test_delete_vpc "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339?generation=2&version=2025-05-13") .with( headers: { "Host" => "us-south.iaas.cloud.ibm.com" } ) @@ -113,7 +113,7 @@ def test_get_vpc "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -132,7 +132,7 @@ def test_update_vpc "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -149,7 +149,7 @@ def test_get_vpc_default_network_acl "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/default_network_acl?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/default_network_acl?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -165,7 +165,7 @@ def test_get_vpc_default_routing_table "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/default_routing_table?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/default_routing_table?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -181,7 +181,7 @@ def test_get_vpc_default_security_group "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/default_security_group?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/default_security_group?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -203,7 +203,7 @@ def test_list_vpc_address_prefixes "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -219,7 +219,7 @@ def test_create_vpc_address_prefix "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" }, body: { "cidr" => "10.1.0.0/16", @@ -246,7 +246,7 @@ def test_delete_vpc_address_prefix "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes/df760133-3513-47e7-b980-26cca666561b?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes/df760133-3513-47e7-b980-26cca666561b?generation=2&version=2025-05-13") .with( headers: { "Host" => "us-south.iaas.cloud.ibm.com" } ) @@ -265,7 +265,7 @@ def test_get_vpc_address_prefix "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes/df760133-3513-47e7-b980-26cca666561b?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes/df760133-3513-47e7-b980-26cca666561b?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -280,12 +280,12 @@ def test_get_vpc_address_prefix def test_update_vpc_address_prefix message_response = { "cidr" => "10.1.0.0/16", "created_at" => "2019-01-07T16:56:54Z", "has_subnets" => false, - "href" => "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes/df760133-3513-47e7-b980-26cca666561b?generation=2&version=2024-08-20", "id" => "df760133-3513-47e7-b980-26cca666561b", "is_default" => false, "name" => "my-vpc-address-prefix-1-updated", "zone" => { "href" => "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name" => "us-south-1" } } + "href" => "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes/df760133-3513-47e7-b980-26cca666561b?generation=2&version=2025-05-13", "id" => "df760133-3513-47e7-b980-26cca666561b", "is_default" => false, "name" => "my-vpc-address-prefix-1-updated", "zone" => { "href" => "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name" => "us-south-1" } } headers = { "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes/df760133-3513-47e7-b980-26cca666561b?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/address_prefixes/df760133-3513-47e7-b980-26cca666561b?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -305,7 +305,7 @@ def test_list_vpc_routes "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/routes?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/f64efe74-a5a2-45c7-b37d-5071d2dd6339/routes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -324,7 +324,7 @@ def test_create_vpc_route "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routes?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -348,7 +348,7 @@ def test_delete_vpc_route "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2025-05-13") .with( headers: { "Host" => "us-south.iaas.cloud.ibm.com" } ) @@ -366,7 +366,7 @@ def test_get_vpc_route "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -386,7 +386,7 @@ def test_update_vpc_route "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -406,7 +406,7 @@ def test_list_vpc_routing_tables "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -425,7 +425,7 @@ def test_create_vpc_routing_table "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -443,7 +443,7 @@ def test_delete_vpc_routing_table "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe?generation=2&version=2025-05-13") .with( headers: { "Host" => "us-south.iaas.cloud.ibm.com" } ) @@ -461,7 +461,7 @@ def test_get_vpc_routing_table "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -480,7 +480,7 @@ def test_update_vpc_routing_table "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -505,7 +505,7 @@ def test_list_vpc_routing_table_routes "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe/routes?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe/routes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -525,7 +525,7 @@ def test_create_vpc_routing_table_route "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe/routes?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/982d72b7-db1b-4606-afb2-ed6bd4b0bed1/routing_tables/eee6e0f4-ff31-41b4-8584-3cdd50b8fffe/routes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -550,7 +550,7 @@ def test_delete_vpc_routing_table_route "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2025-05-13") .with( headers: { "Host" => "us-south.iaas.cloud.ibm.com" } ) @@ -570,7 +570,7 @@ def test_get_vpc_routing_table_route "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -591,7 +591,7 @@ def test_update_vpc_routing_table_route "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpcs/128c1fcf-79bc-40d0-88a1-b7c58f05cf5b/routing_tables/6885e83f-03b2-4603-8a86-db2a0f55c840/routes/9cdddd42-8ce1-4ca9-ba65-06ffd4d6cf19?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -614,7 +614,7 @@ def test_list_subnets "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -631,7 +631,7 @@ def test_create_subnet "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/subnets?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/subnets?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -649,7 +649,7 @@ def test_delete_subnet "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959?generation=2&version=2025-05-13") .with( headers: { "Host" => "us-south.iaas.cloud.ibm.com" } ) @@ -666,7 +666,7 @@ def test_get_subnet "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -685,7 +685,7 @@ def test_update_subnet "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -705,7 +705,7 @@ def test_get_subnet_network_acl "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959/network_acl?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959/network_acl?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -724,7 +724,7 @@ def test_replace_subnet_network_acl "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959/network_acl?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959/network_acl?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -743,7 +743,7 @@ def test_unset_subnet_public_gateway "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959/public_gateway?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/subnets/8722d01c-9c78-4555-82b5-53ad1266f959/public_gateway?generation=2&version=2025-05-13") .with( headers: { "Host" => "us-south.iaas.cloud.ibm.com" } ) @@ -760,7 +760,7 @@ def test_get_subnet_public_gateway "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/d4d3ef82-bebb-446e-bbe4-038bc82f6776/public_gateway?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/d4d3ef82-bebb-446e-bbe4-038bc82f6776/public_gateway?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -779,7 +779,7 @@ def test_set_subnet_public_gateway "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/subnets/4fd00a61-fe63-4186-81c9-f7253b5c1cd7/public_gateway?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/subnets/4fd00a61-fe63-4186-81c9-f7253b5c1cd7/public_gateway?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -799,7 +799,7 @@ def test_get_subnet_routing_table "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/6885e83f-03b2-4603-8a86-db2a0f55c840/routing_table?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/6885e83f-03b2-4603-8a86-db2a0f55c840/routing_table?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -818,7 +818,7 @@ def test_replace_subnet_routing_table "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/subnets/6885e83f-03b2-4603-8a86-db2a0f55c840/routing_table?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/subnets/6885e83f-03b2-4603-8a86-db2a0f55c840/routing_table?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -842,7 +842,7 @@ def test_list_subnet_reserved_ips "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -861,7 +861,7 @@ def test_create_subnet_reserved_ip "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -879,7 +879,7 @@ def test_delete_subnet_reserved_ip "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_subnet_reserved_ip( subnet_id: "0716-b28a7e6d-a66b-4de7-8713-15dcffdce401", @@ -894,7 +894,7 @@ def test_get_subnet_reserved_ip "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -914,7 +914,7 @@ def test_update_subnet_reserved_ip "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/subnets/0716-b28a7e6d-a66b-4de7-8713-15dcffdce401/reserved_ips/0716-7768a27e-cd6c-4a13-a9e6-d67a964e54a5?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -935,7 +935,7 @@ def test_list_images "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/images?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/images?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -952,7 +952,7 @@ def test_create_image "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/images?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/images?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -970,7 +970,7 @@ def test_delete_image "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/images/72251a2e-d6c5-42b4-97b0-b5f8e8d1f479?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/images/72251a2e-d6c5-42b4-97b0-b5f8e8d1f479?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_image( id: "72251a2e-d6c5-42b4-97b0-b5f8e8d1f479" @@ -984,7 +984,7 @@ def test_get_image "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/images/72251a2e-d6c5-42b4-97b0-b5f8e8d1f479?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/images/72251a2e-d6c5-42b4-97b0-b5f8e8d1f479?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1003,7 +1003,7 @@ def test_update_image "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/images/72251a2e-d6c5-42b4-97b0-b5f8e8d1f479?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/images/72251a2e-d6c5-42b4-97b0-b5f8e8d1f479?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1023,7 +1023,7 @@ def test_list_operating_systems "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/operating_systems?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1040,7 +1040,7 @@ def test_get_operating_system "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/red-7-amd64?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/red-7-amd64?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1059,7 +1059,7 @@ def test_list_placement_groups "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1076,7 +1076,7 @@ def test_create_placement_group "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1094,7 +1094,7 @@ def test_delete_placement_group "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_placement_group( id: "3fad3f2204eb4998c3964d254ffcd771" @@ -1108,7 +1108,7 @@ def test_get_placement_group "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1127,7 +1127,7 @@ def test_update_placement_group "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/placement_groups/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1147,7 +1147,7 @@ def test_list_keys "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/keys?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/keys?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1164,7 +1164,7 @@ def test_create_key "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/keys?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/keys?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1182,7 +1182,7 @@ def test_delete_key "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/keys/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/keys/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_key( id: "3fad3f2204eb4998c3964d254ffcd771" @@ -1196,7 +1196,7 @@ def test_get_key "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/keys/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/keys/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1215,7 +1215,7 @@ def test_update_key "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/keys/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/keys/3fad3f2204eb4998c3964d254ffcd771?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1235,7 +1235,7 @@ def test_list_instance_profiles "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1252,7 +1252,7 @@ def test_get_instance_profile "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-8x32?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance/profiles/bx2-8x32?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1271,7 +1271,7 @@ def test_list_instance_templates "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1290,7 +1290,7 @@ def test_create_instance_template "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" }, body: '{"image":{"id":"3f9a2d96-830e-4100-9b4c-663225a3f872"},"keys":[{"id":"363f6d70-0000-0001-0000-00000013b96c"}],"name":"my-instance-template","primary_network_interface":{"subnet":{"id":"0d933c75-492a-4756-9832-1200585dfa79"}},"profile":{"name":"bx2-2x8"},"vpc":{"id":"dc201ab2-8536-4904-86a8-084d84582133"},"zone":{"name":"us-south-1"}}' @@ -1333,7 +1333,7 @@ def test_delete_instance_template "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/3f9a2d96-830e-4100-9b4c-663225a3f872?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/3f9a2d96-830e-4100-9b4c-663225a3f872?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_template( id: "3f9a2d96-830e-4100-9b4c-663225a3f872" @@ -1349,7 +1349,7 @@ def test_get_instance_template "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/3f9a2d96-830e-4100-9b4c-663225a3f872?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/3f9a2d96-830e-4100-9b4c-663225a3f872?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1370,7 +1370,7 @@ def test_update_instance_template "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/3f9a2d96-830e-4100-9b4c-663225a3f872?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/3f9a2d96-830e-4100-9b4c-663225a3f872?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1390,7 +1390,7 @@ def test_list_instances "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1407,7 +1407,7 @@ def test_create_instance "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1478,7 +1478,7 @@ def test_delete_instance "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance( id: "eb1b7391-2ca2-4ab5-84a8-b92157a633b0" @@ -1492,7 +1492,7 @@ def test_get_instance "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1511,7 +1511,7 @@ def test_update_instance "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1531,7 +1531,7 @@ def test_list_instance_disks "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/disks?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/disks?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1550,7 +1550,7 @@ def test_get_instance_disk "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/disks/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/disks/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1570,7 +1570,7 @@ def test_update_instance_disk "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/disks/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/disks/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1591,7 +1591,7 @@ def test_get_instance_initialization "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/initialization?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/initialization?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1610,7 +1610,7 @@ def test_create_instance_console_access_token "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/console_access_token?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/console_access_token?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1630,7 +1630,7 @@ def test_create_instance_action "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/actions?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/actions?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1650,7 +1650,7 @@ def test_list_instance_network_interfaces "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1702,7 +1702,7 @@ def test_create_instance_network_interface "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1726,7 +1726,7 @@ def test_delete_instance_network_interface "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_network_interface( instance_id: "eb1b7391-2ca2-4ab5-84a8-b92157a633b0", @@ -1774,7 +1774,7 @@ def test_get_instance_network_interface "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1827,7 +1827,7 @@ def test_update_instance_network_interface "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1848,7 +1848,7 @@ def test_list_instance_network_interface_floating_ips "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20/floating_ips?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20/floating_ips?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1867,7 +1867,7 @@ def test_remove_instance_network_interface_floating_ip "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.remove_instance_network_interface_floating_ip( instance_id: "eb1b7391-2ca2-4ab5-84a8-b92157a633b0", @@ -1883,7 +1883,7 @@ def test_get_instance_network_interface_floating_ip "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1904,7 +1904,7 @@ def test_add_instance_network_interface_floating_ip "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/network_interfaces/35bd3f19-bdd4-434b-ad6a-5e9358d65e20/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1925,7 +1925,7 @@ def test_list_snapshots "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/snapshots?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/snapshots?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1942,7 +1942,7 @@ def test_create_snapshot "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/snapshots?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/snapshots?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1969,7 +1969,7 @@ def test_get_snapshot "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/snapshots/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/snapshots/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -1988,7 +1988,7 @@ def test_update_snapshot "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/snapshots/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/snapshots/eb1b7391-2ca2-4ab5-84a8-b92157a633b0?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2006,7 +2006,7 @@ def test_delete_snapshot "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/snapshots/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60?generation=2&version=2025-05-13") .to_return(status: 200, body: "", headers: headers) service.delete_snapshot( id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60" @@ -2018,7 +2018,7 @@ def test_delete_snapshots "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/snapshots?generation=2&source_volume.id=r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/snapshots?generation=2&source_volume.id=r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60&version=2025-05-13") .to_return(status: 200, body: "", headers: headers) service.delete_snapshots( source_volume_id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60" @@ -2034,7 +2034,7 @@ def test_list_instance_volume_attachments "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2053,7 +2053,7 @@ def test_create_instance_volume_attachment "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2073,7 +2073,7 @@ def test_delete_instance_volume_attachment "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/fdb3642d-c849-4c29-97a9-03b868616f88?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/fdb3642d-c849-4c29-97a9-03b868616f88?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_volume_attachment( instance_id: "eb1b7391-2ca2-4ab5-84a8-b92157a633b0", @@ -2088,7 +2088,7 @@ def test_get_instance_volume_attachment "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/fdb3642d-c849-4c29-97a9-03b868616f88?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/fdb3642d-c849-4c29-97a9-03b868616f88?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2108,7 +2108,7 @@ def test_update_instance_volume_attachment "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/fdb3642d-c849-4c29-97a9-03b868616f88?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instances/eb1b7391-2ca2-4ab5-84a8-b92157a633b0/volume_attachments/fdb3642d-c849-4c29-97a9-03b868616f88?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2129,7 +2129,7 @@ def test_list_instance_groups "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2146,7 +2146,7 @@ def test_create_instance_group "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2177,7 +2177,7 @@ def test_delete_instance_group "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60?generation=2&version=2025-05-13") .to_return(status: 200, body: message_response.to_json, headers: headers) service.delete_instance_group( id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60" @@ -2191,7 +2191,7 @@ def test_get_instance_group "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60?generation=2&version=2024-08-20?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60?generation=2&version=2025-05-13?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2210,7 +2210,7 @@ def test_update_instance_group "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2229,7 +2229,7 @@ def test_delete_instance_group_load_balancer "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/load_balancer?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/load_balancer?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_group_load_balancer( instance_group_id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60" @@ -2246,7 +2246,7 @@ def test_list_instance_group_managers "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2265,7 +2265,7 @@ def test_create_instance_group_manager "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2284,7 +2284,7 @@ def test_delete_instance_group_manager "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_group_manager( instance_group_id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", @@ -2299,7 +2299,7 @@ def test_get_instance_group_manager "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2319,7 +2319,7 @@ def test_update_instance_group_manager "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2343,7 +2343,7 @@ def test_list_instance_group_manager_actions "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/actions?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/actions?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2363,7 +2363,7 @@ def test_create_instance_group_manager_actions "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/actions?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/actions?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2383,7 +2383,7 @@ def test_delete_instance_group_manager_actions "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/actions/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/actions/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_group_manager_action( instance_group_id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", @@ -2399,7 +2399,7 @@ def test_get_instance_group_manager_actions "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/actions/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/actions/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2420,7 +2420,7 @@ def test_update_instance_group_manager_actions "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/actions/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/actions/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2445,7 +2445,7 @@ def test_list_instance_group_manager_policies "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2465,7 +2465,7 @@ def test_create_instance_group_manager_policy "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2485,7 +2485,7 @@ def test_delete_instance_group_manager_policy "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies/r018-02d7b6c3-e3c8-4569-ba6a-caa5d4d6146c?generation=2&version=2024-08-20?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies/r018-02d7b6c3-e3c8-4569-ba6a-caa5d4d6146c?generation=2&version=2025-05-13?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_group_manager_policy( instance_group_id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", @@ -2501,7 +2501,7 @@ def test_get_instance_group_manager_policy "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies/r018-02d7b6c3-e3c8-4569-ba6a-caa5d4d6146c?generation=2&version=2024-08-20?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies/r018-02d7b6c3-e3c8-4569-ba6a-caa5d4d6146c?generation=2&version=2025-05-13?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2522,7 +2522,7 @@ def test_update_instance_group_manager_policy "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies/r018-02d7b6c3-e3c8-4569-ba6a-caa5d4d6146c?generation=2&version=2024-08-20?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/managers/r018-4f2f7036-86b0-4d1b-a729-12357d45b00f/policies/r018-02d7b6c3-e3c8-4569-ba6a-caa5d4d6146c?generation=2&version=2025-05-13?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2543,7 +2543,7 @@ def test_delete_instance_group_memberships "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_group_memberships( instance_group_id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60" @@ -2561,7 +2561,7 @@ def test_list_instance_group_memberships "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2579,7 +2579,7 @@ def test_delete_instance_group_membership "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/04977d01-89c0-488b-a599-3d0dc32880e7?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/04977d01-89c0-488b-a599-3d0dc32880e7?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_instance_group_membership( instance_group_id: "r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60", @@ -2594,7 +2594,7 @@ def test_get_instance_group_membership "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/04977d01-89c0-488b-a599-3d0dc32880e7?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/04977d01-89c0-488b-a599-3d0dc32880e7?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2614,7 +2614,7 @@ def test_update_instance_group_membership "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/04977d01-89c0-488b-a599-3d0dc32880e7?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/r018-7b3ac170-01f3-43d6-87ec-f0ed11ed3f60/memberships/04977d01-89c0-488b-a599-3d0dc32880e7?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2635,7 +2635,7 @@ def test_list_dedicated_host_groups "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2652,7 +2652,7 @@ def test_create_dedicated_host_group "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2668,7 +2668,7 @@ def test_delete_dedicated_host_group "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/4bbce614c13444cd8fc5e7e878ef8e21?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/4bbce614c13444cd8fc5e7e878ef8e21?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_dedicated_host_group( id: "4bbce614c13444cd8fc5e7e878ef8e21" @@ -2682,7 +2682,7 @@ def test_get_dedicated_host_group "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/4bbce614c13444cd8fc5e7e878ef8e21?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/4bbce614c13444cd8fc5e7e878ef8e21?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2701,7 +2701,7 @@ def test_update_dedicated_host_group "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/4bbce614c13444cd8fc5e7e878ef8e21?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/groups/4bbce614c13444cd8fc5e7e878ef8e21?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2721,7 +2721,7 @@ def test_list_dedicated_host_profiles "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2738,7 +2738,7 @@ def test_get_dedicated_host_profile "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_host/profiles/mx2-host-152x1216?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2759,7 +2759,7 @@ def test_list_dedicated_hosts "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2776,7 +2776,7 @@ def test_create_dedicated_host "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2801,7 +2801,7 @@ def test_delete_dedicated_host "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_dedicated_host( id: "0787-8c2a09be-ee18-4af2-8ef4-6a6060732221" @@ -2815,7 +2815,7 @@ def test_get_dedicated_host "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2834,7 +2834,7 @@ def test_update_dedicated_host "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2854,7 +2854,7 @@ def test_list_dedicated_host_disks "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221/disks?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221/disks?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2873,7 +2873,7 @@ def test_get_dedicated_host_disk "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221/disks/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221/disks/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2893,7 +2893,7 @@ def test_update_dedicated_host_disk "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221/disks/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/dedicated_hosts/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221/disks/0787-8c2a09be-ee18-4af2-8ef4-6a6060732221?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2914,7 +2914,7 @@ def test_list_volume_profiles "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2931,7 +2931,7 @@ def test_get_volume_profile "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/10iops-tier?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/10iops-tier?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2950,7 +2950,7 @@ def test_list_volumes "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/volumes?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/volumes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2967,7 +2967,7 @@ def test_create_volume "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/volumes?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/volumes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -2993,7 +2993,7 @@ def test_delete_volume "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/volumes/2d1bb5a8-40a8-447a-acf7-0eadc8aeb054?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/volumes/2d1bb5a8-40a8-447a-acf7-0eadc8aeb054?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_volume( id: "2d1bb5a8-40a8-447a-acf7-0eadc8aeb054" @@ -3007,7 +3007,7 @@ def test_get_volume "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/volumes/2d1bb5a8-40a8-447a-acf7-0eadc8aeb054?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/volumes/2d1bb5a8-40a8-447a-acf7-0eadc8aeb054?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3026,7 +3026,7 @@ def test_update_volume "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/volumes/2d1bb5a8-40a8-447a-acf7-0eadc8aeb054?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/volumes/2d1bb5a8-40a8-447a-acf7-0eadc8aeb054?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3048,7 +3048,7 @@ def test_list_regions "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/regions?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/regions?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3065,7 +3065,7 @@ def test_get_region "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3087,7 +3087,7 @@ def test_list_region_zones "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3106,7 +3106,7 @@ def test_get_region_zone "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3126,7 +3126,7 @@ def test_list_public_gateways "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3143,7 +3143,7 @@ def test_create_public_gateway "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3162,7 +3162,7 @@ def test_delete_public_gateway "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/d4d3ef82-bebb-446e-bbe4-038bc82f6776?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/d4d3ef82-bebb-446e-bbe4-038bc82f6776?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_public_gateway( id: "d4d3ef82-bebb-446e-bbe4-038bc82f6776" @@ -3176,7 +3176,7 @@ def test_get_public_gateway "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/d4d3ef82-bebb-446e-bbe4-038bc82f6776?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/d4d3ef82-bebb-446e-bbe4-038bc82f6776?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3195,7 +3195,7 @@ def test_update_public_gateway "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/d4d3ef82-bebb-446e-bbe4-038bc82f6776?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/public_gateways/d4d3ef82-bebb-446e-bbe4-038bc82f6776?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3215,7 +3215,7 @@ def test_list_floating_ips "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3232,7 +3232,7 @@ def test_create_floating_ip "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3255,7 +3255,7 @@ def test_delete_floating_ip "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_floating_ip( id: "ad0cded3-53a3-4d4a-9809-8c59b50d2b80" @@ -3269,7 +3269,7 @@ def test_get_floating_ip "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3288,7 +3288,7 @@ def test_update_floating_ip "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/ad0cded3-53a3-4d4a-9809-8c59b50d2b80?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3308,7 +3308,7 @@ def test_list_network_acls "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/network_acls?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/network_acls?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3325,7 +3325,7 @@ def test_create_network_acl "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/network_acls?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/network_acls?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3348,7 +3348,7 @@ def test_delete_network_acl "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_network_acl( id: "3217cb8b-5368-452a-9399-a84f14fb539d" @@ -3362,7 +3362,7 @@ def test_get_network_acl "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3381,7 +3381,7 @@ def test_update_network_acl "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3405,7 +3405,7 @@ def test_list_network_acl_rules "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3424,7 +3424,7 @@ def test_create_network_acl_rule "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3443,7 +3443,7 @@ def test_delete_network_acl_rule "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules/cb19f11d-0e25-4650-a8ab-f4539da563ee?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules/cb19f11d-0e25-4650-a8ab-f4539da563ee?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_network_acl_rule( network_acl_id: "3217cb8b-5368-452a-9399-a84f14fb539d", @@ -3458,7 +3458,7 @@ def test_get_network_acl_rule "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules/cb19f11d-0e25-4650-a8ab-f4539da563ee?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules/cb19f11d-0e25-4650-a8ab-f4539da563ee?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3478,7 +3478,7 @@ def test_update_network_acl_rule "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules/cb19f11d-0e25-4650-a8ab-f4539da563ee?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/network_acls/3217cb8b-5368-452a-9399-a84f14fb539d/rules/cb19f11d-0e25-4650-a8ab-f4539da563ee?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3499,7 +3499,7 @@ def test_list_security_groups "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3516,7 +3516,7 @@ def test_create_security_group "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/security_groups?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/security_groups?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3534,7 +3534,7 @@ def test_delete_security_group "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_security_group( id: "2d364f0a-a870-42c3-a554-000001099037" @@ -3548,7 +3548,7 @@ def test_get_security_group "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3567,7 +3567,7 @@ def test_get_security_group_target "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/targets/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/targets/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3587,7 +3587,7 @@ def test_list_security_group_targets "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/targets?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/targets?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3606,7 +3606,7 @@ def test_create_security_group_target_binding "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/31cf397a-286a-4289-a7e7-92f177e7e491/targets/31cf397a-286a-4289-a7e7-92f177e7e491?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/31cf397a-286a-4289-a7e7-92f177e7e491/targets/31cf397a-286a-4289-a7e7-92f177e7e491?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3623,7 +3623,7 @@ def test_delete_security_group_target_binding "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/targets/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/targets/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2025-05-13") .to_return(status: 204, body: "", headers: headers) service.delete_security_group_target_binding( security_group_id: "2d364f0a-a870-42c3-a554-000001099037", @@ -3638,7 +3638,7 @@ def test_update_security_group "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3660,7 +3660,7 @@ def test_list_security_group_rules "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3679,7 +3679,7 @@ def test_create_security_group_rule "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3698,7 +3698,7 @@ def test_delete_security_group_rule "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules/b597cff2-38e8-4e6e-999d-000002173027?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules/b597cff2-38e8-4e6e-999d-000002173027?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_security_group_rule( security_group_id: "2d364f0a-a870-42c3-a554-000001099037", @@ -3713,7 +3713,7 @@ def test_get_security_group_rule "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules/b597cff2-38e8-4e6e-999d-000002173027?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules/b597cff2-38e8-4e6e-999d-000002173027?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3733,7 +3733,7 @@ def test_update_security_group_rule "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules/b597cff2-38e8-4e6e-999d-000002173027?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/security_groups/2d364f0a-a870-42c3-a554-000001099037/rules/b597cff2-38e8-4e6e-999d-000002173027?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3754,7 +3754,7 @@ def test_list_ike_policies "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3771,7 +3771,7 @@ def test_create_ike_policy "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3792,7 +3792,7 @@ def test_delete_ike_policy "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/53ebcf53-2ee4-4a26-ba2c-afc62091a148?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/53ebcf53-2ee4-4a26-ba2c-afc62091a148?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_ike_policy( id: "53ebcf53-2ee4-4a26-ba2c-afc62091a148" @@ -3806,7 +3806,7 @@ def test_get_ike_policy "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/53ebcf53-2ee4-4a26-ba2c-afc62091a148?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/53ebcf53-2ee4-4a26-ba2c-afc62091a148?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3825,7 +3825,7 @@ def test_update_ike_policy "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/53ebcf53-2ee4-4a26-ba2c-afc62091a148?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/53ebcf53-2ee4-4a26-ba2c-afc62091a148?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3844,7 +3844,7 @@ def test_list_ike_policy_connections "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/53ebcf53-2ee4-4a26-ba2c-afc62091a148/connections?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/53ebcf53-2ee4-4a26-ba2c-afc62091a148/connections?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3863,7 +3863,7 @@ def test_list_ipsec_policies "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3880,7 +3880,7 @@ def test_create_ipsec_policy "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3900,7 +3900,7 @@ def test_delete_ipsec_policy "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_ipsec_policy( id: "43c2f663-3960-4289-9253-f6eab23a6cd7" @@ -3914,7 +3914,7 @@ def test_get_ipsec_policy "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3933,7 +3933,7 @@ def test_update_ipsec_policy "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3952,7 +3952,7 @@ def test_list_ipsec_policy_connections "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/43c2f663-3960-4289-9253-f6eab23a6cd7/connections?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3971,7 +3971,7 @@ def test_list_vpn_gateways "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -3988,7 +3988,7 @@ def test_create_vpn_gateway "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4006,7 +4006,7 @@ def test_delete_vpn_gateway "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/e630bb38-c3a7-4619-b0e5-7bff14e060fe?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/e630bb38-c3a7-4619-b0e5-7bff14e060fe?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_vpn_gateway( id: "e630bb38-c3a7-4619-b0e5-7bff14e060fe" @@ -4020,7 +4020,7 @@ def test_get_vpn_gateway "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/e630bb38-c3a7-4619-b0e5-7bff14e060fe?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/e630bb38-c3a7-4619-b0e5-7bff14e060fe?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4039,7 +4039,7 @@ def test_update_vpn_gateway "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/e630bb38-c3a7-4619-b0e5-7bff14e060fe?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/e630bb38-c3a7-4619-b0e5-7bff14e060fe?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4061,7 +4061,7 @@ def test_list_vpn_gateway_connections "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/e630bb38-c3a7-4619-b0e5-7bff14e060fe/connections?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/e630bb38-c3a7-4619-b0e5-7bff14e060fe/connections?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4080,7 +4080,7 @@ def test_create_vpn_gateway_connection "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4099,7 +4099,7 @@ def test_delete_vpn_gateway_connection "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_vpn_gateway_connection( vpn_gateway_id: "a7d258d5-be1e-491d-83db-526d8d9a2ce9", @@ -4114,7 +4114,7 @@ def test_get_vpn_gateway_connection "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4134,7 +4134,7 @@ def test_update_vpn_gateway_connection "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4154,7 +4154,7 @@ def test_list_vpn_servers "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?sort=name&generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?sort=name&generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4187,7 +4187,7 @@ def test_create_vpn_server subnet_identity_model = { 'id': "970e8b78-8f09-4acf-b37a-30458bdfec96" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4208,7 +4208,7 @@ def test_get_vpn_server headers = { "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4226,7 +4226,7 @@ def test_update_vpn_server } vpn_server_patch_model = {} vpn_server_patch_model["name"] = "my-vpn-server-updated" - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4239,7 +4239,7 @@ def test_update_vpn_server end def test_delete_vpn_server - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95?generation=2&version=2025-05-13") .with( headers: { "Connection" => "close", @@ -4257,7 +4257,7 @@ def test_get_vpn_server_client_configuration # message_response = { "clients" => [{ "id" => "c74f8cc2-a174-4522-b057-7433e5f48833", "crn" => "crn:v1:staging:public:is:us-east:a/823bd195e9fd4f0db40ac2e1bffef3e0:71a3aeca-61ad-458f-99be-57c59ca0e60b::", "href" => "http://localhost:4000/rias-mock/us-east/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients/c74f8cc2-a174-4522-b057-7433e5f48833", "common_name" => "www.mock-certificate51610.com", "client_ip" => { "address" => "192.103.208.190" }, "data_received" => 41_053, "data_sent" => 28_914, "disconnected_at" => "", "created_at" => "2022-07-26T06:23:50.434Z", "remote_ip" => { "address" => "9.111.1.1" }, "remote_port" => 27_872, "resource_type" => "vpn_server_client", "status" => "connected" }, { "id" => "4750e2a7-a314-40f0-b659-ca69ad55dc57", "crn" => "crn:v1:staging:public:is:us-east:a/823bd195e9fd4f0db40ac2e1bffef3e0:b1213d1a-5f9d-437f-ab03-1f7a37654cb2::", "href" => "http://localhost:4000/rias-mock/us-east/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients/4750e2a7-a314-40f0-b659-ca69ad55dc57", "common_name" => "www.mock-certificate56773.com", "client_ip" => { "address" => "192.200.244.138" }, "data_received" => 26_558, "data_sent" => 53_975, "disconnected_at" => "2022-07-26T06:23:50.434Z", "created_at" => "2022-07-26T06:23:50.434Z", "remote_ip" => { "address" => "9.111.1.1" }, "remote_port" => 13_623, "resource_type" => "vpn_server_client", "status" => "disconnected" }], "limit" => 10, "first" => { "href" => "http://localhost:4000/rias-mock/us-east/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients?limit=10" } } message_response = "Mock data of vpn server client configuration..." - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/client_configuration?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/client_configuration?generation=2&version=2025-05-13") .with( headers: { "Connection" => "close", @@ -4277,7 +4277,7 @@ def test_list_vpn_server_clients headers = { "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients?sort=created_at&generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients?sort=created_at&generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4294,7 +4294,7 @@ def test_get_vpn_server_client headers = { "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients/c50e2258-c3fd-4151-b422-40a2db4d752c?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients/c50e2258-c3fd-4151-b422-40a2db4d752c?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4307,7 +4307,7 @@ def test_get_vpn_server_client end def test_disconnect_vpn_client - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients/c50e2258-c3fd-4151-b422-40a2db4d752c/disconnect?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/clients/c50e2258-c3fd-4151-b422-40a2db4d752c/disconnect?generation=2&version=2025-05-13") .with( headers: { "Connection" => "close", @@ -4327,7 +4327,7 @@ def test_list_vpn_server_routes headers = { "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4343,7 +4343,7 @@ def test_create_vpn_server_route headers = { "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4361,7 +4361,7 @@ def test_get_vpn_server_route headers = { "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes/5e57b6f6-3a07-4417-a3bb-fed686a0bd0b?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes/5e57b6f6-3a07-4417-a3bb-fed686a0bd0b?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4380,7 +4380,7 @@ def test_update_vpn_server_route } vpn_server_route_patch_model = {} vpn_server_route_patch_model["name"] = "my-vpnserver-route-updated" - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes/5e57b6f6-3a07-4417-a3bb-fed686a0bd0b?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes/5e57b6f6-3a07-4417-a3bb-fed686a0bd0b?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4394,7 +4394,7 @@ def test_update_vpn_server_route end def test_delete_vpn_server_route - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes/5e57b6f6-3a07-4417-a3bb-fed686a0bd0b?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes/5e57b6f6-3a07-4417-a3bb-fed686a0bd0b?generation=2&version=2025-05-13") .with( headers: { "Connection" => "close", @@ -4410,7 +4410,7 @@ def test_delete_vpn_server_route end def test_delete_vpn_server_client - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes/c50e2258-c3fd-4151-b422-40a2db4d752c?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/970e8b78-8f09-4acf-b37a-30458bdfec95/routes/c50e2258-c3fd-4151-b422-40a2db4d752c?generation=2&version=2025-05-13") .with( headers: { "Connection" => "close", @@ -4431,7 +4431,7 @@ def test_list_backup_policies "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4459,7 +4459,7 @@ def test_create_backup_policy 'name': "my-backup-policy-plan" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4481,7 +4481,7 @@ def test_list_backup_policy_plans headers = { "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4501,7 +4501,7 @@ def test_create_backup_policy_plan 'delete_after': 20, 'delete_over_count': 20 } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4523,7 +4523,7 @@ def test_get_backup_policy_plan headers = { "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans/9eab386c-1d86-47fb-8d86-e0732ebcce06?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans/9eab386c-1d86-47fb-8d86-e0732ebcce06?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4542,7 +4542,7 @@ def test_update_backup_policy_plan } backup_policy_plan_patch_model = {} backup_policy_plan_patch_model["name"] = "my-backup-policy-plan-updated" - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans/9eab386c-1d86-47fb-8d86-e0732ebcce06?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans/9eab386c-1d86-47fb-8d86-e0732ebcce06?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4560,7 +4560,7 @@ def test_get_backup_policy headers = { "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4578,7 +4578,7 @@ def test_update_backup_policy } backup_policy_patch_model = {} backup_policy_patch_model["name"] = "my-backup-policy-updated" - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4595,7 +4595,7 @@ def test_delete_backup_policy_plan headers = { "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans/9eab386c-1d86-47fb-8d86-e0732ebcce06?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1/plans/9eab386c-1d86-47fb-8d86-e0732ebcce06?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4613,7 +4613,7 @@ def test_delete_backup_policy headers = { "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/backup_policies/d5b7008f-b3da-46d4-a499-d3c8368f0ce1?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4635,7 +4635,7 @@ def test_list_vpn_gateway_connection_local_cidrs "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/local/cidrs?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/local/cidrs?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4654,7 +4654,7 @@ def test_remove_vpn_gateway_connection_local_cidr "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/local/cidrs/0.0.19.0%2F24?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/local/cidrs/0.0.19.0%2F24?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.remove_vpn_gateway_connections_local_cidr( vpn_gateway_id: "a7d258d5-be1e-491d-83db-526d8d9a2ce9", @@ -4673,7 +4673,7 @@ def test_check_vpn_gateway_connection_local_cidr "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/local/cidrs/0.0.19.0%2F24?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/local/cidrs/0.0.19.0%2F24?generation=2&version=2025-05-13") .to_return(status: 200, body: message_response.to_json, headers: headers) service.check_vpn_gateway_connections_local_cidr( vpn_gateway_id: "a7d258d5-be1e-491d-83db-526d8d9a2ce9", @@ -4692,7 +4692,7 @@ def test_add_vpn_gateway_connection_local_cidr "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/local/cidrs/0.0.19.0%2F24?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/local/cidrs/0.0.19.0%2F24?generation=2&version=2025-05-13") .to_return(status: 200, body: message_response.to_json, headers: headers) service.add_vpn_gateway_connections_local_cidr( vpn_gateway_id: "a7d258d5-be1e-491d-83db-526d8d9a2ce9", @@ -4711,7 +4711,7 @@ def test_list_vpn_gateway_connection_peer_cidrs "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/peer/cidrs?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/peer/cidrs?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4730,7 +4730,7 @@ def test_remove_vpn_gateway_connection_peer_cidr "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/peer/cidrs/0.0.150.0%2F24?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/peer/cidrs/0.0.150.0%2F24?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.remove_vpn_gateway_connections_peer_cidr( vpn_gateway_id: "a7d258d5-be1e-491d-83db-526d8d9a2ce9", @@ -4745,7 +4745,7 @@ def test_check_vpn_gateway_connection_peer_cidr "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/peer/cidrs/0.0.150.0%2F24?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/peer/cidrs/0.0.150.0%2F24?generation=2&version=2025-05-13") .to_return(status: 200, body: message_response.to_json, headers: headers) service.check_vpn_gateway_connections_peer_cidr( vpn_gateway_id: "a7d258d5-be1e-491d-83db-526d8d9a2ce9", @@ -4760,7 +4760,7 @@ def test_add_vpn_gateway_connection_peer_cidr "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/peer/cidrs/0.0.150.0%2F24?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/a7d258d5-be1e-491d-83db-526d8d9a2ce9/connections/b67efb2c-bd17-457d-be8e-7b46404062dc/peer/cidrs/0.0.150.0%2F24?generation=2&version=2025-05-13") .to_return(status: 200, body: message_response.to_json, headers: headers) service.add_vpn_gateway_connections_peer_cidr( vpn_gateway_id: "a7d258d5-be1e-491d-83db-526d8d9a2ce9", @@ -4776,7 +4776,7 @@ def test_list_load_balancer_profiles "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4793,7 +4793,7 @@ def test_get_load_balancer_profile "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4814,7 +4814,7 @@ def test_list_load_balancers "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4831,7 +4831,7 @@ def test_create_load_balancer "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4857,7 +4857,7 @@ def test_delete_load_balancer "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/7b6dc78d-49f3-435f-b767-e05f9affd3ca?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/7b6dc78d-49f3-435f-b767-e05f9affd3ca?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_load_balancer( id: "7b6dc78d-49f3-435f-b767-e05f9affd3ca" @@ -4871,7 +4871,7 @@ def test_get_load_balancer "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/7b6dc78d-49f3-435f-b767-e05f9affd3ca?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/7b6dc78d-49f3-435f-b767-e05f9affd3ca?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4890,7 +4890,7 @@ def test_update_load_balancer "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/7b6dc78d-49f3-435f-b767-e05f9affd3ca?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/7b6dc78d-49f3-435f-b767-e05f9affd3ca?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4914,7 +4914,7 @@ def test_get_load_balancer_statistics "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/7b6dc78d-49f3-435f-b767-e05f9affd3ca/statistics?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/7b6dc78d-49f3-435f-b767-e05f9affd3ca/statistics?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4935,7 +4935,7 @@ def test_list_load_balancer_listeners "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4954,7 +4954,7 @@ def test_create_load_balancer_listener "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -4974,7 +4974,7 @@ def test_delete_load_balancer_listener "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_load_balancer_listener( load_balancer_id: "2c791a20-4109-4484-894a-09f332753169", @@ -4989,7 +4989,7 @@ def test_get_load_balancer_listener "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5009,7 +5009,7 @@ def test_update_load_balancer_listener "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5029,7 +5029,7 @@ def test_list_load_balancer_listener_policies "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5048,7 +5048,7 @@ def test_create_load_balancer_listener_policy "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5069,7 +5069,7 @@ def test_delete_load_balancer_listener_policy "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_load_balancer_listener_policy( load_balancer_id: "2c791a20-4109-4484-894a-09f332753169", @@ -5084,7 +5084,7 @@ def test_get_load_balancer_listener_policy "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5104,7 +5104,7 @@ def test_update_load_balancer_listener_policy "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5125,7 +5125,7 @@ def test_list_load_balancer_listener_policy_rules "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5145,7 +5145,7 @@ def test_create_load_balancer_listener_policy_rule "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5168,7 +5168,7 @@ def test_delete_load_balancer_listener_policy_rule "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules/b2f46c0b-4dd6-4881-9d53-a2a6581ac43b?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules/b2f46c0b-4dd6-4881-9d53-a2a6581ac43b?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_load_balancer_listener_policy_rule( load_balancer_id: "2c791a20-4109-4484-894a-09f332753169", @@ -5184,7 +5184,7 @@ def test_get_load_balancer_listener_policy_rule "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules/b2f46c0b-4dd6-4881-9d53-a2a6581ac43b?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules/b2f46c0b-4dd6-4881-9d53-a2a6581ac43b?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5205,7 +5205,7 @@ def test_update_load_balancer_listener_policy_rule "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules/b2f46c0b-4dd6-4881-9d53-a2a6581ac43b?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/listeners/f5ceb28b-f448-4a5e-8d9d-ec81714f20bd/policies/47d4c9f2-8e41-433d-a095-2287efe4b8ae/rules/b2f46c0b-4dd6-4881-9d53-a2a6581ac43b?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5230,7 +5230,7 @@ def test_list_load_balancer_pools "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5249,7 +5249,7 @@ def test_create_load_balancer_pool "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109­4484-894a-09f332753169/pools?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109­4484-894a-09f332753169/pools?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5276,7 +5276,7 @@ def test_delete_load_balancer_pool "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/64d1a65c-d759-4e87-9dc5-ff570d41e4b6/pools/528c70d0-acc1-47c7-a32d-698c350f4f81?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/64d1a65c-d759-4e87-9dc5-ff570d41e4b6/pools/528c70d0-acc1-47c7-a32d-698c350f4f81?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_load_balancer_pool( load_balancer_id: "64d1a65c-d759-4e87-9dc5-ff570d41e4b6", @@ -5291,7 +5291,7 @@ def test_get_load_balancer_pool "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/64d1a65c-d759-4e87-9dc5-ff570d41e4b6/pools/528c70d0-acc1-47c7-a32d-698c350f4f81?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/64d1a65c-d759-4e87-9dc5-ff570d41e4b6/pools/528c70d0-acc1-47c7-a32d-698c350f4f81?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5311,7 +5311,7 @@ def test_update_load_balancer_pool "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/64d1a65c-d759-4e87-9dc5-ff570d41e4b6/pools/528c70d0-acc1-47c7-a32d-698c350f4f81?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/64d1a65c-d759-4e87-9dc5-ff570d41e4b6/pools/528c70d0-acc1-47c7-a32d-698c350f4f81?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5354,7 +5354,7 @@ def test_list_load_balancer_pool_members "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5382,7 +5382,7 @@ def test_create_load_balancer_pool_member "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5403,7 +5403,7 @@ def test_replace_load_balancer_pool_members "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5444,7 +5444,7 @@ def test_delete_load_balancer_pool_member "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members/daebeb48-1658-4772-8ca9-e410cd6e1415?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members/daebeb48-1658-4772-8ca9-e410cd6e1415?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.delete_load_balancer_pool_member( load_balancer_id: "2c791a20-4109-4484-894a-09f332753169", @@ -5468,7 +5468,7 @@ def test_get_load_balancer_pool_member "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members/daebeb48-1658-4772-8ca9-e410cd6e1415?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members/daebeb48-1658-4772-8ca9-e410cd6e1415?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5497,7 +5497,7 @@ def test_update_load_balancer_pool_member "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members/daebeb48-1658-4772-8ca9-e410cd6e1415?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/2c791a20-4109-4484-894a-09f332753169/pools/54ad563a-0261-11e9-8317-bec54e704988/members/daebeb48-1658-4772-8ca9-e410cd6e1415?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5523,7 +5523,7 @@ def test_list_endpoint_gateways "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5540,7 +5540,7 @@ def test_create_endpoint_gateway "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5567,7 +5567,7 @@ def test_list_endpoint_gateway_ips "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a/ips?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a/ips?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5585,7 +5585,7 @@ def test_remove_endpoint_gateway_ip "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a/ips/0716-9faf2f32-8528-4180-a14d-c1f6c5c83292?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a/ips/0716-9faf2f32-8528-4180-a14d-c1f6c5c83292?generation=2&version=2025-05-13") .to_return(status: 204, body: message_response.to_json, headers: headers) service.remove_endpoint_gateway_ip( endpoint_gateway_id: "r134-a4841334-b584-4293-938e-3bc63b4a5b6a", @@ -5615,7 +5615,7 @@ def test_get_endpoint_gateway_ip "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a/ips/0716-9faf2f32-8528-4180-a14d-c1f6c5c83292?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a/ips/0716-9faf2f32-8528-4180-a14d-c1f6c5c83292?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5634,7 +5634,7 @@ def test_add_endpoint_gateway_ip "Content-Type" => "application/json" } - stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a/ips/0716-9faf2f32-8528-4180-a14d-c1f6c5c83292?generation=2&version=2024-08-20") + stub_request(:put, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a/ips/0716-9faf2f32-8528-4180-a14d-c1f6c5c83292?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5653,7 +5653,7 @@ def test_delete_endpoint_gateway "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a?generation=2&version=2025-05-13") .to_return(status: 200, body: message_response.to_json, headers: headers) service.delete_endpoint_gateway( id: "r134-a4841334-b584-4293-938e-3bc63b4a5b6a" @@ -5667,7 +5667,7 @@ def test_get_endpoint_gateway "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5686,7 +5686,7 @@ def test_update_endpoint_gateway "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/endpoint_gateways/r134-a4841334-b584-4293-938e-3bc63b4a5b6a?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5706,7 +5706,7 @@ def test_list_flow_log_collectors "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5723,7 +5723,7 @@ def test_create_flow_log_collector "Content-Type" => "application/json" } - stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?generation=2&version=2024-08-20") + stub_request(:post, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5751,7 +5751,7 @@ def test_delete_flow_log_collector "Content-Type" => "application/json" } - stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/4dd1852a-3373-46c0-9240-f9c7f0d0c1a3?generation=2&version=2024-08-20") + stub_request(:delete, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/4dd1852a-3373-46c0-9240-f9c7f0d0c1a3?generation=2&version=2025-05-13") .to_return(status: 200, body: message_response.to_json, headers: headers) service.delete_flow_log_collector( id: "4dd1852a-3373-46c0-9240-f9c7f0d0c1a3" @@ -5765,7 +5765,7 @@ def test_get_flow_log_collector "Content-Type" => "application/json" } - stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/4dd1852a-3373-46c0-9240-f9c7f0d0c1a3?generation=2&version=2024-08-20") + stub_request(:get, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/4dd1852a-3373-46c0-9240-f9c7f0d0c1a3?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } ) @@ -5784,7 +5784,7 @@ def test_update_flow_log_collector "Content-Type" => "application/json" } - stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/4dd1852a-3373-46c0-9240-f9c7f0d0c1a3?generation=2&version=2024-08-20") + stub_request(:patch, "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/4dd1852a-3373-46c0-9240-f9c7f0d0c1a3?generation=2&version=2025-05-13") .with( headers: { "Accept" => "application/json" } )