ibm-vpc
Version:
IBM Cloud VPC Node.js SDK
775 lines • 2.15 MB
TypeScript
/**
* (C) Copyright IBM Corp. 2023, 2024, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/// <reference types="node" />
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
import { AbortSignal, BaseService, SDKLogger, UserOptions } from 'ibm-cloud-sdk-core';
/**
* The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage virtual server
* instances, along with subnets, volumes, load balancers, and more.
*
* API Version: 2025-04-22
*/
declare class VpcV1 extends BaseService {
static _logger: SDKLogger;
static DEFAULT_SERVICE_URL: string;
static DEFAULT_SERVICE_NAME: string;
private static _regionalEndpoints;
/**
* Returns the service URL associated with the specified region.
* @param region a string representing the region
* @returns the service URL associated with the specified region or undefined
* if no mapping for the region exists
*/
static getServiceUrlForRegion(region: string): string;
/*************************
* Factory method
************************/
/**
* Constructs an instance of VpcV1 with passed in options and external configuration.
*
* @param {UserOptions} [options] - The parameters to send to the service.
* @param {string} [options.serviceName] - The name of the service to configure
* @param {Authenticator} [options.authenticator] - The Authenticator object used to authenticate requests to the service
* @param {string} [options.serviceUrl] - The base URL for the service
* @returns {VpcV1}
*/
static newInstance(options: UserOptions): VpcV1;
/** The infrastructure generation. For the API behavior documented here, specify `2`. */
generation?: number;
/** The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between
* `2025-04-08` and `2025-04-23`.
*/
version: string;
/**
* Construct a VpcV1 object.
*
* @param {Object} options - Options for the service.
* @param {number} [options.generation] - The infrastructure generation. For the API behavior documented here, specify
* `2`.
* @param {string} options.version - The API version, in format `YYYY-MM-DD`. For the API behavior documented here,
* specify any date between `2025-04-08` and `2025-04-23`.
* @param {string} [options.serviceUrl] - The base URL for the service
* @param {OutgoingHttpHeaders} [options.headers] - Default headers that shall be included with every request to the service.
* @param {Authenticator} options.authenticator - The Authenticator object used to authenticate requests to the service
* @constructor
* @returns {VpcV1}
*/
constructor(options: UserOptions);
/*************************
* vPCs
************************/
/**
* List VPCs.
*
* This request lists VPCs in the region. A VPC is a virtual network that belongs to an account and provides logical
* isolation from other networks. A VPC is made up of resources in one or more zones. VPCs are regional, and each VPC
* can contain resources in multiple zones in a region.
*
* @param {Object} [params] - The parameters to send to the service.
* @param {string} [params.start] - A server-provided token determining what resource to start the page on.
* @param {number} [params.limit] - The number of resources to return on a page.
* @param {string} [params.resourceGroupId] - Filters the collection to resources with a `resource_group.id` property
* matching the specified identifier.
* @param {boolean} [params.classicAccess] - Filters the collection to VPCs with a `classic_access` property matching
* the specified value.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPCCollection>>}
*/
listVpcs(params?: VpcV1.ListVpcsParams): Promise<VpcV1.Response<VpcV1.VPCCollection>>;
/**
* Create a VPC.
*
* This request creates a new VPC from a VPC prototype object. The prototype object is structured in the same way as a
* retrieved VPC, and contains the information necessary to create the new VPC.
*
* @param {Object} [params] - The parameters to send to the service.
* @param {string} [params.addressPrefixManagement] - 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 will be created with no default address prefixes.
*
* Since address prefixes are managed identically regardless of whether they were automatically created, the value is
* not preserved as a VPC property.
* @param {boolean} [params.classicAccess] - Deprecated: Indicates whether this VPC will be connected to Classic
* Infrastructure. If true, this VPC's resources will have private network connectivity to the account's Classic
* Infrastructure resources. Only one VPC, per region, may be connected in this way. This value is set at creation and
* subsequently immutable.
*
* This property has been deprecated. Instead, use a [Transit Gateway](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 {VPCDNSPrototype} [params.dns] - The DNS configuration for this VPC.
*
* If unspecified, the system will assign DNS servers capable of resolving hosts and endpoint
* gateways within this VPC, and hosts on the internet.
* @param {string} [params.name] - The name for this VPC. The name must not be used by another VPC in the region. If
* unspecified, the name will be a hyphenated list of randomly-selected words.
* @param {ResourceGroupIdentity} [params.resourceGroup] - 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 {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPC>>}
*/
createVpc(params?: VpcV1.CreateVpcParams): Promise<VpcV1.Response<VpcV1.VPC>>;
/**
* Delete a VPC.
*
* This request deletes a VPC. This operation cannot be reversed.
*
* For this request to succeed:
* - Instances, subnets, public gateways, endpoint gateways, and private path service
* gateways must not reside in this VPC
* - The VPC must not be providing DNS resolution for any other VPCs
* - If `dns.enable_hub` is `true`, `dns.resolution_binding_count` must be zero
*
* All security groups and network ACLs associated with the VPC are automatically deleted. All flow log collectors
* with `auto_delete` set to `true` targeting the VPC or any resource in the VPC are automatically deleted.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The VPC identifier.
* @param {string} [params.ifMatch] - If present, the request will fail if the specified ETag value does not match the
* resource's current ETag value.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.EmptyObject>>}
*/
deleteVpc(params: VpcV1.DeleteVpcParams): Promise<VpcV1.Response<VpcV1.EmptyObject>>;
/**
* Retrieve a VPC.
*
* This request retrieves a single VPC specified by the identifier in the URL.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The VPC identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPC>>}
*/
getVpc(params: VpcV1.GetVpcParams): Promise<VpcV1.Response<VpcV1.VPC>>;
/**
* Update a VPC.
*
* This request updates a VPC with the information provided in a VPC patch object. The patch object is structured in
* the same way as a retrieved VPC and needs to contain only the information to be updated.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The VPC identifier.
* @param {VPCDNSPatch} [params.dns] - The DNS configuration for this VPC.
* @param {string} [params.name] - The name for this VPC. The name must not be used by another VPC in the region.
* @param {string} [params.ifMatch] - 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.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPC>>}
*/
updateVpc(params: VpcV1.UpdateVpcParams): Promise<VpcV1.Response<VpcV1.VPC>>;
/**
* Retrieve a VPC's default network ACL.
*
* This request retrieves the default network ACL for the VPC specified by the identifier in the URL. The default
* network ACL is applied to any new subnets in the VPC which do not specify a network ACL.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The VPC identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.DefaultNetworkACL>>}
*/
getVpcDefaultNetworkAcl(params: VpcV1.GetVpcDefaultNetworkAclParams): Promise<VpcV1.Response<VpcV1.DefaultNetworkACL>>;
/**
* Retrieve a VPC's default routing table.
*
* This request retrieves the default routing table for the VPC specified by the identifier in the URL. The default
* routing table is associated with any subnets in the VPC which have not been explicitly associated with another
* routing table.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The VPC identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.DefaultRoutingTable>>}
*/
getVpcDefaultRoutingTable(params: VpcV1.GetVpcDefaultRoutingTableParams): Promise<VpcV1.Response<VpcV1.DefaultRoutingTable>>;
/**
* Retrieve a VPC's default security group.
*
* This request retrieves the default security group for the VPC specified by the identifier in the URL. Resources
* created in this VPC that allow a security group to be optionally specified will use this security group by default.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The VPC identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.DefaultSecurityGroup>>}
*/
getVpcDefaultSecurityGroup(params: VpcV1.GetVpcDefaultSecurityGroupParams): Promise<VpcV1.Response<VpcV1.DefaultSecurityGroup>>;
/**
* List address prefixes for a VPC.
*
* This request lists address pool prefixes for a VPC.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} [params.start] - A server-provided token determining what resource to start the page on.
* @param {number} [params.limit] - The number of resources to return on a page.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.AddressPrefixCollection>>}
*/
listVpcAddressPrefixes(params: VpcV1.ListVpcAddressPrefixesParams): Promise<VpcV1.Response<VpcV1.AddressPrefixCollection>>;
/**
* Create an address prefix for a VPC.
*
* This request creates a new prefix from a prefix prototype object. The prototype object is structured in the same
* way as a retrieved prefix, and contains the information necessary to create the new prefix.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.cidr - The IPv4 range of the address prefix, expressed in CIDR format. The range must not
* overlap with any existing address prefixes in the VPC or any of the following reserved address ranges:
*
* - `127.0.0.0/8` (IPv4 loopback addresses)
* - `161.26.0.0/16` (IBM services)
* - `166.8.0.0/14` (Cloud Service Endpoints)
* - `169.254.0.0/16` (IPv4 link-local addresses)
* - `224.0.0.0/4` (IPv4 multicast addresses)
*
* The prefix length of the address prefix's CIDR must be between `/9` (8,388,608 addresses) and `/29` (8 addresses).
* @param {ZoneIdentity} params.zone - The zone this address prefix will reside in.
* @param {boolean} [params.isDefault] - Indicates whether this will be the default address prefix for this zone in
* this VPC. If `true`, the VPC must not have a default address prefix for this zone.
* @param {string} [params.name] - The name for this address prefix. The name must not be used by another address
* prefix for the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.AddressPrefix>>}
*/
createVpcAddressPrefix(params: VpcV1.CreateVpcAddressPrefixParams): Promise<VpcV1.Response<VpcV1.AddressPrefix>>;
/**
* Delete an address prefix.
*
* This request deletes a prefix. This operation cannot be reversed. The request will fail if any subnets use
* addresses from this prefix.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The prefix identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.EmptyObject>>}
*/
deleteVpcAddressPrefix(params: VpcV1.DeleteVpcAddressPrefixParams): Promise<VpcV1.Response<VpcV1.EmptyObject>>;
/**
* Retrieve an address prefix.
*
* This request retrieves a single prefix specified by the identifier in the URL.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The prefix identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.AddressPrefix>>}
*/
getVpcAddressPrefix(params: VpcV1.GetVpcAddressPrefixParams): Promise<VpcV1.Response<VpcV1.AddressPrefix>>;
/**
* Update an address prefix.
*
* This request updates a prefix with the information in a provided prefix patch. The prefix patch object is
* structured in the same way as a retrieved prefix and contains only the information to be updated.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The prefix identifier.
* @param {boolean} [params.isDefault] - Indicates whether this is the default prefix for this zone in this VPC.
* Updating to true makes this prefix the default prefix for this zone in this VPC, provided the VPC currently has no
* default address prefix for this zone. Updating to false removes the default prefix for this zone in this VPC.
* @param {string} [params.name] - The name for this address prefix. The name must not be used by another address
* prefix for the VPC.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.AddressPrefix>>}
*/
updateVpcAddressPrefix(params: VpcV1.UpdateVpcAddressPrefixParams): Promise<VpcV1.Response<VpcV1.AddressPrefix>>;
/**
* List DNS resolution bindings for a VPC.
*
* This request lists DNS resolution bindings for a VPC. A DNS resolution binding represents an association with
* another VPC for centralizing DNS name resolution.
*
* If the VPC specified by the identifier in the URL is a DNS hub VPC (has `dns.enable_hub` set to `true`) then there
* is one binding for each VPC bound to the hub VPC. The endpoint gateways in the bound VPCs can allow (using
* `allow_dns_resolution_binding`) the hub VPC to centralize resolution of their DNS names.
*
* If the VPC specified by the identifier in the URL is not a DNS hub VPC, then there is at most one binding (to a hub
* VPC). The endpoint gateways in the VPC specified by the identifier in the URL can allow (using
* `allow_dns_resolution_binding`) its hub VPC to centralize resolution of their DNS names.
*
* To make use of centralized DNS resolution, a VPC bound to a DNS hub VPC must delegate DNS resolution to its hub VPC
* by setting `dns.resolver.type` to `delegate`.
*
* The bindings will be sorted by their `created_at` property values, with newest bindings first. Bindings with
* identical `created_at` property values will in turn be sorted by ascending `name` property values.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} [params.sort] - 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 {string} [params.start] - A server-provided token determining what resource to start the page on.
* @param {number} [params.limit] - The number of resources to return on a page.
* @param {string} [params.name] - Filters the collection to resources with a `name` property matching the exact
* specified name.
* @param {string} [params.vpcCrn] - Filters the collection to resources with a `vpc.crn` property matching the
* specified CRN.
* @param {string} [params.vpcName] - Filters the collection to resources with a `vpc.name` property matching the
* exact specified name.
* @param {string} [params.accountId] - Filters the collection to resources with a `vpc.remote.account.id` property
* matching the specified account identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBindingCollection>>}
*/
listVpcDnsResolutionBindings(params: VpcV1.ListVpcDnsResolutionBindingsParams): Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBindingCollection>>;
/**
* Create a DNS resolution binding.
*
* This request creates a new DNS resolution binding from a DNS resolution binding prototype object. The prototype
* object is structured in the same way as a retrieved DNS resolution binding, and contains the information necessary
* to create the new DNS resolution binding.
*
* For this request to succeed, `dns.enable_hub` must be `false` for the VPC specified by the identifier in the URL,
* and the VPC must not already have a DNS resolution binding.
*
* See [About DNS sharing for VPE gateways](/docs/vpc?topic=vpc-vpe-dns-sharing) for more information.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {VPCIdentity} params.vpc - Another VPC to bind this VPC to for DNS resolution. The VPC must have
* `dns.enable_hub` set to `true`, and may be in a different account (subject to
* IAM policies).
*
* Additionally, the VPC specified in the URL (this VPC) must have `dns.enable_hub`
* set to `false` and a `dns.resolution_binding_count` of zero.
* @param {string} [params.name] - 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.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBinding>>}
*/
createVpcDnsResolutionBinding(params: VpcV1.CreateVpcDnsResolutionBindingParams): Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBinding>>;
/**
* Delete a DNS resolution binding.
*
* This request deletes a DNS resolution binding. This operation cannot be reversed.
*
* For this request to succeed, the VPC specified by the identifier in the URL must not have
* `dns.resolver.type` set to `delegated`.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The DNS resolution binding identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBinding>>}
*/
deleteVpcDnsResolutionBinding(params: VpcV1.DeleteVpcDnsResolutionBindingParams): Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBinding>>;
/**
* Retrieve a DNS resolution binding.
*
* This request retrieves a single DNS resolution binding specified by the identifier in the URL.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The DNS resolution binding identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBinding>>}
*/
getVpcDnsResolutionBinding(params: VpcV1.GetVpcDnsResolutionBindingParams): Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBinding>>;
/**
* Update a DNS resolution binding.
*
* This request updates a DNS resolution binding with the information in a provided DNS resolution binding patch. The
* DNS resolution binding patch object is structured in the same way as a retrieved DNS resolution binding and
* contains only the information to be updated.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The DNS resolution binding identifier.
* @param {string} [params.name] - The name for this DNS resolution binding. The name must not be used by another DNS
* resolution binding for the VPC.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBinding>>}
*/
updateVpcDnsResolutionBinding(params: VpcV1.UpdateVpcDnsResolutionBindingParams): Promise<VpcV1.Response<VpcV1.VPCDNSResolutionBinding>>;
/**
* List routes in a VPC's default routing table.
*
* This request lists routes in the VPC's default routing table. Each route is zone-specific and directs any packets
* matching its destination CIDR block to a `next_hop` IP address. The most specific route matching a packet's
* destination will be used. If multiple equally-specific routes exist, traffic will be distributed across them.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} [params.zoneName] - Filters the collection to resources with a `zone.name` property matching the
* exact specified name.
* @param {string} [params.start] - A server-provided token determining what resource to start the page on.
* @param {number} [params.limit] - The number of resources to return on a page.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.RouteCollectionVPCContext>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
listVpcRoutes(params: VpcV1.ListVpcRoutesParams): Promise<VpcV1.Response<VpcV1.RouteCollectionVPCContext>>;
/**
* Create a route in a VPC's default routing table.
*
* This request creates a new route in the VPC's default routing table. The route prototype object is structured in
* the same way as a retrieved route, and contains the information necessary to create the new route. The request will
* fail if the new route will cause a loop.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.destination - The destination CIDR of the route. The host identifier in the CIDR must be
* zero.
*
* At most two routes per `zone` in a table can have the same `destination` and
* `priority`, and only if both routes have an `action` of `deliver` and the `next_hop` is an IP address.
* @param {ZoneIdentity} params.zone - The zone to apply the route to.
*
* If subnets are attached to the route's routing table, egress traffic from those
* subnets in this zone will be subject to this route. If this route's routing table
* has any of `route_direct_link_ingress`, `route_internet_ingress`,
* `route_transit_gateway_ingress` or `route_vpc_zone_ingress` set to`true`, traffic
* from those ingress sources arriving in this zone will be subject to this route.
* @param {string} [params.action] - The action to perform with a packet matching the route:
* - `delegate`: delegate to system-provided routes
* - `delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound routes
* - `deliver`: deliver the packet to the specified `next_hop`
* - `drop`: drop the packet.
* @param {boolean} [params.advertise] - Indicates whether this route will be advertised to the ingress sources
* specified by the `advertise_routes_to` routing table property.
*
* All routes in a routing table with the same `destination` and `zone` must have the same
* `advertise` value.
* @param {string} [params.name] - The name for this route. The name must not be used by another route in the routing
* table. Names starting with `ibm-` are reserved for system-provided routes, and are not allowed. If unspecified, the
* name will be a hyphenated list of randomly-selected words.
* @param {RouteNextHopPrototype} [params.nextHop] - If `action` is `deliver`, the next hop that packets will be
* delivered to (must not be
* `0.0.0.0`). For other `action` values, it must be omitted or specified as `0.0.0.0`.
*
* At most two routes per `zone` in a table can have the same `destination` and `priority`,
* and only when each route has an `action` of `deliver` and `next_hop` is an IP address.
* @param {number} [params.priority] - The priority of this route. Smaller values have higher priority.
*
* If a routing table contains multiple routes with the same `zone` and `destination`, the route with the highest
* priority (smallest value) is selected. If two routes have the same `destination` and `priority`, traffic is
* distributed between them.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.Route>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
createVpcRoute(params: VpcV1.CreateVpcRouteParams): Promise<VpcV1.Response<VpcV1.Route>>;
/**
* Delete a VPC route.
*
* This request deletes a route. This operation cannot be reversed.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The route identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.EmptyObject>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
deleteVpcRoute(params: VpcV1.DeleteVpcRouteParams): Promise<VpcV1.Response<VpcV1.EmptyObject>>;
/**
* Retrieve a VPC route.
*
* This request retrieves a single route specified by the identifier in the URL.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The route identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.Route>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
getVpcRoute(params: VpcV1.GetVpcRouteParams): Promise<VpcV1.Response<VpcV1.Route>>;
/**
* Update a VPC route.
*
* This request updates a route with the information in a provided route patch. The route patch object is structured
* in the same way as a retrieved route and contains only the information to be updated.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The route identifier.
* @param {boolean} [params.advertise] - Indicates whether this route will be advertised to the ingress sources
* specified by the `advertise_routes_to` routing table property.
*
* Since all routes in a routing table with the same `destination` and `zone` must have the same `advertise` value,
* this property can only be changed for routes with a unique
* `destination` and `zone` in the routing table. For more information, see [Advertising
* routes](https://cloud.ibm.com/docs/vpc?topic=vpc-about-custom-routes#rt-advertising-routes).
* @param {string} [params.name] - The name for this route. The name must not be used by another route in the routing
* table. Names starting with `ibm-` are reserved for system-provided routes, and are not allowed.
* @param {RouteNextHopPatch} [params.nextHop] - If `action` is `deliver`, the next hop that packets will be delivered
* to (must not be
* `0.0.0.0`). For other `action` values, specify `0.0.0.0` or remove it by specifying
* `null`.
*
* At most two routes per `zone` in a table can have the same `destination` and `priority`,
* and only when each route has an `action` of `deliver` and `next_hop` is an IP address.
* @param {number} [params.priority] - The priority of this route. Smaller values have higher priority.
*
* If a routing table contains multiple routes with the same `zone` and `destination`, the route with the highest
* priority (smallest value) is selected. If two routes have the same `destination` and `priority`, traffic is
* distributed between them.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.Route>>}
* @deprecated this method is deprecated and may be removed in a future release
*/
updateVpcRoute(params: VpcV1.UpdateVpcRouteParams): Promise<VpcV1.Response<VpcV1.Route>>;
/**
* List routing tables for a VPC.
*
* This request lists routing tables for a VPC. Each subnet in a VPC is associated with a routing table, which
* controls delivery of packets sent on that subnet according to the action of the most specific matching route in the
* table. If multiple equally-specific routes exist, traffic will be distributed across them. If no routes match,
* delivery will be controlled by the system's built-in routes.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} [params.start] - A server-provided token determining what resource to start the page on.
* @param {number} [params.limit] - The number of resources to return on a page.
* @param {boolean} [params.isDefault] - Filters the collection to routing tables with an `is_default` property
* matching the specified value.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.RoutingTableCollection>>}
*/
listVpcRoutingTables(params: VpcV1.ListVpcRoutingTablesParams): Promise<VpcV1.Response<VpcV1.RoutingTableCollection>>;
/**
* Create a routing table for a VPC.
*
* This request creates a routing table from a routing table prototype object. The prototype object is structured in
* the same way as a retrieved routing table, and contains the information necessary to create the new routing table.
*
* At present, the routing table's `resource_group` will be inherited from its VPC, but may be specifiable in the
* future.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {ResourceFilter[]} [params.acceptRoutesFrom] - 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 {string[]} [params.advertiseRoutesTo] - The ingress sources to advertise routes to. Routes in the table with
* `advertise` enabled will be advertised to these sources.
* @param {string} [params.name] - The name for this routing table. The name must not be used by another routing table
* in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words.
* @param {boolean} [params.routeDirectLinkIngress] - If set to `true`, this routing table will be used to route
* traffic that originates from [Direct Link](https://cloud.ibm.com/docs/dl) to this VPC. The VPC must not already
* have a routing table with this property set to `true`.
*
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
* `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route's `zone` that is
* able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway
* connection, the packet will be dropped.
*
* If [Classic Access](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is
* enabled for this VPC, and this property is set to `true`, its incoming traffic will also be routed according to
* this routing table.
* @param {boolean} [params.routeInternetIngress] - If set to `true`, this routing table will be used to route traffic
* that originates from the internet. For this to succeed, the VPC must not already have a routing table with this
* property set to `true`.
*
* Incoming traffic will be routed according to the routing table with two exceptions:
* - Traffic destined for IP addresses associated with public gateways will not be
* subject to routes in this routing table.
* - Routes with an `action` of `deliver` are treated as `drop` unless the `next_hop` is
* an IP address in a subnet in the route's `zone` that is able to accept traffic.
* Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway
* connection, the packet will be dropped.
* @param {boolean} [params.routeTransitGatewayIngress] - If set to `true`, this routing table will be used to route
* traffic that originates from [Transit Gateway](https://cloud.ibm.com/docs/transit-gateway) to this VPC. The VPC
* must not already have a routing table with this property set to `true`.
*
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
* `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route's `zone` that is
* able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway
* connection, the packet will be dropped.
* @param {boolean} [params.routeVpcZoneIngress] - If set to `true`, this routing table will be used to route traffic
* that originates from subnets in other zones in this VPC. The VPC must not already have a routing table with this
* property set to `true`.
*
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
* `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route's `zone` that is
* able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway
* connection, the packet will be dropped.
* @param {RoutePrototype[]} [params.routes] - The prototype objects for routes to create for this routing table. If
* unspecified, the routing table will be created with no routes.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.RoutingTable>>}
*/
createVpcRoutingTable(params: VpcV1.CreateVpcRoutingTableParams): Promise<VpcV1.Response<VpcV1.RoutingTable>>;
/**
* Delete a VPC routing table.
*
* This request deletes a routing table. A routing table cannot be deleted if it is associated with any subnets in
* the VPC. Additionally, a VPC's default routing table cannot be deleted. This operation cannot be reversed.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The routing table identifier.
* @param {string} [params.ifMatch] - If present, the request will fail if the specified ETag value does not match the
* resource's current ETag value.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.EmptyObject>>}
*/
deleteVpcRoutingTable(params: VpcV1.DeleteVpcRoutingTableParams): Promise<VpcV1.Response<VpcV1.EmptyObject>>;
/**
* Retrieve a VPC routing table.
*
* This request retrieves a single routing table specified by the identifier in the URL.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The routing table identifier.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.RoutingTable>>}
*/
getVpcRoutingTable(params: VpcV1.GetVpcRoutingTableParams): Promise<VpcV1.Response<VpcV1.RoutingTable>>;
/**
* Update a VPC routing table.
*
* This request updates a routing table with the information in a provided routing table patch. The patch object is
* structured in the same way as a retrieved table and contains only the information to be updated.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.id - The routing table identifier.
* @param {ResourceFilter[]} [params.acceptRoutesFrom] - The filters specifying the resources that may create routes
* in this routing table
* (replacing any existing filters). All routes created by resources that match a given filter will be removed when an
* existing filter is removed. Therefore, if an empty array is specified, all filters will be removed, resulting in
* all routes not directly created by the user being removed.
*
* If specified, `resource_type` must be `vpn_gateway` or `vpn_server`.
* @param {string[]} [params.advertiseRoutesTo] - The ingress sources to advertise routes to, replacing any existing
* sources to advertise to. Routes in the table with `advertise` enabled will be advertised to these sources.
* @param {string} [params.name] - The name for this routing table. The name must not be used by another routing table
* in the VPC.
* @param {boolean} [params.routeDirectLinkIngress] - Indicates whether this routing table is used to route traffic
* that originates from
* [Direct Link](https://cloud.ibm.com/docs/dl/) to this VPC. Updating to `true` selects this routing table, provided
* no other routing table in the VPC already has this property set to `true`, and no subnets are attached to this
* routing table. Updating to
* `false` deselects this routing table, provided `direct_link` is absent from
* `advertise_routes_to`.
*
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
* `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route's `zone` that is
* able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway
* connection, the packet will be dropped.
* @param {boolean} [params.routeInternetIngress] - Indicates whether this routing table is used to route traffic that
* originates from the internet. Updating to `true` selects this routing table, provided no other routing table in
* the VPC already has this property set to `true`. Updating to `false` deselects this routing table.
*
* Incoming traffic will be routed according to the routing table with two exceptions:
* - Traffic destined for IP addresses associated with public gateways will not be subject
* to routes in this routing table.
* - Routes with an `action` of `deliver` are treated as `drop` unless the `next_hop` is an
* IP address in a subnet in the route's `zone` that is able to accept traffic.
* Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway
* connection, the packet will be dropped.
* @param {boolean} [params.routeTransitGatewayIngress] - Indicates whether this routing table is used to route
* traffic that originates from
* [Transit Gateway](https://cloud.ibm.com/docs/transit-gateway) to this VPC. Updating to
* `true` selects this routing table, provided no other routing table in the VPC already has this property set to
* `true`, and no subnets are attached to this routing table. Updating to `false` deselects this routing table,
* provided `transit_gateway` is absent from `advertise_routes_to`.
*
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
* `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route's `zone` that is
* able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway
* connection, the packet will be dropped.
*
* If [Classic Access](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is
* enabled for this VPC, and this property is set to `true`, its incoming traffic will also be routed according to
* this routing table.
* @param {boolean} [params.routeVpcZoneIngress] - Indicates whether this routing table is used to route traffic that
* originates from subnets in other zones in this VPC. Updating to `true` selects this routing table, provided no
* other routing table in the VPC already has this property set to `true`, and no subnets are attached to this routing
* table. Updating to `false` deselects this routing table.
*
* Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
* `deliver` are treated as `drop` unless the `next_hop` is an IP address in a subnet in the route's `zone` that is
* able to accept traffic. Therefore, if an incoming packet matches a route with a `next_hop` of a VPN gateway
* connection, the packet will be dropped.
* @param {string} [params.ifMatch] - 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.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.RoutingTable>>}
*/
updateVpcRoutingTable(params: VpcV1.UpdateVpcRoutingTableParams): Promise<VpcV1.Response<VpcV1.RoutingTable>>;
/**
* List routes in a VPC routing table.
*
* This request lists routes in a VPC routing table. If subnets are associated with this routing table, delivery of
* packets sent on a subnet is performed according to the action of the most specific matching route in the table
* (provided the subnet and route are in the same zone). If multiple equally-specific routes exist, the route with the
* highest priority will be used. If two matching routes have the same destination and priority, traffic will be
* distributed between them. If no routes match, delivery will be controlled by the system's built-in routes.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.routingTableId - The routing table identifier.
* @param {string} [params.start] - A server-provided token determining what resource to start the page on.
* @param {number} [params.limit] - The number of resources to return on a page.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<VpcV1.Response<VpcV1.RouteCollection>>}
*/
listVpcRoutingTableRoutes(params: VpcV1.ListVpcRoutingTableRoutesParams): Promise<VpcV1.Response<VpcV1.RouteCollection>>;
/**
* Create a route in a VPC routing table.
*
* This request creates a new VPC route from a VPC route prototype object. The prototype object is structured in the
* same way as a retrieved VPC route and contains the information necessary to create the route.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.vpcId - The VPC identifier.
* @param {string} params.routingTableId - The routing table identifier.
* @param {string} params.destination - The destination CIDR of the route. The host identifier in the CIDR must be
* zero.
*
* At most two routes per `zone` in a table can have the same `destination` and
* `priority`, and only if both routes have an `action` of `deliver` and the `next_hop` is an IP address.
* @param {ZoneIdentity} params.zone - The zone to apply the route to.
*
* If subnets are attached to the route's routing table, egress traffic from those
* subnets in this zone will be subject to this route. If this route's routing table
* has any of `route_direct_link_ingress`, `route_internet_ingress`,
* `route_transit_gateway_ingress` or `route_vpc_zone_ingress` set to`true`, traffic
* from those ingress sources arriving in this zone will be subject to this route.
* @param {string} [params.action] - The action to perform with a packet matching the route:
* - `delegate`: delegate to system-provided routes
* - `delegate_vpc`: delegate to system-provided routes, ignoring Internet-bound routes
* - `deliver`: deliver the packet to the specified `next_hop`
* - `drop`: drop the packet.
* @param {boolean} [params.advertise] - Indicates whether this route will be advertised to the ingress sources
* specified by the `advertise_routes_to` routing table property.
*
* All routes in a routing table with the same `destination` and `zone` must have the same
* `advertise` value.
* @param {string} [params.name] - The name for this route. The name must not be used by another route in the routing
* table. Names starting with `ibm-` are reserved for system-provided routes, and are not allowed. If unspecified, the
* name will be a hyphenated list of randomly-selected words.
* @param {RouteNextHopPrototype} [params.nextHop] - If `action` is `deliver`, the next hop that packets will be
* delivered to (must not be
* `0.0.0.0`). For other `action` values, it must be omitted or specified as `0.0.0.0`.
*
* At most two routes per `zone` in a table can have the same `destination` and `priority`,
* and only when each route has an `action` of `deliver` and `next_hop` is an IP address.
* @param {number} [params.priority] - The priority of this route. Smaller values have higher priority.
*
* If a routing ta