From fc0bffff3432a63b37ced90ab1e3cc4e55a24035 Mon Sep 17 00:00:00 2001 From: Joseph Kalandarishvili Date: Thu, 13 Aug 2026 09:00:06 -0500 Subject: [PATCH 1/6] feat: Added Redundant Global TGW related changes dependency: none Signed-off-by: Joseph Kalandarishvili --- test/unit/transit-gateway-apis.v1.test.js | 292 ++++- transit-gateway-apis/v1.ts | 1242 +++++++++++---------- 2 files changed, 924 insertions(+), 610 deletions(-) diff --git a/test/unit/transit-gateway-apis.v1.test.js b/test/unit/transit-gateway-apis.v1.test.js index a01e4b3..bda8bba 100644 --- a/test/unit/transit-gateway-apis.v1.test.js +++ b/test/unit/transit-gateway-apis.v1.test.js @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2025. + * (C) Copyright IBM Corp. 2026. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ * limitations under the License. */ -/* eslint-disable no-await-in-loop */ - -const nock = require('nock'); - // need to import the whole package to mock getAuthenticatorFromEnvironment const sdkCorePackage = require('ibm-cloud-sdk-core'); -const { NoAuthAuthenticator } = sdkCorePackage; +const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage; + const TransitGatewayApisV1 = require('../../dist/transit-gateway-apis/v1'); +const nock = require('nock'); + +/* eslint-disable no-await-in-loop */ const { getOptions, @@ -30,7 +30,7 @@ const { checkMediaHeaders, expectToBePromise, checkForSuccessfulExecution, -} = require('@ibm-cloud/sdk-test-utilities'); +} = unitTestUtils; const transitGatewayApisServiceOptions = { authenticator: new NoAuthAuthenticator(), @@ -62,6 +62,7 @@ getAuthenticatorMock.mockImplementation(() => new NoAuthAuthenticator()); let requiredGlobals; describe('TransitGatewayApisV1', () => { + beforeEach(() => { mock_createRequest(); // these are changed when passed into the factory/constructor, so re-init @@ -76,7 +77,7 @@ describe('TransitGatewayApisV1', () => { } getAuthenticatorMock.mockClear(); }); - + describe('the newInstance method', () => { test('should use defaults when options not provided', () => { const testInstance = TransitGatewayApisV1.newInstance(requiredGlobals); @@ -150,9 +151,11 @@ describe('TransitGatewayApisV1', () => { // Construct the params object for operation listTransitGateways const limit = 50; const start = 'testString'; + const redundancyGroup = 'testString'; const listTransitGatewaysParams = { limit, start, + redundancyGroup, }; const listTransitGatewaysResult = transitGatewayApisService.listTransitGateways(listTransitGatewaysParams); @@ -172,6 +175,7 @@ describe('TransitGatewayApisV1', () => { expect(mockRequestOptions.qs.version).toEqual(transitGatewayApisServiceOptions.version); expect(mockRequestOptions.qs.limit).toEqual(limit); expect(mockRequestOptions.qs.start).toEqual(start); + expect(mockRequestOptions.qs.redundancy_group).toEqual(redundancyGroup); } test('should pass the right params to createRequest with enable and disable retries', () => { @@ -215,16 +219,16 @@ describe('TransitGatewayApisV1', () => { const serviceUrl = transitGatewayApisServiceOptions.url; const path = '/transit_gateways'; const mockPagerResponse1 = - '{"next":{"start":"1"},"transit_gateways":[{"connection_count":5,"connection_needs_attention":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4","global":true,"gre_enhanced_route_propagation":true,"id":"0a06fb9b-820f-4c44-8a31-77f1f0806d28","location":"us-south","name":"my-transit-gateway-in-TransitGateway","resource_group":{"href":"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8","id":"56969d6043e9465c883cb9f7363e78e8"},"status":"available","updated_at":"2019-01-01T12:00:00.000Z"}],"total_count":2,"limit":1}'; + '{"next":{"start":"1"},"transit_gateways":[{"connection_count":5,"connection_needs_attention":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4","global":true,"gre_enhanced_route_propagation":true,"id":"0a06fb9b-820f-4c44-8a31-77f1f0806d28","location":"us-south","name":"my-transit-gateway-in-TransitGateway","redundancy_group":"rg-1","redundancy_group_id":"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4","resource_group":{"href":"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8","id":"56969d6043e9465c883cb9f7363e78e8"},"status":"available","updated_at":"2019-01-01T12:00:00.000Z"}],"total_count":2,"limit":1}'; const mockPagerResponse2 = - '{"transit_gateways":[{"connection_count":5,"connection_needs_attention":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4","global":true,"gre_enhanced_route_propagation":true,"id":"0a06fb9b-820f-4c44-8a31-77f1f0806d28","location":"us-south","name":"my-transit-gateway-in-TransitGateway","resource_group":{"href":"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8","id":"56969d6043e9465c883cb9f7363e78e8"},"status":"available","updated_at":"2019-01-01T12:00:00.000Z"}],"total_count":2,"limit":1}'; + '{"transit_gateways":[{"connection_count":5,"connection_needs_attention":true,"created_at":"2019-01-01T12:00:00.000Z","crn":"crn:v1:bluemix:public:transit:dal03:a/57a7d05f36894e3cb9b46a43556d903e::gateway:ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4","global":true,"gre_enhanced_route_propagation":true,"id":"0a06fb9b-820f-4c44-8a31-77f1f0806d28","location":"us-south","name":"my-transit-gateway-in-TransitGateway","redundancy_group":"rg-1","redundancy_group_id":"ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4","resource_group":{"href":"https://resource-manager.bluemix.net/v1/resource_groups/56969d6043e9465c883cb9f7363e78e8","id":"56969d6043e9465c883cb9f7363e78e8"},"status":"available","updated_at":"2019-01-01T12:00:00.000Z"}],"total_count":2,"limit":1}'; beforeEach(() => { unmock_createRequest(); const scope = nock(serviceUrl) - .get((uri) => uri.includes(path)) + .get(uri => uri.includes(path)) .reply(200, mockPagerResponse1) - .get((uri) => uri.includes(path)) + .get(uri => uri.includes(path)) .reply(200, mockPagerResponse2); }); @@ -236,6 +240,7 @@ describe('TransitGatewayApisV1', () => { test('getNext()', async () => { const params = { limit: 10, + redundancyGroup: 'testString', }; const allResults = []; const pager = new TransitGatewayApisV1.TransitGatewaysPager(transitGatewayApisService, params); @@ -251,6 +256,7 @@ describe('TransitGatewayApisV1', () => { test('getAll()', async () => { const params = { limit: 10, + redundancyGroup: 'testString', }; const pager = new TransitGatewayApisV1.TransitGatewaysPager(transitGatewayApisService, params); const allResults = await pager.getAll(); @@ -275,12 +281,14 @@ describe('TransitGatewayApisV1', () => { const name = 'my-transit-gateway-in-TransitGateway'; const global = true; const greEnhancedRoutePropagation = true; + const redundancyGroup = 'rg-1'; const resourceGroup = resourceGroupIdentityModel; const createTransitGatewayParams = { location, name, global, greEnhancedRoutePropagation, + redundancyGroup, resourceGroup, }; @@ -302,6 +310,7 @@ describe('TransitGatewayApisV1', () => { expect(mockRequestOptions.body.name).toEqual(name); expect(mockRequestOptions.body.global).toEqual(global); expect(mockRequestOptions.body.gre_enhanced_route_propagation).toEqual(greEnhancedRoutePropagation); + expect(mockRequestOptions.body.redundancy_group).toEqual(redundancyGroup); expect(mockRequestOptions.body.resource_group).toEqual(resourceGroup); expect(mockRequestOptions.qs.version).toEqual(transitGatewayApisServiceOptions.version); } @@ -544,11 +553,13 @@ describe('TransitGatewayApisV1', () => { const global = true; const greEnhancedRoutePropagation = true; const name = 'my-resource'; + const redundancyGroup = 'rg-1'; const updateTransitGatewayParams = { id, global, greEnhancedRoutePropagation, name, + redundancyGroup, }; const updateTransitGatewayResult = transitGatewayApisService.updateTransitGateway(updateTransitGatewayParams); @@ -568,6 +579,7 @@ describe('TransitGatewayApisV1', () => { expect(mockRequestOptions.body.global).toEqual(global); expect(mockRequestOptions.body.gre_enhanced_route_propagation).toEqual(greEnhancedRoutePropagation); expect(mockRequestOptions.body.name).toEqual(name); + expect(mockRequestOptions.body.redundancy_group).toEqual(redundancyGroup); expect(mockRequestOptions.qs.version).toEqual(transitGatewayApisServiceOptions.version); expect(mockRequestOptions.path.id).toEqual(id); } @@ -707,16 +719,16 @@ describe('TransitGatewayApisV1', () => { const serviceUrl = transitGatewayApisServiceOptions.url; const path = '/connections'; const mockPagerResponse1 = - '{"next":{"start":"1"},"total_count":2,"limit":1,"connections":[{"base_network_type":"classic","name":"Transit_Service_BWTN_SJ_DL","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","network_type":"vpc","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","base_connection_id":"975f58c1-afe7-469a-9727-7f3d720f2d32","created_at":"2019-01-01T12:00:00.000Z","local_bgp_asn":64490,"local_gateway_ip":"192.168.100.1","local_tunnel_ip":"192.168.129.2","mtu":9000,"network_account_id":"network_account_id","prefix_filters":[{"action":"permit","before":"1a15dcab-7e40-45e1-b7c5-bc690eaa9782","created_at":"2019-01-01T12:00:00.000Z","ge":0,"id":"1a15dcab-7e30-45e1-b7c5-bc690eaa9865","le":32,"prefix":"192.168.100.0/24","updated_at":"2019-01-01T12:00:00.000Z"}],"prefix_filters_default":"permit","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.63.12","remote_tunnel_ip":"192.168.129.1","request_status":"pending","status":"attached","transit_gateway":{"crn":"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44","id":"456f58c1-afe7-123a-0a0a-7f3d720f1a44","name":"my-transit-gw100"},"tunnels":[{"base_network_type":"classic","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":13,"local_gateway_ip":"10.242.63.12","local_tunnel_ip":"192.168.100.20","mtu":9000,"name":"gre1","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.33.22","remote_tunnel_ip":"192.168.129.1","status":"attached","updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}],"updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}]}'; + '{"next":{"start":"1"},"total_count":2,"limit":1,"connections":[{"base_network_type":"classic","name":"Transit_Service_BWTN_SJ_DL","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","network_type":"vpc","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","base_connection_id":"975f58c1-afe7-469a-9727-7f3d720f2d32","cidr":"198.19.174.0/23","created_at":"2019-01-01T12:00:00.000Z","local_bgp_asn":64490,"local_gateway_ip":"192.168.100.1","local_tunnel_ip":"192.168.129.2","mtu":9000,"network_account_id":"network_account_id","prefix_filters":[{"action":"permit","before":"1a15dcab-7e40-45e1-b7c5-bc690eaa9782","created_at":"2019-01-01T12:00:00.000Z","ge":0,"id":"1a15dcab-7e30-45e1-b7c5-bc690eaa9865","le":32,"prefix":"192.168.100.0/24","updated_at":"2019-01-01T12:00:00.000Z"}],"prefix_filters_default":"permit","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.63.12","remote_tunnel_ip":"192.168.129.1","request_status":"pending","status":"attached","transit_gateway":{"crn":"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44","id":"456f58c1-afe7-123a-0a0a-7f3d720f1a44","name":"my-transit-gw100"},"tunnels":[{"base_network_type":"classic","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":1,"local_gateway_ip":"10.242.63.12","local_tunnel_ip":"192.168.100.20","mtu":9000,"name":"gre1","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.33.22","remote_tunnel_ip":"192.168.129.1","status":"attached","updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}],"updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}]}'; const mockPagerResponse2 = - '{"total_count":2,"limit":1,"connections":[{"base_network_type":"classic","name":"Transit_Service_BWTN_SJ_DL","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","network_type":"vpc","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","base_connection_id":"975f58c1-afe7-469a-9727-7f3d720f2d32","created_at":"2019-01-01T12:00:00.000Z","local_bgp_asn":64490,"local_gateway_ip":"192.168.100.1","local_tunnel_ip":"192.168.129.2","mtu":9000,"network_account_id":"network_account_id","prefix_filters":[{"action":"permit","before":"1a15dcab-7e40-45e1-b7c5-bc690eaa9782","created_at":"2019-01-01T12:00:00.000Z","ge":0,"id":"1a15dcab-7e30-45e1-b7c5-bc690eaa9865","le":32,"prefix":"192.168.100.0/24","updated_at":"2019-01-01T12:00:00.000Z"}],"prefix_filters_default":"permit","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.63.12","remote_tunnel_ip":"192.168.129.1","request_status":"pending","status":"attached","transit_gateway":{"crn":"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44","id":"456f58c1-afe7-123a-0a0a-7f3d720f1a44","name":"my-transit-gw100"},"tunnels":[{"base_network_type":"classic","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":13,"local_gateway_ip":"10.242.63.12","local_tunnel_ip":"192.168.100.20","mtu":9000,"name":"gre1","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.33.22","remote_tunnel_ip":"192.168.129.1","status":"attached","updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}],"updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}]}'; + '{"total_count":2,"limit":1,"connections":[{"base_network_type":"classic","name":"Transit_Service_BWTN_SJ_DL","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","network_type":"vpc","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","base_connection_id":"975f58c1-afe7-469a-9727-7f3d720f2d32","cidr":"198.19.174.0/23","created_at":"2019-01-01T12:00:00.000Z","local_bgp_asn":64490,"local_gateway_ip":"192.168.100.1","local_tunnel_ip":"192.168.129.2","mtu":9000,"network_account_id":"network_account_id","prefix_filters":[{"action":"permit","before":"1a15dcab-7e40-45e1-b7c5-bc690eaa9782","created_at":"2019-01-01T12:00:00.000Z","ge":0,"id":"1a15dcab-7e30-45e1-b7c5-bc690eaa9865","le":32,"prefix":"192.168.100.0/24","updated_at":"2019-01-01T12:00:00.000Z"}],"prefix_filters_default":"permit","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.63.12","remote_tunnel_ip":"192.168.129.1","request_status":"pending","status":"attached","transit_gateway":{"crn":"crn:v1:bluemix:public:transit:us-south:a/123456::gateway:456f58c1-afe7-123a-0a0a-7f3d720f1a44","id":"456f58c1-afe7-123a-0a0a-7f3d720f1a44","name":"my-transit-gw100"},"tunnels":[{"base_network_type":"classic","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":1,"local_gateway_ip":"10.242.63.12","local_tunnel_ip":"192.168.100.20","mtu":9000,"name":"gre1","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.33.22","remote_tunnel_ip":"192.168.129.1","status":"attached","updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}],"updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}]}'; beforeEach(() => { unmock_createRequest(); const scope = nock(serviceUrl) - .get((uri) => uri.includes(path)) + .get(uri => uri.includes(path)) .reply(200, mockPagerResponse1) - .get((uri) => uri.includes(path)) + .get(uri => uri.includes(path)) .reply(200, mockPagerResponse2); }); @@ -853,16 +865,16 @@ describe('TransitGatewayApisV1', () => { const serviceUrl = transitGatewayApisServiceOptions.url; const path = '/transit_gateways/testString/connections'; const mockPagerResponse1 = - '{"next":{"start":"1"},"total_count":2,"limit":1,"connections":[{"base_connection_id":"975f58c1-afe7-469a-9727-7f3d720f2d32","base_network_type":"classic","cidr":"192.168.0.0/24","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":64490,"local_gateway_ip":"192.168.100.1","local_tunnel_ip":"192.168.129.2","mtu":9000,"name":"Transit_Service_BWTN_SJ_DL","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","network_type":"vpc","prefix_filters":[{"action":"permit","before":"1a15dcab-7e40-45e1-b7c5-bc690eaa9782","created_at":"2019-01-01T12:00:00.000Z","ge":0,"id":"1a15dcab-7e30-45e1-b7c5-bc690eaa9865","le":32,"prefix":"192.168.100.0/24","updated_at":"2019-01-01T12:00:00.000Z"}],"prefix_filters_default":"permit","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.63.12","remote_tunnel_ip":"192.168.129.1","request_status":"pending","status":"attached","tunnels":[{"base_network_type":"classic","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":13,"local_gateway_ip":"10.242.63.12","local_tunnel_ip":"192.168.100.20","mtu":9000,"name":"gre1","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.33.22","remote_tunnel_ip":"192.168.129.1","status":"attached","updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}],"updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}]}'; + '{"next":{"start":"1"},"total_count":2,"limit":1,"connections":[{"base_connection_id":"975f58c1-afe7-469a-9727-7f3d720f2d32","base_network_type":"classic","cidr":"198.19.174.0/23","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":64490,"local_gateway_ip":"192.168.100.1","local_tunnel_ip":"192.168.129.2","mtu":9000,"name":"Transit_Service_BWTN_SJ_DL","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","network_type":"vpc","prefix_filters":[{"action":"permit","before":"1a15dcab-7e40-45e1-b7c5-bc690eaa9782","created_at":"2019-01-01T12:00:00.000Z","ge":0,"id":"1a15dcab-7e30-45e1-b7c5-bc690eaa9865","le":32,"prefix":"192.168.100.0/24","updated_at":"2019-01-01T12:00:00.000Z"}],"prefix_filters_default":"permit","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.63.12","remote_tunnel_ip":"192.168.129.1","request_status":"pending","status":"attached","tunnels":[{"base_network_type":"classic","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":1,"local_gateway_ip":"10.242.63.12","local_tunnel_ip":"192.168.100.20","mtu":9000,"name":"gre1","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.33.22","remote_tunnel_ip":"192.168.129.1","status":"attached","updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}],"updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}]}'; const mockPagerResponse2 = - '{"total_count":2,"limit":1,"connections":[{"base_connection_id":"975f58c1-afe7-469a-9727-7f3d720f2d32","base_network_type":"classic","cidr":"192.168.0.0/24","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":64490,"local_gateway_ip":"192.168.100.1","local_tunnel_ip":"192.168.129.2","mtu":9000,"name":"Transit_Service_BWTN_SJ_DL","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","network_type":"vpc","prefix_filters":[{"action":"permit","before":"1a15dcab-7e40-45e1-b7c5-bc690eaa9782","created_at":"2019-01-01T12:00:00.000Z","ge":0,"id":"1a15dcab-7e30-45e1-b7c5-bc690eaa9865","le":32,"prefix":"192.168.100.0/24","updated_at":"2019-01-01T12:00:00.000Z"}],"prefix_filters_default":"permit","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.63.12","remote_tunnel_ip":"192.168.129.1","request_status":"pending","status":"attached","tunnels":[{"base_network_type":"classic","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":13,"local_gateway_ip":"10.242.63.12","local_tunnel_ip":"192.168.100.20","mtu":9000,"name":"gre1","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.33.22","remote_tunnel_ip":"192.168.129.1","status":"attached","updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}],"updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}]}'; + '{"total_count":2,"limit":1,"connections":[{"base_connection_id":"975f58c1-afe7-469a-9727-7f3d720f2d32","base_network_type":"classic","cidr":"198.19.174.0/23","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":64490,"local_gateway_ip":"192.168.100.1","local_tunnel_ip":"192.168.129.2","mtu":9000,"name":"Transit_Service_BWTN_SJ_DL","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","network_type":"vpc","prefix_filters":[{"action":"permit","before":"1a15dcab-7e40-45e1-b7c5-bc690eaa9782","created_at":"2019-01-01T12:00:00.000Z","ge":0,"id":"1a15dcab-7e30-45e1-b7c5-bc690eaa9865","le":32,"prefix":"192.168.100.0/24","updated_at":"2019-01-01T12:00:00.000Z"}],"prefix_filters_default":"permit","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.63.12","remote_tunnel_ip":"192.168.129.1","request_status":"pending","status":"attached","tunnels":[{"base_network_type":"classic","created_at":"2019-01-01T12:00:00.000Z","id":"1a15dca5-7e33-45e1-b7c5-bc690e569531","local_bgp_asn":1,"local_gateway_ip":"10.242.63.12","local_tunnel_ip":"192.168.100.20","mtu":9000,"name":"gre1","network_account_id":"network_account_id","network_id":"crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b","remote_bgp_asn":65010,"remote_gateway_ip":"10.242.33.22","remote_tunnel_ip":"192.168.129.1","status":"attached","updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}],"updated_at":"2019-01-01T12:00:00.000Z","zone":{"name":"us-south-1"}}]}'; beforeEach(() => { unmock_createRequest(); const scope = nock(serviceUrl) - .get((uri) => uri.includes(path)) + .get(uri => uri.includes(path)) .reply(200, mockPagerResponse1) - .get((uri) => uri.includes(path)) + .get(uri => uri.includes(path)) .reply(200, mockPagerResponse2); }); @@ -936,7 +948,7 @@ describe('TransitGatewayApisV1', () => { const networkType = 'vpc'; const baseConnectionId = '975f58c1-afe7-469a-9727-7f3d720f2d32'; const baseNetworkType = 'classic'; - const cidr = '192.168.0.0/24'; + const cidr = '198.19.174.0/23'; const localGatewayIp = '192.168.100.1'; const localTunnelIp = '192.168.129.2'; const name = 'Transit_Service_BWTN_SJ_DL'; @@ -2936,4 +2948,242 @@ describe('TransitGatewayApisV1', () => { }); }); }); + + describe('listRedundancyGroups', () => { + describe('positive tests', () => { + function __listRedundancyGroupsTest() { + // Construct the params object for operation listRedundancyGroups + const name = 'testString'; + const listRedundancyGroupsParams = { + name, + }; + + const listRedundancyGroupsResult = transitGatewayApisService.listRedundancyGroups(listRedundancyGroupsParams); + + // all methods should return a Promise + expectToBePromise(listRedundancyGroupsResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/redundancy_groups', 'GET'); + const expectedAccept = 'application/json'; + const expectedContentType = undefined; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.qs.version).toEqual(transitGatewayApisServiceOptions.version); + expect(mockRequestOptions.qs.name).toEqual(name); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __listRedundancyGroupsTest(); + + // enable retries and test again + createRequestMock.mockClear(); + transitGatewayApisService.enableRetries(); + __listRedundancyGroupsTest(); + + // disable retries and test again + createRequestMock.mockClear(); + transitGatewayApisService.disableRetries(); + __listRedundancyGroupsTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const listRedundancyGroupsParams = { + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + transitGatewayApisService.listRedundancyGroups(listRedundancyGroupsParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + + test('should not have any problems when no parameters are passed in', () => { + // invoke the method with no parameters + transitGatewayApisService.listRedundancyGroups({}); + checkForSuccessfulExecution(createRequestMock); + }); + }); + }); + + describe('getRedundancyGroup', () => { + describe('positive tests', () => { + function __getRedundancyGroupTest() { + // Construct the params object for operation getRedundancyGroup + const id = 'testString'; + const getRedundancyGroupParams = { + id, + }; + + const getRedundancyGroupResult = transitGatewayApisService.getRedundancyGroup(getRedundancyGroupParams); + + // all methods should return a Promise + expectToBePromise(getRedundancyGroupResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/redundancy_groups/{id}', 'GET'); + const expectedAccept = 'application/json'; + const expectedContentType = undefined; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.qs.version).toEqual(transitGatewayApisServiceOptions.version); + expect(mockRequestOptions.path.id).toEqual(id); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __getRedundancyGroupTest(); + + // enable retries and test again + createRequestMock.mockClear(); + transitGatewayApisService.enableRetries(); + __getRedundancyGroupTest(); + + // disable retries and test again + createRequestMock.mockClear(); + transitGatewayApisService.disableRetries(); + __getRedundancyGroupTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const id = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const getRedundancyGroupParams = { + id, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + transitGatewayApisService.getRedundancyGroup(getRedundancyGroupParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await transitGatewayApisService.getRedundancyGroup({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await transitGatewayApisService.getRedundancyGroup(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); + + describe('updateRedundancyGroup', () => { + describe('positive tests', () => { + function __updateRedundancyGroupTest() { + // Construct the params object for operation updateRedundancyGroup + const id = 'testString'; + const name = 'new-rg-name'; + const updateRedundancyGroupParams = { + id, + name, + }; + + const updateRedundancyGroupResult = transitGatewayApisService.updateRedundancyGroup(updateRedundancyGroupParams); + + // all methods should return a Promise + expectToBePromise(updateRedundancyGroupResult); + + // assert that create request was called + expect(createRequestMock).toHaveBeenCalledTimes(1); + + const mockRequestOptions = getOptions(createRequestMock); + + checkUrlAndMethod(mockRequestOptions, '/redundancy_groups/{id}', 'PATCH'); + const expectedAccept = 'application/json'; + const expectedContentType = 'application/merge-patch+json'; + checkMediaHeaders(createRequestMock, expectedAccept, expectedContentType); + expect(mockRequestOptions.body.name).toEqual(name); + expect(mockRequestOptions.qs.version).toEqual(transitGatewayApisServiceOptions.version); + expect(mockRequestOptions.path.id).toEqual(id); + } + + test('should pass the right params to createRequest with enable and disable retries', () => { + // baseline test + __updateRedundancyGroupTest(); + + // enable retries and test again + createRequestMock.mockClear(); + transitGatewayApisService.enableRetries(); + __updateRedundancyGroupTest(); + + // disable retries and test again + createRequestMock.mockClear(); + transitGatewayApisService.disableRetries(); + __updateRedundancyGroupTest(); + }); + + test('should prioritize user-given headers', () => { + // parameters + const id = 'testString'; + const userAccept = 'fake/accept'; + const userContentType = 'fake/contentType'; + const updateRedundancyGroupParams = { + id, + headers: { + Accept: userAccept, + 'Content-Type': userContentType, + }, + }; + + transitGatewayApisService.updateRedundancyGroup(updateRedundancyGroupParams); + checkMediaHeaders(createRequestMock, userAccept, userContentType); + }); + }); + + describe('negative tests', () => { + test('should enforce required parameters', async () => { + let err; + try { + await transitGatewayApisService.updateRedundancyGroup({}); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + + test('should reject promise when required params are not given', async () => { + let err; + try { + await transitGatewayApisService.updateRedundancyGroup(); + } catch (e) { + err = e; + } + + expect(err.message).toMatch(/Missing required parameters/); + }); + }); + }); }); diff --git a/transit-gateway-apis/v1.ts b/transit-gateway-apis/v1.ts index e234932..8626405 100644 --- a/transit-gateway-apis/v1.ts +++ b/transit-gateway-apis/v1.ts @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2025. + * (C) Copyright IBM Corp. 2026. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ /** - * IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732 + * IBM OpenAPI SDK Code Generator Version: 3.73.0-eeee85a9-20230607-165104 */ /* eslint-disable max-classes-per-file */ @@ -24,12 +24,11 @@ import * as extend from 'extend'; import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'; import { - AbortSignal, Authenticator, BaseService, - UserOptions, getAuthenticatorFromEnvironment, validateParams, + UserOptions, } from 'ibm-cloud-sdk-core'; import { getSdkHeaders } from '../lib/common'; @@ -54,7 +53,7 @@ class TransitGatewayApisV1 extends BaseService { * @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 + * @param {string} [options.serviceUrl] - The URL for the service * @returns {TransitGatewayApisV1} */ @@ -86,7 +85,7 @@ class TransitGatewayApisV1 extends BaseService { * @param {Object} options - Options for the service. * @param {string} options.version - Requests the version of the API as of a date in the format `YYYY-MM-DD`. Any date * up to the current date may be provided. Specify the current date to request the latest version. - * @param {string} [options.serviceUrl] - The base URL for the service + * @param {string} [options.serviceUrl] - The base url to use when contacting the service. The base url may differ between IBM Cloud regions. * @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 @@ -116,11 +115,17 @@ class TransitGatewayApisV1 extends BaseService { /** * Retrieves all Transit Gateways. * - * List all Transit Gateways in account the caller is authorized to view. + * List all Transit Gateways in the account the caller is authorized to view. Use the `limit` (integer, 1–100, default + * 50) and `start` (string token) parameters to page through results. Optionally filter by `redundancy_group` name. + * Each `TransitGateway` in the response includes: `id`, `name`, `crn`, `location`, + * `status` (pending, available, deleting, deleted, failed), `global` (boolean), + * `created_at`, `updated_at`, `resource_group`, and optionally `redundancy_group`, + * `redundancy_group_id`, `gre_enhanced_route_propagation`, and `connection_needs_attention`. * * @param {Object} [params] - The parameters to send to the service. * @param {number} [params.limit] - The maximum number of resources to return per page. * @param {string} [params.start] - A server supplied token determining which resource to start the page on. + * @param {string} [params.redundancyGroup] - Filter the list of transit gateways by redundancy group name. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise>} */ @@ -129,7 +134,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = []; - const _validParams = ['limit', 'start', 'signal', 'headers']; + const _validParams = ['limit', 'start', 'redundancyGroup', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -139,9 +144,14 @@ class TransitGatewayApisV1 extends BaseService { 'version': this.version, 'limit': _params.limit, 'start': _params.start, + 'redundancy_group': _params.redundancyGroup, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGateways'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'listTransitGateways' + ); const parameters = { options: { @@ -153,15 +163,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -171,7 +177,11 @@ class TransitGatewayApisV1 extends BaseService { /** * Creates a Transit Gateway. * - * Create a Transit Gateway based on the supplied input template. + * Create a Transit Gateway based on the supplied input template. Required fields: `name` (string, 1–60 chars), + * `location` (IBM Cloud region, e.g. us-south). Optional fields: `global` (boolean, enables cross-region routing), + * `resource_group` (object with `id`), `redundancy_group` (string, name of the redundancy group to join), + * `gre_enhanced_route_propagation` (boolean). Returns a `TransitGateway` object. Initial `status` will be `pending` + * while provisioning. * * @param {Object} params - The parameters to send to the service. * @param {string} params.location - Location of Transit Gateway Services. @@ -181,6 +191,10 @@ class TransitGatewayApisV1 extends BaseService { * @param {boolean} [params.greEnhancedRoutePropagation] - Allow route propagation across all GREs connected to the * same transit gateway. This affects connections on the gateway of type `redundant_gre`, `unbound_gre_tunnel` and * `gre_tunnel`. + * @param {string} [params.redundancyGroup] - Include the global transit gateway in this redundancy group. When set, + * this transit gateway will be redundant to other transit gateways in this redundancy group. If this redundancy group + * doesn't exist in the account, it will be created. This property can only be set for global transit gateways and the + * transit gateway cannot be in a location already used by a global transit gateway in this redundancy group. * @param {ResourceGroupIdentity} [params.resourceGroup] - The resource group to use. If unspecified, the account's * [default resource group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers @@ -191,7 +205,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['location', 'name']; - const _validParams = ['location', 'name', 'global', 'greEnhancedRoutePropagation', 'resourceGroup', 'signal', 'headers']; + const _validParams = ['location', 'name', 'global', 'greEnhancedRoutePropagation', 'redundancyGroup', 'resourceGroup', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -202,6 +216,7 @@ class TransitGatewayApisV1 extends BaseService { 'name': _params.name, 'global': _params.global, 'gre_enhanced_route_propagation': _params.greEnhancedRoutePropagation, + 'redundancy_group': _params.redundancyGroup, 'resource_group': _params.resourceGroup, }; @@ -209,7 +224,11 @@ class TransitGatewayApisV1 extends BaseService { 'version': this.version, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGateway'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'createTransitGateway' + ); const parameters = { options: { @@ -222,16 +241,12 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -241,8 +256,8 @@ class TransitGatewayApisV1 extends BaseService { /** * Deletes specified Transit Gateway. * - * This request deletes a Transit Gateway. This operation cannot be reversed. For this request to succeed, the Transit - * Gateway must not contain connections. + * Delete a Transit Gateway specified by its `id` path parameter. This operation cannot be reversed. The gateway must + * have no attached connections before it can be deleted; remove all connections first. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The Transit Gateway identifier. @@ -254,7 +269,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['id']; - const _validParams = ['id', 'signal', 'headers']; + const _validParams = ['id', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -268,7 +283,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGateway'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'deleteTransitGateway' + ); const parameters = { options: { @@ -281,14 +300,10 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -298,7 +313,10 @@ class TransitGatewayApisV1 extends BaseService { /** * Retrieves specified Transit Gateway. * - * This request retrieves a single Transit Gateway specified by the identifier in the URL. + * Retrieve a single Transit Gateway specified by its `id` path parameter. Returns a `TransitGateway` object + * containing: `id`, `name`, `crn`, `location`, + * `status`, `global`, `created_at`, `updated_at`, `resource_group`, and optionally + * `redundancy_group`, `redundancy_group_id`, `gre_enhanced_route_propagation`, and `connection_needs_attention`. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The Transit Gateway identifier. @@ -310,7 +328,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['id']; - const _validParams = ['id', 'signal', 'headers']; + const _validParams = ['id', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -324,7 +342,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGateway'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'getTransitGateway' + ); const parameters = { options: { @@ -337,15 +359,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -355,15 +373,22 @@ class TransitGatewayApisV1 extends BaseService { /** * Updates specified Transit Gateway. * - * This request updates a Transit Gateway's name and/or global flag. + * Update a Transit Gateway specified by its `id` path parameter. Updatable fields: `name` (string), `global` + * (boolean), `redundancy_group` (string, assigns the gateway to a redundancy group), `gre_enhanced_route_propagation` + * (boolean). Returns the updated `TransitGateway` object. * * @param {Object} params - The parameters to send to the service. * @param {string} params.id - The Transit Gateway identifier. - * @param {boolean} [params.global] - Allow global routing for a Transit Gateway. + * @param {boolean} [params.global] - Allow global routing for a Transit Gateway. This property cannot be changed if + * the transit gateway has redundancy_group set. * @param {boolean} [params.greEnhancedRoutePropagation] - Allow route propagation across all GREs connected to the * same transit gateway. This affects connections on the gateway of type `redundant_gre`, `unbound_gre_tunnel` and * `gre_tunnel`. It takes a few minutes for the change to take effect. * @param {string} [params.name] - A human readable name for a resource. + * @param {string} [params.redundancyGroup] - Create a new redundancy group with this name and add the gateway to it. + * This property is only valid when the gateway is global (or `global` is set to `true` in the same request), the + * gateway is not already a member of a redundancy group, and no redundancy group with this name already exists in the + * account. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise>} */ @@ -372,7 +397,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['id']; - const _validParams = ['id', 'global', 'greEnhancedRoutePropagation', 'name', 'signal', 'headers']; + const _validParams = ['id', 'global', 'greEnhancedRoutePropagation', 'name', 'redundancyGroup', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -382,6 +407,7 @@ class TransitGatewayApisV1 extends BaseService { 'global': _params.global, 'gre_enhanced_route_propagation': _params.greEnhancedRoutePropagation, 'name': _params.name, + 'redundancy_group': _params.redundancyGroup, }; const query = { @@ -392,7 +418,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTransitGateway'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'updateTransitGateway' + ); const parameters = { options: { @@ -406,16 +436,12 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -428,7 +454,11 @@ class TransitGatewayApisV1 extends BaseService { /** * Retrieves all connections. * - * List all transit gateway connections associated with this account. + * List all transit gateway connections associated with this account. Results can be filtered by `network_id` or + * `network_type`. Use the `limit` and `start` parameters to page through large result sets. The response includes a + * `TransitConnection` object for each connection, containing fields such as `id`, `name`, `network_type`, + * `status`, `created_at`, `updated_at`, and optionally `prefix_filters`, `request_status`, and `transit_gateway` + * reference. * * @param {Object} [params] - The parameters to send to the service. * @param {number} [params.limit] - The maximum number of resources to return per page. @@ -443,7 +473,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = []; - const _validParams = ['limit', 'start', 'networkId', 'networkType', 'signal', 'headers']; + const _validParams = ['limit', 'start', 'networkId', 'networkType', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -457,7 +487,11 @@ class TransitGatewayApisV1 extends BaseService { 'network_type': _params.networkType, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listConnections'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'listConnections' + ); const parameters = { options: { @@ -469,15 +503,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -505,7 +535,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId']; - const _validParams = ['transitGatewayId', 'start', 'limit', 'name', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'start', 'limit', 'name', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -522,7 +552,11 @@ class TransitGatewayApisV1 extends BaseService { 'transit_gateway_id': _params.transitGatewayId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGatewayConnections'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'listTransitGatewayConnections' + ); const parameters = { options: { @@ -535,15 +569,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -569,29 +599,32 @@ class TransitGatewayApisV1 extends BaseService { * @param {string} [params.baseNetworkType] - The type of network the Unbound GRE tunnel is targeting. This field is * required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, * the value is required and can be either VPC or Classic. This field is required to be unspecified for network type - * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. - * @param {string} [params.cidr] - network_type 'vpn_gateway' connections use 'cidr' to specify the CIDR to use for - * the VPN GRE tunnels. + * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` + * connections. + * @param {string} [params.cidr] - network_type `vpn_gateway` and `dynamic_route_server`connections use `cidr` to + * specify the CIDR to use for the VPN gateway / Dynamic route server GRE tunnels. * - * This field is required for network type `vpn_gateway` connections. + * This field is optional for network type `vpn_gateway` and `dynamic_route_server` connections. If unspecified, the + * default value is 198.19.174.0/23. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, * `gre_tunnel`, `unbound_gre_tunnel`, and `redundant_gre` connections. * @param {string} [params.localGatewayIp] - Local gateway IP address. This field is required for network type * `gre_tunnel` and `unbound_gre_tunnel` connections. This field is required to be unspecified for network type - * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. + * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` + * connections. * @param {string} [params.localTunnelIp] - Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip * addresses must be in the same /30 network. Neither can be the network nor broadcast addresses. * * This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, - * `vpn_gateway` and `redundant_gre` connections. + * `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. * @param {string} [params.name] - The user-defined name for this transit gateway connection. Network type `vpc` * connections are defaulted to the name of the VPC. Network type `classic` connections are named `classic`. * * This field is required for network type `power_virtual_server`, `directlink`, `gre_tunnel`, `unbound_gre_tunnel`, - * `vpn_gateway` and `redundant_gre` connections. + * `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. * * This field is optional for network type `classic`, `vpc` connections. * @param {string} [params.networkAccountId] - The ID of the account which owns the network that is being connected. @@ -599,22 +632,22 @@ class TransitGatewayApisV1 extends BaseService { * `unbound_gre_tunnel` when the associated_network_type is `classic` or network_type is `redundant_gre` and the GRE * tunnel is in a different account than the gateway. * @param {string} [params.networkId] - The ID of the network being connected via this connection. For network types - * `vpc`,`power_virtual_server`, `directlink` and `vpn_gateway` this is the CRN of the VPC / PowerVS / VDC / Direct - * Link / VPN gateway respectively. This field is required for network type `vpc`, `power_virtual_server`, - * `vpn_gateway`, and `directlink` connections. It is also required for `redundant_gre` connections when the - * base_network_type is set to VPC. This field is required to be unspecified for network type `classic`, `gre_tunnel` - * and `unbound_gre_tunnel` connections. + * `vpc`, `vpn_gateway`, `dynamic_route_server`, `power_virtual_server` and `directlink` this is the CRN of the VPC / + * VPN / Dynamic Route Server / PowerVS / Direct Link gateway respectively. This field is required for network type + * `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `directlink` connections. It is also + * required for `redundant_gre` connections when the base_network_type is set to VPC. This field is required to be + * unspecified for network type `classic`, `gre_tunnel` and `unbound_gre_tunnel` connections. * @param {TransitGatewayConnectionPrefixFilter[]} [params.prefixFilters] - Array of prefix route filters for a * transit gateway connection. Prefix filters can be specified for netowrk type `vpc`, `classic`, * `power_virtual_server` and `directlink` connections. They are not allowed for type `gre_tunnel` connections. This * is order dependent with those first in the array being applied first, and those at the end of the array being * applied last, or just before applying the default. This field is optional for network type `classic`, `vpc`, * `directlink`, and `power_virtual_server` connections. This field is required to be unspecified for network type - * `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. + * `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. * @param {string} [params.prefixFiltersDefault] - Default setting of permit or deny which applies to any routes that * don't match a specified filter. This field is optional for network type `classic`, `vpc`, `directlink`, and * `power_virtual_server` connections. This field is required to be unspecified for network type `gre_tunnel`, - * `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. + * `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. * @param {number} [params.remoteBgpAsn] - Remote network BGP ASN. The following ASN values are reserved and * unavailable 0, 13884, 36351, 64512, 64513, 65100, 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 and * 4201065000-4201065999. If `remote_bgp_asn` is omitted on gre_tunnel or unbound_gre_tunnel connection create @@ -623,17 +656,18 @@ class TransitGatewayApisV1 extends BaseService { * This field is optional for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, - * `vpn_gateway` and `gre_tunnel` connections. + * `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. * @param {string} [params.remoteGatewayIp] - Remote gateway IP address. This field is required for network type * `gre_tunnel` and `unbound_gre_tunnel` connections. This field is required to be unspecified for network type - * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. + * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` + * connections. * @param {string} [params.remoteTunnelIp] - Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip * addresses must be in the same /30 network. Neither can be the network nor broadcast addresses. * * This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, - * `vpn_gateway` and `redundant_gre` connections. + * `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. * @param {TransitGatewayTunnelTemplate[]} [params.tunnels] - Array of GRE tunnels for a transit gateway * `redundant_gre` connections. This field is required for `redundant_gre` connections. * @param {ZoneIdentity} [params.zone] - Specify the connection's location. The specified availability zone must @@ -644,8 +678,8 @@ class TransitGatewayApisV1 extends BaseService { * * This field is optional for network type `vpn_gateway` connections. * - * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` - * and `redundant_gre` connections. + * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, + * `redundant_gre` and `dynamic_route_server` connections. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise>} */ @@ -654,7 +688,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'networkType']; - const _validParams = ['transitGatewayId', 'networkType', 'baseConnectionId', 'baseNetworkType', 'cidr', 'localGatewayIp', 'localTunnelIp', 'name', 'networkAccountId', 'networkId', 'prefixFilters', 'prefixFiltersDefault', 'remoteBgpAsn', 'remoteGatewayIp', 'remoteTunnelIp', 'tunnels', 'zone', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'networkType', 'baseConnectionId', 'baseNetworkType', 'cidr', 'localGatewayIp', 'localTunnelIp', 'name', 'networkAccountId', 'networkId', 'prefixFilters', 'prefixFiltersDefault', 'remoteBgpAsn', 'remoteGatewayIp', 'remoteTunnelIp', 'tunnels', 'zone', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -687,7 +721,11 @@ class TransitGatewayApisV1 extends BaseService { 'transit_gateway_id': _params.transitGatewayId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayConnection'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'createTransitGatewayConnection' + ); const parameters = { options: { @@ -701,16 +739,12 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -734,7 +768,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -749,7 +783,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGatewayConnection'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'deleteTransitGatewayConnection' + ); const parameters = { options: { @@ -762,14 +800,10 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -792,7 +826,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -807,7 +841,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGatewayConnection'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'getTransitGatewayConnection' + ); const parameters = { options: { @@ -820,15 +858,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -856,7 +890,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'name', 'prefixFiltersDefault', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'name', 'prefixFiltersDefault', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -876,7 +910,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTransitGatewayConnection'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'updateTransitGatewayConnection' + ); const parameters = { options: { @@ -890,16 +928,12 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -923,7 +957,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'action']; - const _validParams = ['transitGatewayId', 'id', 'action', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'action', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -942,7 +976,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayConnectionActions'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'createTransitGatewayConnectionActions' + ); const parameters = { options: { @@ -956,15 +994,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Content-Type': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -987,7 +1021,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1002,7 +1036,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGatewayGreTunnel'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'listTransitGatewayGreTunnel' + ); const parameters = { options: { @@ -1015,15 +1053,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1059,7 +1093,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'localGatewayIp', 'localTunnelIp', 'name', 'remoteGatewayIp', 'remoteTunnelIp', 'zone']; - const _validParams = ['transitGatewayId', 'id', 'localGatewayIp', 'localTunnelIp', 'name', 'remoteGatewayIp', 'remoteTunnelIp', 'zone', 'remoteBgpAsn', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'localGatewayIp', 'localTunnelIp', 'name', 'remoteGatewayIp', 'remoteTunnelIp', 'zone', 'remoteBgpAsn', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1084,7 +1118,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayGreTunnel'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'createTransitGatewayGreTunnel' + ); const parameters = { options: { @@ -1098,16 +1136,12 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1131,7 +1165,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'greTunnelId']; - const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1147,7 +1181,11 @@ class TransitGatewayApisV1 extends BaseService { 'gre_tunnel_id': _params.greTunnelId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGatewayConnectionTunnels'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'deleteTransitGatewayConnectionTunnels' + ); const parameters = { options: { @@ -1160,14 +1198,10 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1191,7 +1225,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'greTunnelId']; - const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1207,7 +1241,11 @@ class TransitGatewayApisV1 extends BaseService { 'gre_tunnel_id': _params.greTunnelId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGatewayConnectionTunnels'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'getTransitGatewayConnectionTunnels' + ); const parameters = { options: { @@ -1220,15 +1258,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1253,7 +1287,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'greTunnelId']; - const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'name', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'name', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1273,7 +1307,11 @@ class TransitGatewayApisV1 extends BaseService { 'gre_tunnel_id': _params.greTunnelId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTransitGatewayConnectionTunnels'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'updateTransitGatewayConnectionTunnels' + ); const parameters = { options: { @@ -1287,16 +1325,12 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/merge-patch+json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1320,7 +1354,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = []; - const _validParams = ['signal', 'headers']; + const _validParams = ['headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1330,7 +1364,11 @@ class TransitGatewayApisV1 extends BaseService { 'version': this.version, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listGatewayLocations'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'listGatewayLocations' + ); const parameters = { options: { @@ -1342,15 +1380,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1372,7 +1406,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['name']; - const _validParams = ['name', 'signal', 'headers']; + const _validParams = ['name', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1386,7 +1420,11 @@ class TransitGatewayApisV1 extends BaseService { 'name': _params.name, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getGatewayLocation'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'getGatewayLocation' + ); const parameters = { options: { @@ -1399,15 +1437,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1433,7 +1467,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1448,7 +1482,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGatewayConnectionPrefixFilters'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'listTransitGatewayConnectionPrefixFilters' + ); const parameters = { options: { @@ -1461,15 +1499,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1520,7 +1554,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'action', 'prefix']; - const _validParams = ['transitGatewayId', 'id', 'action', 'prefix', 'before', 'ge', 'le', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'action', 'prefix', 'before', 'ge', 'le', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1543,7 +1577,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayConnectionPrefixFilter'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'createTransitGatewayConnectionPrefixFilter' + ); const parameters = { options: { @@ -1557,16 +1595,12 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1590,7 +1624,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'filterId']; - const _validParams = ['transitGatewayId', 'id', 'filterId', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'filterId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1606,7 +1640,11 @@ class TransitGatewayApisV1 extends BaseService { 'filter_id': _params.filterId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGatewayConnectionPrefixFilter'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'deleteTransitGatewayConnectionPrefixFilter' + ); const parameters = { options: { @@ -1619,14 +1657,10 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1650,7 +1684,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'filterId']; - const _validParams = ['transitGatewayId', 'id', 'filterId', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'filterId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1666,7 +1700,11 @@ class TransitGatewayApisV1 extends BaseService { 'filter_id': _params.filterId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGatewayConnectionPrefixFilter'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'getTransitGatewayConnectionPrefixFilter' + ); const parameters = { options: { @@ -1679,15 +1717,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1734,7 +1768,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'filterId']; - const _validParams = ['transitGatewayId', 'id', 'filterId', 'action', 'before', 'ge', 'le', 'prefix', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'filterId', 'action', 'before', 'ge', 'le', 'prefix', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1758,7 +1792,11 @@ class TransitGatewayApisV1 extends BaseService { 'filter_id': _params.filterId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTransitGatewayConnectionPrefixFilter'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'updateTransitGatewayConnectionPrefixFilter' + ); const parameters = { options: { @@ -1772,16 +1810,12 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1807,7 +1841,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId']; - const _validParams = ['transitGatewayId', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1821,7 +1855,11 @@ class TransitGatewayApisV1 extends BaseService { 'transit_gateway_id': _params.transitGatewayId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGatewayRouteReports'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'listTransitGatewayRouteReports' + ); const parameters = { options: { @@ -1834,15 +1872,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1865,7 +1899,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId']; - const _validParams = ['transitGatewayId', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1879,7 +1913,11 @@ class TransitGatewayApisV1 extends BaseService { 'transit_gateway_id': _params.transitGatewayId, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayRouteReport'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'createTransitGatewayRouteReport' + ); const parameters = { options: { @@ -1892,15 +1930,11 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1923,7 +1957,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1938,7 +1972,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGatewayRouteReport'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'deleteTransitGatewayRouteReport' + ); const parameters = { options: { @@ -1951,14 +1989,10 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, }), }; @@ -1981,7 +2015,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1996,7 +2030,11 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGatewayRouteReport'); + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'getTransitGatewayRouteReport' + ); const parameters = { options: { @@ -2009,15 +2047,188 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, - this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), - axiosOptions: { - signal: _params.signal, - }, + }), + }; + + return this.createRequest(parameters); + } + /************************* + * redundancyGroups + ************************/ + + /** + * Lists all redundancy groups in the account. + * + * List all redundancy groups for the account. + * + * @param {Object} [params] - The parameters to send to the service. + * @param {string} [params.name] - Filter the list of redundancy groups by name. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public listRedundancyGroups( + params?: TransitGatewayApisV1.ListRedundancyGroupsParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = []; + const _validParams = ['name', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + 'name': _params.name, + }; + + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'listRedundancyGroups' + ); + + const parameters = { + options: { + url: '/redundancy_groups', + method: 'GET', + qs: query, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * Retrieves specified redundancy group. + * + * Retrieves a single redundancy group specified by the identifier in the URL. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.id - The redundancy group identifier. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public getRedundancyGroup( + params: TransitGatewayApisV1.GetRedundancyGroupParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['id']; + const _validParams = ['id', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const query = { + 'version': this.version, + }; + + const path = { + 'id': _params.id, + }; + + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'getRedundancyGroup' + ); + + const parameters = { + options: { + url: '/redundancy_groups/{id}', + method: 'GET', + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + }, + _params.headers + ), + }), + }; + + return this.createRequest(parameters); + } + + /** + * Updates a redundancy group. + * + * Update a redundancy group. + * + * @param {Object} params - The parameters to send to the service. + * @param {string} params.id - The redundancy group identifier. + * @param {string} [params.name] - The new name for the redundancy group. + * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers + * @returns {Promise>} + */ + public updateRedundancyGroup( + params: TransitGatewayApisV1.UpdateRedundancyGroupParams + ): Promise> { + const _params = { ...params }; + const _requiredParams = ['id']; + const _validParams = ['id', 'name', 'headers']; + const _validationErrors = validateParams(_params, _requiredParams, _validParams); + if (_validationErrors) { + return Promise.reject(_validationErrors); + } + + const body = { + 'name': _params.name, + }; + + const query = { + 'version': this.version, + }; + + const path = { + 'id': _params.id, + }; + + const sdkHeaders = getSdkHeaders( + TransitGatewayApisV1.DEFAULT_SERVICE_NAME, + 'v1', + 'updateRedundancyGroup' + ); + + const parameters = { + options: { + url: '/redundancy_groups/{id}', + method: 'PATCH', + body, + qs: query, + path, + }, + defaultOptions: extend(true, {}, this.baseOptions, { + headers: extend( + true, + sdkHeaders, + { + 'Accept': 'application/json', + 'Content-Type': 'application/merge-patch+json', + }, + _params.headers + ), }), }; @@ -2061,21 +2272,19 @@ namespace TransitGatewayApisV1 { * request interfaces ************************/ - interface DefaultParams { - headers?: OutgoingHttpHeaders; - signal?: AbortSignal; - } - /** Parameters for the `listTransitGateways` operation. */ - export interface ListTransitGatewaysParams extends DefaultParams { + export interface ListTransitGatewaysParams { /** The maximum number of resources to return per page. */ limit?: number; /** A server supplied token determining which resource to start the page on. */ start?: string; + /** Filter the list of transit gateways by redundancy group name. */ + redundancyGroup?: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGateway` operation. */ - export interface CreateTransitGatewayParams extends DefaultParams { + export interface CreateTransitGatewayParams { /** Location of Transit Gateway Services. */ location: string; /** A human readable name for the transit gateway. */ @@ -2086,29 +2295,40 @@ namespace TransitGatewayApisV1 { * the gateway of type `redundant_gre`, `unbound_gre_tunnel` and `gre_tunnel`. */ greEnhancedRoutePropagation?: boolean; + /** Include the global transit gateway in this redundancy group. When set, this transit gateway will be + * redundant to other transit gateways in this redundancy group. If this redundancy group doesn't exist in the + * account, it will be created. This property can only be set for global transit gateways and the transit gateway + * cannot be in a location already used by a global transit gateway in this redundancy group. + */ + redundancyGroup?: string; /** The resource group to use. If unspecified, the account's [default resource * group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. */ resourceGroup?: ResourceGroupIdentity; + headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteTransitGateway` operation. */ - export interface DeleteTransitGatewayParams extends DefaultParams { + export interface DeleteTransitGatewayParams { /** The Transit Gateway identifier. */ id: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGateway` operation. */ - export interface GetTransitGatewayParams extends DefaultParams { + export interface GetTransitGatewayParams { /** The Transit Gateway identifier. */ id: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `updateTransitGateway` operation. */ - export interface UpdateTransitGatewayParams extends DefaultParams { + export interface UpdateTransitGatewayParams { /** The Transit Gateway identifier. */ id: string; - /** Allow global routing for a Transit Gateway. */ + /** Allow global routing for a Transit Gateway. This property cannot be changed if the transit gateway has + * redundancy_group set. + */ global?: boolean; /** Allow route propagation across all GREs connected to the same transit gateway. This affects connections on * the gateway of type `redundant_gre`, `unbound_gre_tunnel` and `gre_tunnel`. It takes a few minutes for the @@ -2117,10 +2337,16 @@ namespace TransitGatewayApisV1 { greEnhancedRoutePropagation?: boolean; /** A human readable name for a resource. */ name?: string; + /** Create a new redundancy group with this name and add the gateway to it. This property is only valid when the + * gateway is global (or `global` is set to `true` in the same request), the gateway is not already a member of a + * redundancy group, and no redundancy group with this name already exists in the account. + */ + redundancyGroup?: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `listConnections` operation. */ - export interface ListConnectionsParams extends DefaultParams { + export interface ListConnectionsParams { /** The maximum number of resources to return per page. */ limit?: number; /** A server supplied token determining which resource to start the page on. */ @@ -2129,10 +2355,11 @@ namespace TransitGatewayApisV1 { networkId?: string; /** Search for connections with the given network_type value. */ networkType?: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `listTransitGatewayConnections` operation. */ - export interface ListTransitGatewayConnectionsParams extends DefaultParams { + export interface ListTransitGatewayConnectionsParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** A server supplied token determining which resource to start the page on. */ @@ -2141,10 +2368,11 @@ namespace TransitGatewayApisV1 { limit?: number; /** Search for connections with the given name. */ name?: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGatewayConnection` operation. */ - export interface CreateTransitGatewayConnectionParams extends DefaultParams { + export interface CreateTransitGatewayConnectionParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** Defines what type of network is connected via this connection. */ @@ -2162,12 +2390,14 @@ namespace TransitGatewayApisV1 { /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type * `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required * and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, - * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. + * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. */ baseNetworkType?: CreateTransitGatewayConnectionConstants.BaseNetworkType | string; - /** network_type 'vpn_gateway' connections use 'cidr' to specify the CIDR to use for the VPN GRE tunnels. + /** network_type `vpn_gateway` and `dynamic_route_server`connections use `cidr` to specify the CIDR to use for + * the VPN gateway / Dynamic route server GRE tunnels. * - * This field is required for network type `vpn_gateway` connections. + * This field is optional for network type `vpn_gateway` and `dynamic_route_server` connections. If unspecified, + * the default value is 198.19.174.0/23. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, * `power_virtual_server`, `gre_tunnel`, `unbound_gre_tunnel`, and `redundant_gre` connections. @@ -2175,7 +2405,7 @@ namespace TransitGatewayApisV1 { cidr?: string; /** Local gateway IP address. This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` * connections. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. + * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. */ localGatewayIp?: string; /** Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. @@ -2184,14 +2414,14 @@ namespace TransitGatewayApisV1 { * This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. + * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. */ localTunnelIp?: string; /** The user-defined name for this transit gateway connection. Network type `vpc` connections are defaulted to * the name of the VPC. Network type `classic` connections are named `classic`. * * This field is required for network type `power_virtual_server`, `directlink`, `gre_tunnel`, - * `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. + * `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. * * This field is optional for network type `classic`, `vpc` connections. */ @@ -2202,12 +2432,12 @@ namespace TransitGatewayApisV1 { * account than the gateway. */ networkAccountId?: string; - /** The ID of the network being connected via this connection. For network types `vpc`,`power_virtual_server`, - * `directlink` and `vpn_gateway` this is the CRN of the VPC / PowerVS / VDC / Direct Link / VPN gateway - * respectively. This field is required for network type `vpc`, `power_virtual_server`, `vpn_gateway`, and - * `directlink` connections. It is also required for `redundant_gre` connections when the base_network_type is set - * to VPC. This field is required to be unspecified for network type `classic`, `gre_tunnel` and - * `unbound_gre_tunnel` connections. + /** The ID of the network being connected via this connection. For network types `vpc`, `vpn_gateway`, + * `dynamic_route_server`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route + * Server / PowerVS / Direct Link gateway respectively. This field is required for network type `vpc`, + * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `directlink` connections. It is also required + * for `redundant_gre` connections when the base_network_type is set to VPC. This field is required to be + * unspecified for network type `classic`, `gre_tunnel` and `unbound_gre_tunnel` connections. */ networkId?: string; /** Array of prefix route filters for a transit gateway connection. Prefix filters can be specified for netowrk @@ -2215,14 +2445,14 @@ namespace TransitGatewayApisV1 { * `gre_tunnel` connections. This is order dependent with those first in the array being applied first, and those * at the end of the array being applied last, or just before applying the default. This field is optional for * network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This field is required to - * be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` - * connections. + * be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and + * `redundant_gre` connections. */ prefixFilters?: TransitGatewayConnectionPrefixFilter[]; /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This * field is optional for network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This - * field is required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and - * `redundant_gre` connections. + * field is required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway`, + * `dynamic_route_server` and `redundant_gre` connections. */ prefixFiltersDefault?: CreateTransitGatewayConnectionConstants.PrefixFiltersDefault | string; /** Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, @@ -2233,12 +2463,12 @@ namespace TransitGatewayApisV1 { * This field is optional for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. + * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. */ remoteBgpAsn?: number; /** Remote gateway IP address. This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` * connections. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. + * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. */ remoteGatewayIp?: string; /** Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 @@ -2247,7 +2477,7 @@ namespace TransitGatewayApisV1 { * This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. + * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. */ remoteTunnelIp?: string; /** Array of GRE tunnels for a transit gateway `redundant_gre` connections. This field is required for @@ -2261,10 +2491,11 @@ namespace TransitGatewayApisV1 { * * This field is optional for network type `vpn_gateway` connections. * - * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` - * and `redundant_gre` connections. + * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, + * `power_virtual_server`, `redundant_gre` and `dynamic_route_server` connections. */ zone?: ZoneIdentity; + headers?: OutgoingHttpHeaders; } /** Constants for the `createTransitGatewayConnection` operation. */ @@ -2279,13 +2510,14 @@ namespace TransitGatewayApisV1 { POWER_VIRTUAL_SERVER = 'power_virtual_server', REDUNDANT_GRE = 'redundant_gre', VPN_GATEWAY = 'vpn_gateway', + DYNAMIC_ROUTE_SERVER = 'dynamic_route_server', } - /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ + /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. */ export enum BaseNetworkType { CLASSIC = 'classic', VPC = 'vpc', } - /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field is optional for network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This field is required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. */ + /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field is optional for network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This field is required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. */ export enum PrefixFiltersDefault { PERMIT = 'permit', DENY = 'deny', @@ -2293,23 +2525,25 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `deleteTransitGatewayConnection` operation. */ - export interface DeleteTransitGatewayConnectionParams extends DefaultParams { + export interface DeleteTransitGatewayConnectionParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGatewayConnection` operation. */ - export interface GetTransitGatewayConnectionParams extends DefaultParams { + export interface GetTransitGatewayConnectionParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `updateTransitGatewayConnection` operation. */ - export interface UpdateTransitGatewayConnectionParams extends DefaultParams { + export interface UpdateTransitGatewayConnectionParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2321,6 +2555,7 @@ namespace TransitGatewayApisV1 { name?: string; /** Default setting of permit or deny which applies to any routes that don't match a specified filter. */ prefixFiltersDefault?: UpdateTransitGatewayConnectionConstants.PrefixFiltersDefault | string; + headers?: OutgoingHttpHeaders; } /** Constants for the `updateTransitGatewayConnection` operation. */ @@ -2333,13 +2568,14 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `createTransitGatewayConnectionActions` operation. */ - export interface CreateTransitGatewayConnectionActionsParams extends DefaultParams { + export interface CreateTransitGatewayConnectionActionsParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** The action that is to be performed against the connection request. */ action: CreateTransitGatewayConnectionActionsConstants.Action | string; + headers?: OutgoingHttpHeaders; } /** Constants for the `createTransitGatewayConnectionActions` operation. */ @@ -2352,15 +2588,16 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `listTransitGatewayGreTunnel` operation. */ - export interface ListTransitGatewayGreTunnelParams extends DefaultParams { + export interface ListTransitGatewayGreTunnelParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGatewayGreTunnel` operation. */ - export interface CreateTransitGatewayGreTunnelParams extends DefaultParams { + export interface CreateTransitGatewayGreTunnelParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2388,30 +2625,33 @@ namespace TransitGatewayApisV1 { * is omitted on create requests, IBM will assign an ASN. */ remoteBgpAsn?: number; + headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteTransitGatewayConnectionTunnels` operation. */ - export interface DeleteTransitGatewayConnectionTunnelsParams extends DefaultParams { + export interface DeleteTransitGatewayConnectionTunnelsParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** The tunnel identifier. */ greTunnelId: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGatewayConnectionTunnels` operation. */ - export interface GetTransitGatewayConnectionTunnelsParams extends DefaultParams { + export interface GetTransitGatewayConnectionTunnelsParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** The tunnel identifier. */ greTunnelId: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `updateTransitGatewayConnectionTunnels` operation. */ - export interface UpdateTransitGatewayConnectionTunnelsParams extends DefaultParams { + export interface UpdateTransitGatewayConnectionTunnelsParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2420,28 +2660,32 @@ namespace TransitGatewayApisV1 { greTunnelId: string; /** The user-defined name for this connection tunnel. */ name?: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `listGatewayLocations` operation. */ - export interface ListGatewayLocationsParams extends DefaultParams { + export interface ListGatewayLocationsParams { + headers?: OutgoingHttpHeaders; } /** Parameters for the `getGatewayLocation` operation. */ - export interface GetGatewayLocationParams extends DefaultParams { + export interface GetGatewayLocationParams { /** The Transit Gateway location Name. */ name: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `listTransitGatewayConnectionPrefixFilters` operation. */ - export interface ListTransitGatewayConnectionPrefixFiltersParams extends DefaultParams { + export interface ListTransitGatewayConnectionPrefixFiltersParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGatewayConnectionPrefixFilter` operation. */ - export interface CreateTransitGatewayConnectionPrefixFilterParams extends DefaultParams { + export interface CreateTransitGatewayConnectionPrefixFilterParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2480,6 +2724,7 @@ namespace TransitGatewayApisV1 { * inclusive. */ le?: number; + headers?: OutgoingHttpHeaders; } /** Constants for the `createTransitGatewayConnectionPrefixFilter` operation. */ @@ -2492,27 +2737,29 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `deleteTransitGatewayConnectionPrefixFilter` operation. */ - export interface DeleteTransitGatewayConnectionPrefixFilterParams extends DefaultParams { + export interface DeleteTransitGatewayConnectionPrefixFilterParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** Prefix filter identifier. */ filterId: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGatewayConnectionPrefixFilter` operation. */ - export interface GetTransitGatewayConnectionPrefixFilterParams extends DefaultParams { + export interface GetTransitGatewayConnectionPrefixFilterParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** Prefix filter identifier. */ filterId: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `updateTransitGatewayConnectionPrefixFilter` operation. */ - export interface UpdateTransitGatewayConnectionPrefixFilterParams extends DefaultParams { + export interface UpdateTransitGatewayConnectionPrefixFilterParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2549,6 +2796,7 @@ namespace TransitGatewayApisV1 { le?: number; /** The IPv4 Prefix to be matched by this filter. */ prefix?: string; + headers?: OutgoingHttpHeaders; } /** Constants for the `updateTransitGatewayConnectionPrefixFilter` operation. */ @@ -2561,65 +2809,83 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `listTransitGatewayRouteReports` operation. */ - export interface ListTransitGatewayRouteReportsParams extends DefaultParams { + export interface ListTransitGatewayRouteReportsParams { /** The Transit Gateway identifier. */ transitGatewayId: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGatewayRouteReport` operation. */ - export interface CreateTransitGatewayRouteReportParams extends DefaultParams { + export interface CreateTransitGatewayRouteReportParams { /** The Transit Gateway identifier. */ transitGatewayId: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteTransitGatewayRouteReport` operation. */ - export interface DeleteTransitGatewayRouteReportParams extends DefaultParams { + export interface DeleteTransitGatewayRouteReportParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** Route report identifier. */ id: string; + headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGatewayRouteReport` operation. */ - export interface GetTransitGatewayRouteReportParams extends DefaultParams { + export interface GetTransitGatewayRouteReportParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** Route report identifier. */ id: string; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `listRedundancyGroups` operation. */ + export interface ListRedundancyGroupsParams { + /** Filter the list of redundancy groups by name. */ + name?: string; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `getRedundancyGroup` operation. */ + export interface GetRedundancyGroupParams { + /** The redundancy group identifier. */ + id: string; + headers?: OutgoingHttpHeaders; + } + + /** Parameters for the `updateRedundancyGroup` operation. */ + export interface UpdateRedundancyGroupParams { + /** The redundancy group identifier. */ + id: string; + /** The new name for the redundancy group. */ + name?: string; + headers?: OutgoingHttpHeaders; } /************************* * model interfaces ************************/ - /** - * A reference to the first page of resources. - */ + /** A reference to the first page of resources. */ export interface PaginationFirstConnection { /** url. */ href: string; } - /** - * A reference to the first page of resources. - */ + /** A reference to the first page of resources. */ export interface PaginationFirstTG { /** url. */ href: string; } - /** - * A reference to the first page of resources. This will be returned when number of connections in response are - * greater than max page limit. - */ + /** A reference to the first page of resources. This will be returned when number of connections in response are greater than max page limit. */ export interface PaginationFirstTGWConnection { /** url. */ href: string; } - /** - * A reference to the next page of resources; this reference is included for all pages except the last page. - */ + /** A reference to the next page of resources; this reference is included for all pages except the last page. */ export interface PaginationNextConnection { /** url. */ href: string; @@ -2627,9 +2893,7 @@ namespace TransitGatewayApisV1 { start: string; } - /** - * A reference to the next page of resources; this reference is included for all pages except the last page. - */ + /** A reference to the next page of resources; this reference is included for all pages except the last page. */ export interface PaginationNextTG { /** url. */ href: string; @@ -2637,9 +2901,7 @@ namespace TransitGatewayApisV1 { start: string; } - /** - * A reference to the next page of resources; this reference is included for all pages except the last page. - */ + /** A reference to the next page of resources; this reference is included for all pages except the last page. */ export interface PaginationNextTGWConnection { /** url. */ href: string; @@ -2647,20 +2909,16 @@ namespace TransitGatewayApisV1 { start: string; } - /** - * prefix filters. - */ + /** prefix filters. */ export interface PrefixFilterCollection { /** Array of prefix filters. */ prefix_filters: PrefixFilterCust[]; } - /** - * prefix filter. - */ + /** prefix filter. */ export interface PrefixFilterCust { /** Whether or not this prefix filter should allow or deny prefixes matching this filter's prefix definition. */ - action: PrefixFilterCust.Constants.Action | string; + action: string; /** A reference to the prefix filter that will be the next filter applied to the Transit Gateway connection. * * If this field is blank, this prefix filter will be the last rule applied before the connection's default rule. @@ -2700,29 +2958,32 @@ namespace TransitGatewayApisV1 { /** The date and time that this prefix filter was last updated. */ updated_at?: string; } - export namespace PrefixFilterCust { - export namespace Constants { - /** Whether or not this prefix filter should allow or deny prefixes matching this filter's prefix definition. */ - export enum Action { - PERMIT = 'permit', - DENY = 'deny', - } - } + + /** A redundancy group. */ + export interface RedundancyGroup { + /** The date and time that this redundancy group was created. */ + created_at: string; + /** The unique identifier for this redundancy group. */ + id: string; + /** The redundancy group name. */ + name: string; + /** The date and time that this redundancy group was last updated. */ + updated_at?: string; } - /** - * The resource group to use. If unspecified, the account's [default resource - * group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. - */ + /** A list of redundancy groups. */ + export interface RedundancyGroupCollection { + /** Collection of redundancy groups. */ + redundancy_groups: RedundancyGroup[]; + } + + /** The resource group to use. If unspecified, the account's [default resource group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. */ export interface ResourceGroupIdentity { /** The unique identifier for this resource group. */ id: string; } - /** - * The resource group to use. If unspecified, the account's [default resource - * group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. - */ + /** The resource group to use. If unspecified, the account's [default resource group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. */ export interface ResourceGroupReference { /** The URL for this resource group. */ href: string; @@ -2730,9 +2991,7 @@ namespace TransitGatewayApisV1 { id: string; } - /** - * route report. - */ + /** route report. */ export interface RouteReport { /** Array of connections with their routes. */ connections: RouteReportConnection[]; @@ -2745,48 +3004,32 @@ namespace TransitGatewayApisV1 { /** Route report status. The list of enumerated values for this property may expand in the future. Code and * processes using this field must tolerate unexpected values. */ - status: RouteReport.Constants.Status | string; + status: string; /** Date and time route report was last modified. */ updated_at?: string; } - export namespace RouteReport { - export namespace Constants { - /** Route report status. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum Status { - COMPLETE = 'complete', - PENDING = 'pending', - FAILED = 'failed', - } - } - } - /** - * route reports. - */ + /** route reports. */ export interface RouteReportCollection { /** Array of route reports. */ route_reports: RouteReport[]; } - /** - * route report connection. - */ + /** route report connection. */ export interface RouteReportConnection { /** Array of connection's bgps. */ - bgps?: RouteReportConnectionBgp[]; + bgps: RouteReportConnectionBgp[]; /** connection ID. */ id?: string; /** connection name. */ name?: string; /** Array of connection's routes. */ - routes?: RouteReportConnectionRoute[]; + routes: RouteReportConnectionRoute[]; /** connection type. */ type?: string; } - /** - * connection bgp details. - */ + /** connection bgp details. */ export interface RouteReportConnectionBgp { /** AS path. */ as_path?: string; @@ -2798,17 +3041,13 @@ namespace TransitGatewayApisV1 { prefix?: string; } - /** - * connection used route. - */ + /** connection used route. */ export interface RouteReportConnectionRoute { /** prefix. */ prefix?: string; } - /** - * overlapping route details. - */ + /** overlapping route details. */ export interface RouteReportOverlappingRoute { /** connection ID. */ connection_id?: string; @@ -2816,51 +3055,34 @@ namespace TransitGatewayApisV1 { prefix?: string; } - /** - * Collection of overlapping route. - */ + /** Collection of overlapping route. */ export interface RouteReportOverlappingRouteGroup { /** Array of overlapping connection/prefix pairs. */ - routes?: RouteReportOverlappingRoute[]; + routes: RouteReportOverlappingRoute[]; } - /** - * A list of Transit Gateway locations. - */ + /** A list of Transit Gateway locations. */ export interface TSCollection { /** Collection of Transit Gateway locations. */ locations: TSLocationBasic[]; } - /** - * Details of a local connection location. - */ + /** Details of a local connection location. */ export interface TSLocalLocation { /** A descriptive display name for the location. */ display_name: string; /** The name of the location. */ name: string; /** Array of supported connection types. */ - supported_connection_types?: string[]; + supported_connection_types: string[]; /** The type of the location, determining is this a multi-zone region, a single data center, or a point of * presence. The list of enumerated values for this property may expand in the future. Code and processes using * this field must tolerate unexpected values. */ - type: TSLocalLocation.Constants.Type | string; - } - export namespace TSLocalLocation { - export namespace Constants { - /** The type of the location, determining is this a multi-zone region, a single data center, or a point of presence. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum Type { - REGION = 'region', - DC = 'dc', - } - } + type: string; } - /** - * Details of a Transit Gateway location. - */ + /** Details of a Transit Gateway location. */ export interface TSLocation { /** The geographical location of this location, used for billing purposes. */ billing_location: string; @@ -2876,9 +3098,7 @@ namespace TransitGatewayApisV1 { zones: ZoneReference[]; } - /** - * Details of a Transit Gateway location. - */ + /** Details of a Transit Gateway location. */ export interface TSLocationBasic { /** The geographical location of this location, used for billing purposes. */ billing_location: string; @@ -2890,24 +3110,22 @@ namespace TransitGatewayApisV1 { type: string; } - /** - * Connection included in transit gateway. - */ + /** Connection included in transit gateway. */ export interface TransitConnection { /** The type of network the GRE tunnel is targeting. */ - base_network_type?: TransitConnection.Constants.BaseNetworkType | string; + base_network_type?: string; /** The user-defined name for this transit gateway connection. */ name: string; /** The ID of the network being connected via this connection. This field is required for some types, such as - * `vpc`, `power_virtual_server`, `directlink`, `vpn_gateway` and `redundant_gre`. For network types `vpc`, - * `redundant_gre`, `power_virtual_server` and `directlink` this is the CRN of the VPC / PowerVS / VDC / Direct - * Link gateway respectively. + * `vpc`, `power_virtual_server`, `directlink`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre`. For + * network types `vpc`, `vpn_gateway`, `dynamic_route_server`, `power_virtual_server` and `directlink` this is the + * CRN of the VPC / VPN / Dynamic Route Server / PowerVS / Direct Link gateway respectively. */ network_id?: string; /** Defines what type of network is connected via this connection. The list of enumerated values for this * property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - network_type: TransitConnection.Constants.NetworkType | string; + network_type: string; /** The unique identifier for this Transit Gateway connection. */ id: string; /** Deprecated: network_type `gre_tunnel` connections use `base_connection_id` to specify the ID of a @@ -2917,6 +3135,10 @@ namespace TransitGatewayApisV1 { * `gre_tunnel` connections. */ base_connection_id?: string; + /** network_type `vpn_gateway` and `dynamic_route_server` connections use `cidr` to specify the CIDR to use for + * the `VPN gateway / Dynamic route server` GRE tunnels. + */ + cidr?: string; /** The date and time that this connection was created. */ created_at: string; /** Local network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` @@ -2947,7 +3169,7 @@ namespace TransitGatewayApisV1 { * * This field does not apply to the `redundant_gre` network types. */ - prefix_filters_default?: TransitConnection.Constants.PrefixFiltersDefault | string; + prefix_filters_default?: string; /** Remote network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. */ @@ -2964,70 +3186,22 @@ namespace TransitGatewayApisV1 { * IBM Cloud accounts. The list of enumerated values for this property may expand in the future. Code and processes * using this field must tolerate unexpected values. */ - request_status: TransitConnection.Constants.RequestStatus | string; + request_status: string; /** Connection's current configuration state. The list of enumerated values for this property may expand in the * future. Code and processes using this field must tolerate unexpected values. */ - status: TransitConnection.Constants.Status | string; + status: string; /** Transit gateway reference. */ transit_gateway: TransitGatewayReference; - /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ + /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ tunnels?: TransitGatewayTunnel[]; /** The date and time that this connection was last updated. */ updated_at: string; /** Availability zone reference. */ zone?: ZoneReference; } - export namespace TransitConnection { - export namespace Constants { - /** The type of network the GRE tunnel is targeting. */ - export enum BaseNetworkType { - CLASSIC = 'classic', - VPC = 'vpc', - VPN = 'vpn', - } - /** Defines what type of network is connected via this connection. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum NetworkType { - CLASSIC = 'classic', - DIRECTLINK = 'directlink', - GRE_TUNNEL = 'gre_tunnel', - UNBOUND_GRE_TUNNEL = 'unbound_gre_tunnel', - VPC = 'vpc', - POWER_VIRTUAL_SERVER = 'power_virtual_server', - REDUNDANT_GRE = 'redundant_gre', - VPN_GATEWAY = 'vpn_gateway', - } - /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field does not apply to the `redundant_gre` network types. */ - export enum PrefixFiltersDefault { - PERMIT = 'permit', - DENY = 'deny', - } - /** Only visible for cross account connections, this field represents the status of a connection request between IBM Cloud accounts. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum RequestStatus { - PENDING = 'pending', - APPROVED = 'approved', - REJECTED = 'rejected', - EXPIRED = 'expired', - DETACHED = 'detached', - } - /** Connection's current configuration state. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum Status { - ATTACHED = 'attached', - FAILED = 'failed', - PENDING = 'pending', - NETWORK_PENDING = 'network_pending', - DELETING = 'deleting', - DETACHING = 'detaching', - DETACHED = 'detached', - SUSPENDING = 'suspending', - SUSPENDED = 'suspended', - } - } - } - /** - * Transit gateway connections. - */ + /** Transit gateway connections. */ export interface TransitConnectionCollection { /** Array of transit gateway connections. */ connections: TransitConnection[]; @@ -3039,9 +3213,7 @@ namespace TransitGatewayApisV1 { next?: PaginationNextConnection; } - /** - * Details of a Transit Gateway. - */ + /** Details of a Transit Gateway. */ export interface TransitGateway { /** The number of connections associated with this Transit Gateway. */ connection_count?: number; @@ -3063,6 +3235,12 @@ namespace TransitGatewayApisV1 { location: string; /** A human readable name for the transit gateway. */ name: string; + /** The redundancy group for this global transit gateway. The global transit gateways in this redundancy group + * will be redundant to each other. + */ + redundancy_group?: string; + /** The unique identifier of the redundancy group for this global transit gateway. */ + redundancy_group_id?: string; /** The resource group to use. If unspecified, the account's [default resource * group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. */ @@ -3070,27 +3248,12 @@ namespace TransitGatewayApisV1 { /** The status of the Transit Gateway. The list of enumerated values for this property may expand in the future. * Code and processes using this field must tolerate unexpected values. */ - status: TransitGateway.Constants.Status | string; + status: string; /** The date and time that this gateway was last updated. */ updated_at?: string; } - export namespace TransitGateway { - export namespace Constants { - /** The status of the Transit Gateway. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum Status { - AVAILABLE = 'available', - FAILED = 'failed', - PENDING = 'pending', - DELETING = 'deleting', - SUSPENDING = 'suspending', - SUSPENDED = 'suspended', - } - } - } - /** - * A list of Transit Gateways. - */ + /** A list of Transit Gateways. */ export interface TransitGatewayCollection { /** A reference to the first page of resources. */ first: PaginationFirstTG; @@ -3102,9 +3265,7 @@ namespace TransitGatewayApisV1 { transit_gateways: TransitGateway[]; } - /** - * A set of Transit Gateway network connections. - */ + /** A set of Transit Gateway network connections. */ export interface TransitGatewayConnectionCollection { /** Array of transit gateways network Connections. */ connections: TransitGatewayConnectionCust[]; @@ -3122,9 +3283,7 @@ namespace TransitGatewayApisV1 { total_count: number; } - /** - * Connection included in transit gateway. - */ + /** Connection included in transit gateway. */ export interface TransitGatewayConnectionCust { /** Deprecated: network_type `gre_tunnel` connections use `base_connection_id` to specify the ID of a * network_type `classic` connection the tunnel is configured over. The specified connection must reside in the @@ -3136,10 +3295,12 @@ namespace TransitGatewayApisV1 { /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type * `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required * and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, - * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. + * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. + */ + base_network_type?: string; + /** network_type `vpn_gateway` and `dynamic_route_server` connections use `cidr` to specify the CIDR to use for + * the `VPN gateway / Dynamic route server` GRE tunnels. */ - base_network_type?: TransitGatewayConnectionCust.Constants.BaseNetworkType | string; - /** network_type 'vpn_gateway' connections use 'cidr' to specify the CIDR to use for the VPN GRE tunnels. */ cidr?: string; /** The date and time that this connection was created. */ created_at: string; @@ -3163,7 +3324,7 @@ namespace TransitGatewayApisV1 { * the name of the VPC. Network type `classic` connections are named `classic`. * * This field is required for network type `power_virtual_server`, `directlink`, `gre_tunnel`, - * `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. + * `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. * * This field is optional for network type `classic`, `vpc` connections. */ @@ -3172,16 +3333,16 @@ namespace TransitGatewayApisV1 { * IBM Cloud account than the gateway. */ network_account_id?: string; - /** The ID of the network being connected via this connection. For network types `vpc`,`power_virtual_server`, - * `directlink` and `vpn_gateway` this is the CRN of the VPC / PowerVS / VDC / Direct Link / VPN gateway - * respectively. This field is required for network type `vpc`, `power_virtual_server`, `vpn_gateway`, and - * `directlink` connections. It is also required for `redundant_gre` connections when the base_network_type is set - * to VPC. This field is required to be unspecified for network type `classic`, `gre_tunnel` and - * `unbound_gre_tunnel` connections. + /** The ID of the network being connected via this connection. For network types `vpc`, `vpn_gateway`, + * `dynamic_route_server`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route + * Server / PowerVS / Direct Link gateway respectively. This field is required for network type `vpc`, + * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `directlink` connections. It is also required + * for `redundant_gre` connections when the base_network_type is set to VPC. This field is required to be + * unspecified for network type `classic`, `gre_tunnel` and `unbound_gre_tunnel` connections. */ network_id?: string; /** Defines what type of network is connected via this connection. */ - network_type?: TransitGatewayConnectionCust.Constants.NetworkType | string; + network_type?: string; /** Array of prefix route filters for a transit gateway connection. This is order dependent with those first in * the array being applied first, and those at the end of the array is applied last, or just before the default. * This field does not apply to the `redundant_gre` network type. @@ -3190,7 +3351,7 @@ namespace TransitGatewayApisV1 { /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This * field does not apply to the `redundant_gre` network type. */ - prefix_filters_default?: TransitGatewayConnectionCust.Constants.PrefixFiltersDefault | string; + prefix_filters_default?: string; /** Remote network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. */ @@ -3207,12 +3368,12 @@ namespace TransitGatewayApisV1 { * IBM Cloud accounts. The list of enumerated values for this property may expand in the future. Code and processes * using this field must tolerate unexpected values. */ - request_status: TransitGatewayConnectionCust.Constants.RequestStatus | string; + request_status: string; /** Connection's current configuration state. The list of enumerated values for this property may expand in the * future. Code and processes using this field must tolerate unexpected values. */ - status: TransitGatewayConnectionCust.Constants.Status | string; - /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ + status: string; + /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ tunnels?: TransitGatewayTunnel[]; /** The date and time that this connection was last updated. */ updated_at: string; @@ -3222,59 +3383,11 @@ namespace TransitGatewayApisV1 { */ zone?: ZoneReference; } - export namespace TransitGatewayConnectionCust { - export namespace Constants { - /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ - export enum BaseNetworkType { - CLASSIC = 'classic', - VPC = 'vpc', - VPN = 'vpn', - } - /** Defines what type of network is connected via this connection. */ - export enum NetworkType { - CLASSIC = 'classic', - DIRECTLINK = 'directlink', - GRE_TUNNEL = 'gre_tunnel', - UNBOUND_GRE_TUNNEL = 'unbound_gre_tunnel', - VPC = 'vpc', - POWER_VIRTUAL_SERVER = 'power_virtual_server', - REDUNDANT_GRE = 'redundant_gre', - VPN_GATEWAY = 'vpn_gateway', - } - /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field does not apply to the `redundant_gre` network type. */ - export enum PrefixFiltersDefault { - PERMIT = 'permit', - DENY = 'deny', - } - /** Only visible for cross account connections, this field represents the status of a connection request between IBM Cloud accounts. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum RequestStatus { - PENDING = 'pending', - APPROVED = 'approved', - REJECTED = 'rejected', - EXPIRED = 'expired', - DETACHED = 'detached', - } - /** Connection's current configuration state. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum Status { - ATTACHED = 'attached', - FAILED = 'failed', - PENDING = 'pending', - NETWORK_PENDING = 'network_pending', - DELETING = 'deleting', - DETACHING = 'detaching', - DETACHED = 'detached', - SUSPENDING = 'suspending', - SUSPENDED = 'suspended', - } - } - } - /** - * A prefix filter for a Transit Gateway connection. - */ + /** A prefix filter for a Transit Gateway connection. */ export interface TransitGatewayConnectionPrefixFilter { /** Whether to permit or deny prefix filter. */ - action: TransitGatewayConnectionPrefixFilter.Constants.Action | string; + action: string; /** IP Prefix GE. */ ge?: number; /** IP Prefix LE. */ @@ -3282,22 +3395,11 @@ namespace TransitGatewayApisV1 { /** IP Prefix. */ prefix: string; } - export namespace TransitGatewayConnectionPrefixFilter { - export namespace Constants { - /** Whether to permit or deny prefix filter. */ - export enum Action { - PERMIT = 'permit', - DENY = 'deny', - } - } - } - /** - * A prefix filter reference object for a Transit Gateway connection. - */ + /** A prefix filter reference object for a Transit Gateway connection. */ export interface TransitGatewayConnectionPrefixFilterReference { /** Whether to permit or deny prefix filter. */ - action: TransitGatewayConnectionPrefixFilterReference.Constants.Action | string; + action: string; /** Identifier of prefix filter that handles the ordering and follow semantics: * - When a filter reference another filter in it's before field, then the filter making the reference is applied * before @@ -3330,19 +3432,8 @@ namespace TransitGatewayApisV1 { /** The date and time that this prefix filter was last updated. */ updated_at?: string; } - export namespace TransitGatewayConnectionPrefixFilterReference { - export namespace Constants { - /** Whether to permit or deny prefix filter. */ - export enum Action { - PERMIT = 'permit', - DENY = 'deny', - } - } - } - /** - * Transit gateway reference. - */ + /** Transit gateway reference. */ export interface TransitGatewayReference { /** gateway CRN. */ crn: string; @@ -3352,12 +3443,10 @@ namespace TransitGatewayApisV1 { name: string; } - /** - * Details for a redundant GRE tunnel. - */ + /** Details for a redundant GRE tunnel. */ export interface TransitGatewayTunnel { /** The type of network the redundant GRE tunnel is targeting. */ - base_network_type: TransitGatewayTunnel.Constants.BaseNetworkType | string; + base_network_type: string; /** The date and time that this GRE tunnel was created. */ created_at: string; /** The unique identifier for this redundant GRE tunnel. */ @@ -3394,45 +3483,20 @@ namespace TransitGatewayApisV1 { /** Tunnel's current configuration state. The list of enumerated values for this property may expand in the * future. Code and processes using this field must tolerate unexpected values. */ - status: TransitGatewayTunnel.Constants.Status | string; + status: string; /** The date and time that this tunnel was last updated. */ updated_at: string; /** Availability zone reference. */ zone: ZoneReference; } - export namespace TransitGatewayTunnel { - export namespace Constants { - /** The type of network the redundant GRE tunnel is targeting. */ - export enum BaseNetworkType { - CLASSIC = 'classic', - VPC = 'vpc', - VPN = 'vpn', - } - /** Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - export enum Status { - ATTACHED = 'attached', - FAILED = 'failed', - PENDING = 'pending', - DELETING = 'deleting', - DETACHING = 'detaching', - DETACHED = 'detached', - SUSPENDING = 'suspending', - SUSPENDED = 'suspended', - } - } - } - /** - * Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. - */ + /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ export interface TransitGatewayTunnelCollection { - /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ + /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ tunnels: TransitGatewayTunnel[]; } - /** - * A create template with information for redundant GRE tunnel. - */ + /** A create template with information for redundant GRE tunnel. */ export interface TransitGatewayTunnelTemplate { /** Local gateway IP address. */ local_gateway_ip: string; @@ -3459,23 +3523,17 @@ namespace TransitGatewayApisV1 { zone: ZoneIdentity; } - /** - * ZoneIdentity. - */ + /** ZoneIdentity. */ export interface ZoneIdentity { } - /** - * Availability zone reference. - */ + /** Availability zone reference. */ export interface ZoneReference { /** Availability zone name. */ name: string; } - /** - * Availability zone. - */ + /** Availability zone. */ export interface ZoneIdentityByName extends ZoneIdentity { /** Availability zone name. */ name?: string; @@ -3490,7 +3548,6 @@ namespace TransitGatewayApisV1 { */ export class TransitGatewaysPager { protected _hasNext: boolean; - protected pageContext: any; protected client: TransitGatewayApisV1; @@ -3505,7 +3562,10 @@ namespace TransitGatewayApisV1 { * @constructor * @returns {TransitGatewaysPager} */ - constructor(client: TransitGatewayApisV1, params?: TransitGatewayApisV1.ListTransitGatewaysParams) { + constructor( + client: TransitGatewayApisV1, + params?: TransitGatewayApisV1.ListTransitGatewaysParams + ) { if (params && params.start) { throw new Error(`the params.start field should not be set`); } @@ -3539,9 +3599,9 @@ namespace TransitGatewayApisV1 { const response = await this.client.listTransitGateways(this.params); const { result } = response; - let next; + let next = null; if (result && result.next) { - next = result.next.start; + next = result.next.start } this.pageContext.next = next; if (!this.pageContext.next) { @@ -3569,7 +3629,6 @@ namespace TransitGatewayApisV1 { */ export class ConnectionsPager { protected _hasNext: boolean; - protected pageContext: any; protected client: TransitGatewayApisV1; @@ -3584,7 +3643,10 @@ namespace TransitGatewayApisV1 { * @constructor * @returns {ConnectionsPager} */ - constructor(client: TransitGatewayApisV1, params?: TransitGatewayApisV1.ListConnectionsParams) { + constructor( + client: TransitGatewayApisV1, + params?: TransitGatewayApisV1.ListConnectionsParams + ) { if (params && params.start) { throw new Error(`the params.start field should not be set`); } @@ -3618,9 +3680,9 @@ namespace TransitGatewayApisV1 { const response = await this.client.listConnections(this.params); const { result } = response; - let next; + let next = null; if (result && result.next) { - next = result.next.start; + next = result.next.start } this.pageContext.next = next; if (!this.pageContext.next) { @@ -3648,7 +3710,6 @@ namespace TransitGatewayApisV1 { */ export class TransitGatewayConnectionsPager { protected _hasNext: boolean; - protected pageContext: any; protected client: TransitGatewayApisV1; @@ -3663,7 +3724,10 @@ namespace TransitGatewayApisV1 { * @constructor * @returns {TransitGatewayConnectionsPager} */ - constructor(client: TransitGatewayApisV1, params: TransitGatewayApisV1.ListTransitGatewayConnectionsParams) { + constructor( + client: TransitGatewayApisV1, + params: TransitGatewayApisV1.ListTransitGatewayConnectionsParams + ) { if (params && params.start) { throw new Error(`the params.start field should not be set`); } @@ -3697,9 +3761,9 @@ namespace TransitGatewayApisV1 { const response = await this.client.listTransitGatewayConnections(this.params); const { result } = response; - let next; + let next = null; if (result && result.next) { - next = result.next.start; + next = result.next.start } this.pageContext.next = next; if (!this.pageContext.next) { From 2493bd5331f0f2d37847ecea26295457ff8a75ff Mon Sep 17 00:00:00 2001 From: Joseph Kalandarishvili Date: Thu, 13 Aug 2026 13:16:30 -0500 Subject: [PATCH 2/6] feat: Added Redundant Global TGW related changes dependency: none Signed-off-by: Joseph Kalandarishvili --- test/unit/transit-gateway-apis.v1.test.js | 27 +- transit-gateway-apis/v1.ts | 871 ++++++++++++++-------- 2 files changed, 558 insertions(+), 340 deletions(-) diff --git a/test/unit/transit-gateway-apis.v1.test.js b/test/unit/transit-gateway-apis.v1.test.js index bda8bba..2342949 100644 --- a/test/unit/transit-gateway-apis.v1.test.js +++ b/test/unit/transit-gateway-apis.v1.test.js @@ -14,15 +14,15 @@ * limitations under the License. */ +/* eslint-disable no-await-in-loop */ + +const nock = require('nock'); + // need to import the whole package to mock getAuthenticatorFromEnvironment const sdkCorePackage = require('ibm-cloud-sdk-core'); -const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage; - +const { NoAuthAuthenticator } = sdkCorePackage; const TransitGatewayApisV1 = require('../../dist/transit-gateway-apis/v1'); -const nock = require('nock'); - -/* eslint-disable no-await-in-loop */ const { getOptions, @@ -30,7 +30,7 @@ const { checkMediaHeaders, expectToBePromise, checkForSuccessfulExecution, -} = unitTestUtils; +} = require('@ibm-cloud/sdk-test-utilities'); const transitGatewayApisServiceOptions = { authenticator: new NoAuthAuthenticator(), @@ -62,7 +62,6 @@ getAuthenticatorMock.mockImplementation(() => new NoAuthAuthenticator()); let requiredGlobals; describe('TransitGatewayApisV1', () => { - beforeEach(() => { mock_createRequest(); // these are changed when passed into the factory/constructor, so re-init @@ -77,7 +76,7 @@ describe('TransitGatewayApisV1', () => { } getAuthenticatorMock.mockClear(); }); - + describe('the newInstance method', () => { test('should use defaults when options not provided', () => { const testInstance = TransitGatewayApisV1.newInstance(requiredGlobals); @@ -226,9 +225,9 @@ describe('TransitGatewayApisV1', () => { beforeEach(() => { unmock_createRequest(); const scope = nock(serviceUrl) - .get(uri => uri.includes(path)) + .get((uri) => uri.includes(path)) .reply(200, mockPagerResponse1) - .get(uri => uri.includes(path)) + .get((uri) => uri.includes(path)) .reply(200, mockPagerResponse2); }); @@ -726,9 +725,9 @@ describe('TransitGatewayApisV1', () => { beforeEach(() => { unmock_createRequest(); const scope = nock(serviceUrl) - .get(uri => uri.includes(path)) + .get((uri) => uri.includes(path)) .reply(200, mockPagerResponse1) - .get(uri => uri.includes(path)) + .get((uri) => uri.includes(path)) .reply(200, mockPagerResponse2); }); @@ -872,9 +871,9 @@ describe('TransitGatewayApisV1', () => { beforeEach(() => { unmock_createRequest(); const scope = nock(serviceUrl) - .get(uri => uri.includes(path)) + .get((uri) => uri.includes(path)) .reply(200, mockPagerResponse1) - .get(uri => uri.includes(path)) + .get((uri) => uri.includes(path)) .reply(200, mockPagerResponse2); }); diff --git a/transit-gateway-apis/v1.ts b/transit-gateway-apis/v1.ts index 8626405..f29c101 100644 --- a/transit-gateway-apis/v1.ts +++ b/transit-gateway-apis/v1.ts @@ -15,7 +15,7 @@ */ /** - * IBM OpenAPI SDK Code Generator Version: 3.73.0-eeee85a9-20230607-165104 + * IBM OpenAPI SDK Code Generator Version: 3.107.1-41b0fbd0-20250825-080732 */ /* eslint-disable max-classes-per-file */ @@ -24,11 +24,12 @@ import * as extend from 'extend'; import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'; import { + AbortSignal, Authenticator, BaseService, + UserOptions, getAuthenticatorFromEnvironment, validateParams, - UserOptions, } from 'ibm-cloud-sdk-core'; import { getSdkHeaders } from '../lib/common'; @@ -53,7 +54,7 @@ class TransitGatewayApisV1 extends BaseService { * @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 URL for the service + * @param {string} [options.serviceUrl] - The base URL for the service * @returns {TransitGatewayApisV1} */ @@ -85,7 +86,7 @@ class TransitGatewayApisV1 extends BaseService { * @param {Object} options - Options for the service. * @param {string} options.version - Requests the version of the API as of a date in the format `YYYY-MM-DD`. Any date * up to the current date may be provided. Specify the current date to request the latest version. - * @param {string} [options.serviceUrl] - The base url to use when contacting the service. The base url may differ between IBM Cloud regions. + * @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 @@ -134,7 +135,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = []; - const _validParams = ['limit', 'start', 'redundancyGroup', 'headers']; + const _validParams = ['limit', 'start', 'redundancyGroup', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -147,11 +148,7 @@ class TransitGatewayApisV1 extends BaseService { 'redundancy_group': _params.redundancyGroup, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'listTransitGateways' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGateways'); const parameters = { options: { @@ -163,11 +160,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -205,7 +206,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['location', 'name']; - const _validParams = ['location', 'name', 'global', 'greEnhancedRoutePropagation', 'redundancyGroup', 'resourceGroup', 'headers']; + const _validParams = ['location', 'name', 'global', 'greEnhancedRoutePropagation', 'redundancyGroup', 'resourceGroup', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -224,11 +225,7 @@ class TransitGatewayApisV1 extends BaseService { 'version': this.version, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'createTransitGateway' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGateway'); const parameters = { options: { @@ -241,12 +238,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -269,7 +270,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['id']; - const _validParams = ['id', 'headers']; + const _validParams = ['id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -283,11 +284,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'deleteTransitGateway' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGateway'); const parameters = { options: { @@ -300,10 +297,14 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -328,7 +329,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['id']; - const _validParams = ['id', 'headers']; + const _validParams = ['id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -342,11 +343,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'getTransitGateway' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGateway'); const parameters = { options: { @@ -359,11 +356,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -397,7 +398,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['id']; - const _validParams = ['id', 'global', 'greEnhancedRoutePropagation', 'name', 'redundancyGroup', 'headers']; + const _validParams = ['id', 'global', 'greEnhancedRoutePropagation', 'name', 'redundancyGroup', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -418,11 +419,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'updateTransitGateway' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTransitGateway'); const parameters = { options: { @@ -436,12 +433,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -473,7 +474,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = []; - const _validParams = ['limit', 'start', 'networkId', 'networkType', 'headers']; + const _validParams = ['limit', 'start', 'networkId', 'networkType', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -487,11 +488,7 @@ class TransitGatewayApisV1 extends BaseService { 'network_type': _params.networkType, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'listConnections' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listConnections'); const parameters = { options: { @@ -503,11 +500,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -535,7 +536,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId']; - const _validParams = ['transitGatewayId', 'start', 'limit', 'name', 'headers']; + const _validParams = ['transitGatewayId', 'start', 'limit', 'name', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -552,11 +553,7 @@ class TransitGatewayApisV1 extends BaseService { 'transit_gateway_id': _params.transitGatewayId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'listTransitGatewayConnections' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGatewayConnections'); const parameters = { options: { @@ -569,11 +566,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -688,7 +689,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'networkType']; - const _validParams = ['transitGatewayId', 'networkType', 'baseConnectionId', 'baseNetworkType', 'cidr', 'localGatewayIp', 'localTunnelIp', 'name', 'networkAccountId', 'networkId', 'prefixFilters', 'prefixFiltersDefault', 'remoteBgpAsn', 'remoteGatewayIp', 'remoteTunnelIp', 'tunnels', 'zone', 'headers']; + const _validParams = ['transitGatewayId', 'networkType', 'baseConnectionId', 'baseNetworkType', 'cidr', 'localGatewayIp', 'localTunnelIp', 'name', 'networkAccountId', 'networkId', 'prefixFilters', 'prefixFiltersDefault', 'remoteBgpAsn', 'remoteGatewayIp', 'remoteTunnelIp', 'tunnels', 'zone', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -721,11 +722,7 @@ class TransitGatewayApisV1 extends BaseService { 'transit_gateway_id': _params.transitGatewayId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'createTransitGatewayConnection' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayConnection'); const parameters = { options: { @@ -739,12 +736,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -768,7 +769,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -783,11 +784,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'deleteTransitGatewayConnection' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGatewayConnection'); const parameters = { options: { @@ -800,10 +797,14 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -826,7 +827,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -841,11 +842,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'getTransitGatewayConnection' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGatewayConnection'); const parameters = { options: { @@ -858,11 +855,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -890,7 +891,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'name', 'prefixFiltersDefault', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'name', 'prefixFiltersDefault', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -910,11 +911,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'updateTransitGatewayConnection' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTransitGatewayConnection'); const parameters = { options: { @@ -928,12 +925,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -957,7 +958,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'action']; - const _validParams = ['transitGatewayId', 'id', 'action', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'action', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -976,11 +977,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'createTransitGatewayConnectionActions' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayConnectionActions'); const parameters = { options: { @@ -994,11 +991,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Content-Type': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1021,7 +1022,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1036,11 +1037,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'listTransitGatewayGreTunnel' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGatewayGreTunnel'); const parameters = { options: { @@ -1053,11 +1050,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1093,7 +1094,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'localGatewayIp', 'localTunnelIp', 'name', 'remoteGatewayIp', 'remoteTunnelIp', 'zone']; - const _validParams = ['transitGatewayId', 'id', 'localGatewayIp', 'localTunnelIp', 'name', 'remoteGatewayIp', 'remoteTunnelIp', 'zone', 'remoteBgpAsn', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'localGatewayIp', 'localTunnelIp', 'name', 'remoteGatewayIp', 'remoteTunnelIp', 'zone', 'remoteBgpAsn', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1118,11 +1119,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'createTransitGatewayGreTunnel' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayGreTunnel'); const parameters = { options: { @@ -1136,12 +1133,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1165,7 +1166,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'greTunnelId']; - const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1181,11 +1182,7 @@ class TransitGatewayApisV1 extends BaseService { 'gre_tunnel_id': _params.greTunnelId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'deleteTransitGatewayConnectionTunnels' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGatewayConnectionTunnels'); const parameters = { options: { @@ -1198,10 +1195,14 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1225,7 +1226,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'greTunnelId']; - const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1241,11 +1242,7 @@ class TransitGatewayApisV1 extends BaseService { 'gre_tunnel_id': _params.greTunnelId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'getTransitGatewayConnectionTunnels' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGatewayConnectionTunnels'); const parameters = { options: { @@ -1258,11 +1255,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1287,7 +1288,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'greTunnelId']; - const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'name', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'greTunnelId', 'name', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1307,11 +1308,7 @@ class TransitGatewayApisV1 extends BaseService { 'gre_tunnel_id': _params.greTunnelId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'updateTransitGatewayConnectionTunnels' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTransitGatewayConnectionTunnels'); const parameters = { options: { @@ -1325,12 +1322,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/merge-patch+json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1354,7 +1355,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = []; - const _validParams = ['headers']; + const _validParams = ['signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1364,11 +1365,7 @@ class TransitGatewayApisV1 extends BaseService { 'version': this.version, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'listGatewayLocations' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listGatewayLocations'); const parameters = { options: { @@ -1380,11 +1377,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1406,7 +1407,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['name']; - const _validParams = ['name', 'headers']; + const _validParams = ['name', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1420,11 +1421,7 @@ class TransitGatewayApisV1 extends BaseService { 'name': _params.name, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'getGatewayLocation' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getGatewayLocation'); const parameters = { options: { @@ -1437,11 +1434,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1467,7 +1468,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1482,11 +1483,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'listTransitGatewayConnectionPrefixFilters' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGatewayConnectionPrefixFilters'); const parameters = { options: { @@ -1499,11 +1496,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1554,7 +1555,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'action', 'prefix']; - const _validParams = ['transitGatewayId', 'id', 'action', 'prefix', 'before', 'ge', 'le', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'action', 'prefix', 'before', 'ge', 'le', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1577,11 +1578,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'createTransitGatewayConnectionPrefixFilter' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayConnectionPrefixFilter'); const parameters = { options: { @@ -1595,12 +1592,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1624,7 +1625,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'filterId']; - const _validParams = ['transitGatewayId', 'id', 'filterId', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'filterId', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1640,11 +1641,7 @@ class TransitGatewayApisV1 extends BaseService { 'filter_id': _params.filterId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'deleteTransitGatewayConnectionPrefixFilter' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGatewayConnectionPrefixFilter'); const parameters = { options: { @@ -1657,10 +1654,14 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1684,7 +1685,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'filterId']; - const _validParams = ['transitGatewayId', 'id', 'filterId', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'filterId', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1700,11 +1701,7 @@ class TransitGatewayApisV1 extends BaseService { 'filter_id': _params.filterId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'getTransitGatewayConnectionPrefixFilter' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGatewayConnectionPrefixFilter'); const parameters = { options: { @@ -1717,11 +1714,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1768,7 +1769,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id', 'filterId']; - const _validParams = ['transitGatewayId', 'id', 'filterId', 'action', 'before', 'ge', 'le', 'prefix', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'filterId', 'action', 'before', 'ge', 'le', 'prefix', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1792,11 +1793,7 @@ class TransitGatewayApisV1 extends BaseService { 'filter_id': _params.filterId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'updateTransitGatewayConnectionPrefixFilter' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateTransitGatewayConnectionPrefixFilter'); const parameters = { options: { @@ -1810,12 +1807,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1841,7 +1842,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId']; - const _validParams = ['transitGatewayId', 'headers']; + const _validParams = ['transitGatewayId', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1855,11 +1856,7 @@ class TransitGatewayApisV1 extends BaseService { 'transit_gateway_id': _params.transitGatewayId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'listTransitGatewayRouteReports' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listTransitGatewayRouteReports'); const parameters = { options: { @@ -1872,11 +1869,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1899,7 +1900,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId']; - const _validParams = ['transitGatewayId', 'headers']; + const _validParams = ['transitGatewayId', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1913,11 +1914,7 @@ class TransitGatewayApisV1 extends BaseService { 'transit_gateway_id': _params.transitGatewayId, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'createTransitGatewayRouteReport' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'createTransitGatewayRouteReport'); const parameters = { options: { @@ -1930,11 +1927,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -1957,7 +1958,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -1972,11 +1973,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'deleteTransitGatewayRouteReport' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteTransitGatewayRouteReport'); const parameters = { options: { @@ -1989,10 +1986,14 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -2015,7 +2016,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['transitGatewayId', 'id']; - const _validParams = ['transitGatewayId', 'id', 'headers']; + const _validParams = ['transitGatewayId', 'id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -2030,11 +2031,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'getTransitGatewayRouteReport' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getTransitGatewayRouteReport'); const parameters = { options: { @@ -2047,11 +2044,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -2076,7 +2077,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = []; - const _validParams = ['name', 'headers']; + const _validParams = ['name', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -2087,11 +2088,7 @@ class TransitGatewayApisV1 extends BaseService { 'name': _params.name, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'listRedundancyGroups' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'listRedundancyGroups'); const parameters = { options: { @@ -2103,11 +2100,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -2129,7 +2130,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['id']; - const _validParams = ['id', 'headers']; + const _validParams = ['id', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -2143,11 +2144,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'getRedundancyGroup' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'getRedundancyGroup'); const parameters = { options: { @@ -2160,11 +2157,15 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -2187,7 +2188,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['id']; - const _validParams = ['id', 'name', 'headers']; + const _validParams = ['id', 'name', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -2205,11 +2206,7 @@ class TransitGatewayApisV1 extends BaseService { 'id': _params.id, }; - const sdkHeaders = getSdkHeaders( - TransitGatewayApisV1.DEFAULT_SERVICE_NAME, - 'v1', - 'updateRedundancyGroup' - ); + const sdkHeaders = getSdkHeaders(TransitGatewayApisV1.DEFAULT_SERVICE_NAME, 'v1', 'updateRedundancyGroup'); const parameters = { options: { @@ -2223,12 +2220,16 @@ class TransitGatewayApisV1 extends BaseService { headers: extend( true, sdkHeaders, + this.baseOptions.headers, { 'Accept': 'application/json', 'Content-Type': 'application/merge-patch+json', }, _params.headers ), + axiosOptions: { + signal: _params.signal, + }, }), }; @@ -2272,19 +2273,23 @@ namespace TransitGatewayApisV1 { * request interfaces ************************/ + interface DefaultParams { + headers?: OutgoingHttpHeaders; + signal?: AbortSignal; + } + /** Parameters for the `listTransitGateways` operation. */ - export interface ListTransitGatewaysParams { + export interface ListTransitGatewaysParams extends DefaultParams { /** The maximum number of resources to return per page. */ limit?: number; /** A server supplied token determining which resource to start the page on. */ start?: string; /** Filter the list of transit gateways by redundancy group name. */ redundancyGroup?: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGateway` operation. */ - export interface CreateTransitGatewayParams { + export interface CreateTransitGatewayParams extends DefaultParams { /** Location of Transit Gateway Services. */ location: string; /** A human readable name for the transit gateway. */ @@ -2305,25 +2310,22 @@ namespace TransitGatewayApisV1 { * group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. */ resourceGroup?: ResourceGroupIdentity; - headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteTransitGateway` operation. */ - export interface DeleteTransitGatewayParams { + export interface DeleteTransitGatewayParams extends DefaultParams { /** The Transit Gateway identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGateway` operation. */ - export interface GetTransitGatewayParams { + export interface GetTransitGatewayParams extends DefaultParams { /** The Transit Gateway identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `updateTransitGateway` operation. */ - export interface UpdateTransitGatewayParams { + export interface UpdateTransitGatewayParams extends DefaultParams { /** The Transit Gateway identifier. */ id: string; /** Allow global routing for a Transit Gateway. This property cannot be changed if the transit gateway has @@ -2342,11 +2344,10 @@ namespace TransitGatewayApisV1 { * redundancy group, and no redundancy group with this name already exists in the account. */ redundancyGroup?: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `listConnections` operation. */ - export interface ListConnectionsParams { + export interface ListConnectionsParams extends DefaultParams { /** The maximum number of resources to return per page. */ limit?: number; /** A server supplied token determining which resource to start the page on. */ @@ -2355,11 +2356,10 @@ namespace TransitGatewayApisV1 { networkId?: string; /** Search for connections with the given network_type value. */ networkType?: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `listTransitGatewayConnections` operation. */ - export interface ListTransitGatewayConnectionsParams { + export interface ListTransitGatewayConnectionsParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** A server supplied token determining which resource to start the page on. */ @@ -2368,11 +2368,10 @@ namespace TransitGatewayApisV1 { limit?: number; /** Search for connections with the given name. */ name?: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGatewayConnection` operation. */ - export interface CreateTransitGatewayConnectionParams { + export interface CreateTransitGatewayConnectionParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** Defines what type of network is connected via this connection. */ @@ -2495,7 +2494,6 @@ namespace TransitGatewayApisV1 { * `power_virtual_server`, `redundant_gre` and `dynamic_route_server` connections. */ zone?: ZoneIdentity; - headers?: OutgoingHttpHeaders; } /** Constants for the `createTransitGatewayConnection` operation. */ @@ -2525,25 +2523,23 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `deleteTransitGatewayConnection` operation. */ - export interface DeleteTransitGatewayConnectionParams { + export interface DeleteTransitGatewayConnectionParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGatewayConnection` operation. */ - export interface GetTransitGatewayConnectionParams { + export interface GetTransitGatewayConnectionParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `updateTransitGatewayConnection` operation. */ - export interface UpdateTransitGatewayConnectionParams { + export interface UpdateTransitGatewayConnectionParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2555,7 +2551,6 @@ namespace TransitGatewayApisV1 { name?: string; /** Default setting of permit or deny which applies to any routes that don't match a specified filter. */ prefixFiltersDefault?: UpdateTransitGatewayConnectionConstants.PrefixFiltersDefault | string; - headers?: OutgoingHttpHeaders; } /** Constants for the `updateTransitGatewayConnection` operation. */ @@ -2568,14 +2563,13 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `createTransitGatewayConnectionActions` operation. */ - export interface CreateTransitGatewayConnectionActionsParams { + export interface CreateTransitGatewayConnectionActionsParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** The action that is to be performed against the connection request. */ action: CreateTransitGatewayConnectionActionsConstants.Action | string; - headers?: OutgoingHttpHeaders; } /** Constants for the `createTransitGatewayConnectionActions` operation. */ @@ -2588,16 +2582,15 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `listTransitGatewayGreTunnel` operation. */ - export interface ListTransitGatewayGreTunnelParams { + export interface ListTransitGatewayGreTunnelParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGatewayGreTunnel` operation. */ - export interface CreateTransitGatewayGreTunnelParams { + export interface CreateTransitGatewayGreTunnelParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2625,33 +2618,30 @@ namespace TransitGatewayApisV1 { * is omitted on create requests, IBM will assign an ASN. */ remoteBgpAsn?: number; - headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteTransitGatewayConnectionTunnels` operation. */ - export interface DeleteTransitGatewayConnectionTunnelsParams { + export interface DeleteTransitGatewayConnectionTunnelsParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** The tunnel identifier. */ greTunnelId: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGatewayConnectionTunnels` operation. */ - export interface GetTransitGatewayConnectionTunnelsParams { + export interface GetTransitGatewayConnectionTunnelsParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** The tunnel identifier. */ greTunnelId: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `updateTransitGatewayConnectionTunnels` operation. */ - export interface UpdateTransitGatewayConnectionTunnelsParams { + export interface UpdateTransitGatewayConnectionTunnelsParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2660,32 +2650,28 @@ namespace TransitGatewayApisV1 { greTunnelId: string; /** The user-defined name for this connection tunnel. */ name?: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `listGatewayLocations` operation. */ - export interface ListGatewayLocationsParams { - headers?: OutgoingHttpHeaders; + export interface ListGatewayLocationsParams extends DefaultParams { } /** Parameters for the `getGatewayLocation` operation. */ - export interface GetGatewayLocationParams { + export interface GetGatewayLocationParams extends DefaultParams { /** The Transit Gateway location Name. */ name: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `listTransitGatewayConnectionPrefixFilters` operation. */ - export interface ListTransitGatewayConnectionPrefixFiltersParams { + export interface ListTransitGatewayConnectionPrefixFiltersParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGatewayConnectionPrefixFilter` operation. */ - export interface CreateTransitGatewayConnectionPrefixFilterParams { + export interface CreateTransitGatewayConnectionPrefixFilterParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2724,7 +2710,6 @@ namespace TransitGatewayApisV1 { * inclusive. */ le?: number; - headers?: OutgoingHttpHeaders; } /** Constants for the `createTransitGatewayConnectionPrefixFilter` operation. */ @@ -2737,29 +2722,27 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `deleteTransitGatewayConnectionPrefixFilter` operation. */ - export interface DeleteTransitGatewayConnectionPrefixFilterParams { + export interface DeleteTransitGatewayConnectionPrefixFilterParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** Prefix filter identifier. */ filterId: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGatewayConnectionPrefixFilter` operation. */ - export interface GetTransitGatewayConnectionPrefixFilterParams { + export interface GetTransitGatewayConnectionPrefixFilterParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ id: string; /** Prefix filter identifier. */ filterId: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `updateTransitGatewayConnectionPrefixFilter` operation. */ - export interface UpdateTransitGatewayConnectionPrefixFilterParams { + export interface UpdateTransitGatewayConnectionPrefixFilterParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** The connection identifier. */ @@ -2796,7 +2779,6 @@ namespace TransitGatewayApisV1 { le?: number; /** The IPv4 Prefix to be matched by this filter. */ prefix?: string; - headers?: OutgoingHttpHeaders; } /** Constants for the `updateTransitGatewayConnectionPrefixFilter` operation. */ @@ -2809,83 +2791,85 @@ namespace TransitGatewayApisV1 { } /** Parameters for the `listTransitGatewayRouteReports` operation. */ - export interface ListTransitGatewayRouteReportsParams { + export interface ListTransitGatewayRouteReportsParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `createTransitGatewayRouteReport` operation. */ - export interface CreateTransitGatewayRouteReportParams { + export interface CreateTransitGatewayRouteReportParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `deleteTransitGatewayRouteReport` operation. */ - export interface DeleteTransitGatewayRouteReportParams { + export interface DeleteTransitGatewayRouteReportParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** Route report identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `getTransitGatewayRouteReport` operation. */ - export interface GetTransitGatewayRouteReportParams { + export interface GetTransitGatewayRouteReportParams extends DefaultParams { /** The Transit Gateway identifier. */ transitGatewayId: string; /** Route report identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `listRedundancyGroups` operation. */ - export interface ListRedundancyGroupsParams { + export interface ListRedundancyGroupsParams extends DefaultParams { /** Filter the list of redundancy groups by name. */ name?: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `getRedundancyGroup` operation. */ - export interface GetRedundancyGroupParams { + export interface GetRedundancyGroupParams extends DefaultParams { /** The redundancy group identifier. */ id: string; - headers?: OutgoingHttpHeaders; } /** Parameters for the `updateRedundancyGroup` operation. */ - export interface UpdateRedundancyGroupParams { + export interface UpdateRedundancyGroupParams extends DefaultParams { /** The redundancy group identifier. */ id: string; /** The new name for the redundancy group. */ name?: string; - headers?: OutgoingHttpHeaders; } /************************* * model interfaces ************************/ - /** A reference to the first page of resources. */ + /** + * A reference to the first page of resources. + */ export interface PaginationFirstConnection { /** url. */ href: string; } - /** A reference to the first page of resources. */ + /** + * A reference to the first page of resources. + */ export interface PaginationFirstTG { /** url. */ href: string; } - /** A reference to the first page of resources. This will be returned when number of connections in response are greater than max page limit. */ + /** + * A reference to the first page of resources. This will be returned when number of connections in response are + * greater than max page limit. + */ export interface PaginationFirstTGWConnection { /** url. */ href: string; } - /** A reference to the next page of resources; this reference is included for all pages except the last page. */ + /** + * A reference to the next page of resources; this reference is included for all pages except the last page. + */ export interface PaginationNextConnection { /** url. */ href: string; @@ -2893,7 +2877,9 @@ namespace TransitGatewayApisV1 { start: string; } - /** A reference to the next page of resources; this reference is included for all pages except the last page. */ + /** + * A reference to the next page of resources; this reference is included for all pages except the last page. + */ export interface PaginationNextTG { /** url. */ href: string; @@ -2901,7 +2887,9 @@ namespace TransitGatewayApisV1 { start: string; } - /** A reference to the next page of resources; this reference is included for all pages except the last page. */ + /** + * A reference to the next page of resources; this reference is included for all pages except the last page. + */ export interface PaginationNextTGWConnection { /** url. */ href: string; @@ -2909,16 +2897,20 @@ namespace TransitGatewayApisV1 { start: string; } - /** prefix filters. */ + /** + * prefix filters. + */ export interface PrefixFilterCollection { /** Array of prefix filters. */ prefix_filters: PrefixFilterCust[]; } - /** prefix filter. */ + /** + * prefix filter. + */ export interface PrefixFilterCust { /** Whether or not this prefix filter should allow or deny prefixes matching this filter's prefix definition. */ - action: string; + action: PrefixFilterCust.Constants.Action | string; /** A reference to the prefix filter that will be the next filter applied to the Transit Gateway connection. * * If this field is blank, this prefix filter will be the last rule applied before the connection's default rule. @@ -2958,8 +2950,19 @@ namespace TransitGatewayApisV1 { /** The date and time that this prefix filter was last updated. */ updated_at?: string; } + export namespace PrefixFilterCust { + export namespace Constants { + /** Whether or not this prefix filter should allow or deny prefixes matching this filter's prefix definition. */ + export enum Action { + PERMIT = 'permit', + DENY = 'deny', + } + } + } - /** A redundancy group. */ + /** + * A redundancy group. + */ export interface RedundancyGroup { /** The date and time that this redundancy group was created. */ created_at: string; @@ -2971,19 +2974,27 @@ namespace TransitGatewayApisV1 { updated_at?: string; } - /** A list of redundancy groups. */ + /** + * A list of redundancy groups. + */ export interface RedundancyGroupCollection { /** Collection of redundancy groups. */ redundancy_groups: RedundancyGroup[]; } - /** The resource group to use. If unspecified, the account's [default resource group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. */ + /** + * The resource group to use. If unspecified, the account's [default resource + * group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. + */ export interface ResourceGroupIdentity { /** The unique identifier for this resource group. */ id: string; } - /** The resource group to use. If unspecified, the account's [default resource group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. */ + /** + * The resource group to use. If unspecified, the account's [default resource + * group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. + */ export interface ResourceGroupReference { /** The URL for this resource group. */ href: string; @@ -2991,7 +3002,9 @@ namespace TransitGatewayApisV1 { id: string; } - /** route report. */ + /** + * route report. + */ export interface RouteReport { /** Array of connections with their routes. */ connections: RouteReportConnection[]; @@ -3004,18 +3017,32 @@ namespace TransitGatewayApisV1 { /** Route report status. The list of enumerated values for this property may expand in the future. Code and * processes using this field must tolerate unexpected values. */ - status: string; + status: RouteReport.Constants.Status | string; /** Date and time route report was last modified. */ updated_at?: string; } + export namespace RouteReport { + export namespace Constants { + /** Route report status. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum Status { + COMPLETE = 'complete', + PENDING = 'pending', + FAILED = 'failed', + } + } + } - /** route reports. */ + /** + * route reports. + */ export interface RouteReportCollection { /** Array of route reports. */ route_reports: RouteReport[]; } - /** route report connection. */ + /** + * route report connection. + */ export interface RouteReportConnection { /** Array of connection's bgps. */ bgps: RouteReportConnectionBgp[]; @@ -3029,7 +3056,9 @@ namespace TransitGatewayApisV1 { type?: string; } - /** connection bgp details. */ + /** + * connection bgp details. + */ export interface RouteReportConnectionBgp { /** AS path. */ as_path?: string; @@ -3041,13 +3070,17 @@ namespace TransitGatewayApisV1 { prefix?: string; } - /** connection used route. */ + /** + * connection used route. + */ export interface RouteReportConnectionRoute { /** prefix. */ prefix?: string; } - /** overlapping route details. */ + /** + * overlapping route details. + */ export interface RouteReportOverlappingRoute { /** connection ID. */ connection_id?: string; @@ -3055,19 +3088,25 @@ namespace TransitGatewayApisV1 { prefix?: string; } - /** Collection of overlapping route. */ + /** + * Collection of overlapping route. + */ export interface RouteReportOverlappingRouteGroup { /** Array of overlapping connection/prefix pairs. */ routes: RouteReportOverlappingRoute[]; } - /** A list of Transit Gateway locations. */ + /** + * A list of Transit Gateway locations. + */ export interface TSCollection { /** Collection of Transit Gateway locations. */ locations: TSLocationBasic[]; } - /** Details of a local connection location. */ + /** + * Details of a local connection location. + */ export interface TSLocalLocation { /** A descriptive display name for the location. */ display_name: string; @@ -3079,10 +3118,21 @@ namespace TransitGatewayApisV1 { * presence. The list of enumerated values for this property may expand in the future. Code and processes using * this field must tolerate unexpected values. */ - type: string; + type: TSLocalLocation.Constants.Type | string; + } + export namespace TSLocalLocation { + export namespace Constants { + /** The type of the location, determining is this a multi-zone region, a single data center, or a point of presence. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum Type { + REGION = 'region', + DC = 'dc', + } + } } - /** Details of a Transit Gateway location. */ + /** + * Details of a Transit Gateway location. + */ export interface TSLocation { /** The geographical location of this location, used for billing purposes. */ billing_location: string; @@ -3098,7 +3148,9 @@ namespace TransitGatewayApisV1 { zones: ZoneReference[]; } - /** Details of a Transit Gateway location. */ + /** + * Details of a Transit Gateway location. + */ export interface TSLocationBasic { /** The geographical location of this location, used for billing purposes. */ billing_location: string; @@ -3110,10 +3162,12 @@ namespace TransitGatewayApisV1 { type: string; } - /** Connection included in transit gateway. */ + /** + * Connection included in transit gateway. + */ export interface TransitConnection { /** The type of network the GRE tunnel is targeting. */ - base_network_type?: string; + base_network_type?: TransitConnection.Constants.BaseNetworkType | string; /** The user-defined name for this transit gateway connection. */ name: string; /** The ID of the network being connected via this connection. This field is required for some types, such as @@ -3125,7 +3179,7 @@ namespace TransitGatewayApisV1 { /** Defines what type of network is connected via this connection. The list of enumerated values for this * property may expand in the future. Code and processes using this field must tolerate unexpected values. */ - network_type: string; + network_type: TransitConnection.Constants.NetworkType | string; /** The unique identifier for this Transit Gateway connection. */ id: string; /** Deprecated: network_type `gre_tunnel` connections use `base_connection_id` to specify the ID of a @@ -3169,7 +3223,7 @@ namespace TransitGatewayApisV1 { * * This field does not apply to the `redundant_gre` network types. */ - prefix_filters_default?: string; + prefix_filters_default?: TransitConnection.Constants.PrefixFiltersDefault | string; /** Remote network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. */ @@ -3186,11 +3240,11 @@ namespace TransitGatewayApisV1 { * IBM Cloud accounts. The list of enumerated values for this property may expand in the future. Code and processes * using this field must tolerate unexpected values. */ - request_status: string; + request_status: TransitConnection.Constants.RequestStatus | string; /** Connection's current configuration state. The list of enumerated values for this property may expand in the * future. Code and processes using this field must tolerate unexpected values. */ - status: string; + status: TransitConnection.Constants.Status | string; /** Transit gateway reference. */ transit_gateway: TransitGatewayReference; /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ @@ -3200,8 +3254,56 @@ namespace TransitGatewayApisV1 { /** Availability zone reference. */ zone?: ZoneReference; } + export namespace TransitConnection { + export namespace Constants { + /** The type of network the GRE tunnel is targeting. */ + export enum BaseNetworkType { + CLASSIC = 'classic', + VPC = 'vpc', + } + /** Defines what type of network is connected via this connection. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum NetworkType { + CLASSIC = 'classic', + DIRECTLINK = 'directlink', + GRE_TUNNEL = 'gre_tunnel', + UNBOUND_GRE_TUNNEL = 'unbound_gre_tunnel', + VPC = 'vpc', + POWER_VIRTUAL_SERVER = 'power_virtual_server', + REDUNDANT_GRE = 'redundant_gre', + VPN_GATEWAY = 'vpn_gateway', + DYNAMIC_ROUTE_SERVER = 'dynamic_route_server', + } + /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field does not apply to the `redundant_gre` network types. */ + export enum PrefixFiltersDefault { + PERMIT = 'permit', + DENY = 'deny', + } + /** Only visible for cross account connections, this field represents the status of a connection request between IBM Cloud accounts. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum RequestStatus { + PENDING = 'pending', + APPROVED = 'approved', + REJECTED = 'rejected', + EXPIRED = 'expired', + DETACHED = 'detached', + } + /** Connection's current configuration state. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum Status { + ATTACHED = 'attached', + FAILED = 'failed', + PENDING = 'pending', + NETWORK_PENDING = 'network_pending', + DELETING = 'deleting', + DETACHING = 'detaching', + DETACHED = 'detached', + SUSPENDING = 'suspending', + SUSPENDED = 'suspended', + } + } + } - /** Transit gateway connections. */ + /** + * Transit gateway connections. + */ export interface TransitConnectionCollection { /** Array of transit gateway connections. */ connections: TransitConnection[]; @@ -3213,7 +3315,9 @@ namespace TransitGatewayApisV1 { next?: PaginationNextConnection; } - /** Details of a Transit Gateway. */ + /** + * Details of a Transit Gateway. + */ export interface TransitGateway { /** The number of connections associated with this Transit Gateway. */ connection_count?: number; @@ -3248,12 +3352,27 @@ namespace TransitGatewayApisV1 { /** The status of the Transit Gateway. The list of enumerated values for this property may expand in the future. * Code and processes using this field must tolerate unexpected values. */ - status: string; + status: TransitGateway.Constants.Status | string; /** The date and time that this gateway was last updated. */ updated_at?: string; } + export namespace TransitGateway { + export namespace Constants { + /** The status of the Transit Gateway. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum Status { + AVAILABLE = 'available', + FAILED = 'failed', + PENDING = 'pending', + DELETING = 'deleting', + SUSPENDING = 'suspending', + SUSPENDED = 'suspended', + } + } + } - /** A list of Transit Gateways. */ + /** + * A list of Transit Gateways. + */ export interface TransitGatewayCollection { /** A reference to the first page of resources. */ first: PaginationFirstTG; @@ -3265,7 +3384,9 @@ namespace TransitGatewayApisV1 { transit_gateways: TransitGateway[]; } - /** A set of Transit Gateway network connections. */ + /** + * A set of Transit Gateway network connections. + */ export interface TransitGatewayConnectionCollection { /** Array of transit gateways network Connections. */ connections: TransitGatewayConnectionCust[]; @@ -3283,7 +3404,9 @@ namespace TransitGatewayApisV1 { total_count: number; } - /** Connection included in transit gateway. */ + /** + * Connection included in transit gateway. + */ export interface TransitGatewayConnectionCust { /** Deprecated: network_type `gre_tunnel` connections use `base_connection_id` to specify the ID of a * network_type `classic` connection the tunnel is configured over. The specified connection must reside in the @@ -3297,7 +3420,7 @@ namespace TransitGatewayApisV1 { * and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. */ - base_network_type?: string; + base_network_type?: TransitGatewayConnectionCust.Constants.BaseNetworkType | string; /** network_type `vpn_gateway` and `dynamic_route_server` connections use `cidr` to specify the CIDR to use for * the `VPN gateway / Dynamic route server` GRE tunnels. */ @@ -3342,7 +3465,7 @@ namespace TransitGatewayApisV1 { */ network_id?: string; /** Defines what type of network is connected via this connection. */ - network_type?: string; + network_type?: TransitGatewayConnectionCust.Constants.NetworkType | string; /** Array of prefix route filters for a transit gateway connection. This is order dependent with those first in * the array being applied first, and those at the end of the array is applied last, or just before the default. * This field does not apply to the `redundant_gre` network type. @@ -3351,7 +3474,7 @@ namespace TransitGatewayApisV1 { /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This * field does not apply to the `redundant_gre` network type. */ - prefix_filters_default?: string; + prefix_filters_default?: TransitGatewayConnectionCust.Constants.PrefixFiltersDefault | string; /** Remote network BGP ASN. This field only applies to network type `gre_tunnel` and `unbound_gre_tunnel` * connections. */ @@ -3368,11 +3491,11 @@ namespace TransitGatewayApisV1 { * IBM Cloud accounts. The list of enumerated values for this property may expand in the future. Code and processes * using this field must tolerate unexpected values. */ - request_status: string; + request_status: TransitGatewayConnectionCust.Constants.RequestStatus | string; /** Connection's current configuration state. The list of enumerated values for this property may expand in the * future. Code and processes using this field must tolerate unexpected values. */ - status: string; + status: TransitGatewayConnectionCust.Constants.Status | string; /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ tunnels?: TransitGatewayTunnel[]; /** The date and time that this connection was last updated. */ @@ -3383,11 +3506,59 @@ namespace TransitGatewayApisV1 { */ zone?: ZoneReference; } + export namespace TransitGatewayConnectionCust { + export namespace Constants { + /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. */ + export enum BaseNetworkType { + CLASSIC = 'classic', + VPC = 'vpc', + } + /** Defines what type of network is connected via this connection. */ + export enum NetworkType { + CLASSIC = 'classic', + DIRECTLINK = 'directlink', + GRE_TUNNEL = 'gre_tunnel', + UNBOUND_GRE_TUNNEL = 'unbound_gre_tunnel', + VPC = 'vpc', + POWER_VIRTUAL_SERVER = 'power_virtual_server', + REDUNDANT_GRE = 'redundant_gre', + VPN_GATEWAY = 'vpn_gateway', + DYNAMIC_ROUTE_SERVER = 'dynamic_route_server', + } + /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field does not apply to the `redundant_gre` network type. */ + export enum PrefixFiltersDefault { + PERMIT = 'permit', + DENY = 'deny', + } + /** Only visible for cross account connections, this field represents the status of a connection request between IBM Cloud accounts. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum RequestStatus { + PENDING = 'pending', + APPROVED = 'approved', + REJECTED = 'rejected', + EXPIRED = 'expired', + DETACHED = 'detached', + } + /** Connection's current configuration state. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum Status { + ATTACHED = 'attached', + FAILED = 'failed', + PENDING = 'pending', + NETWORK_PENDING = 'network_pending', + DELETING = 'deleting', + DETACHING = 'detaching', + DETACHED = 'detached', + SUSPENDING = 'suspending', + SUSPENDED = 'suspended', + } + } + } - /** A prefix filter for a Transit Gateway connection. */ + /** + * A prefix filter for a Transit Gateway connection. + */ export interface TransitGatewayConnectionPrefixFilter { /** Whether to permit or deny prefix filter. */ - action: string; + action: TransitGatewayConnectionPrefixFilter.Constants.Action | string; /** IP Prefix GE. */ ge?: number; /** IP Prefix LE. */ @@ -3395,11 +3566,22 @@ namespace TransitGatewayApisV1 { /** IP Prefix. */ prefix: string; } + export namespace TransitGatewayConnectionPrefixFilter { + export namespace Constants { + /** Whether to permit or deny prefix filter. */ + export enum Action { + PERMIT = 'permit', + DENY = 'deny', + } + } + } - /** A prefix filter reference object for a Transit Gateway connection. */ + /** + * A prefix filter reference object for a Transit Gateway connection. + */ export interface TransitGatewayConnectionPrefixFilterReference { /** Whether to permit or deny prefix filter. */ - action: string; + action: TransitGatewayConnectionPrefixFilterReference.Constants.Action | string; /** Identifier of prefix filter that handles the ordering and follow semantics: * - When a filter reference another filter in it's before field, then the filter making the reference is applied * before @@ -3432,8 +3614,19 @@ namespace TransitGatewayApisV1 { /** The date and time that this prefix filter was last updated. */ updated_at?: string; } + export namespace TransitGatewayConnectionPrefixFilterReference { + export namespace Constants { + /** Whether to permit or deny prefix filter. */ + export enum Action { + PERMIT = 'permit', + DENY = 'deny', + } + } + } - /** Transit gateway reference. */ + /** + * Transit gateway reference. + */ export interface TransitGatewayReference { /** gateway CRN. */ crn: string; @@ -3443,10 +3636,12 @@ namespace TransitGatewayApisV1 { name: string; } - /** Details for a redundant GRE tunnel. */ + /** + * Details for a redundant GRE tunnel. + */ export interface TransitGatewayTunnel { /** The type of network the redundant GRE tunnel is targeting. */ - base_network_type: string; + base_network_type: TransitGatewayTunnel.Constants.BaseNetworkType | string; /** The date and time that this GRE tunnel was created. */ created_at: string; /** The unique identifier for this redundant GRE tunnel. */ @@ -3483,20 +3678,44 @@ namespace TransitGatewayApisV1 { /** Tunnel's current configuration state. The list of enumerated values for this property may expand in the * future. Code and processes using this field must tolerate unexpected values. */ - status: string; + status: TransitGatewayTunnel.Constants.Status | string; /** The date and time that this tunnel was last updated. */ updated_at: string; /** Availability zone reference. */ zone: ZoneReference; } + export namespace TransitGatewayTunnel { + export namespace Constants { + /** The type of network the redundant GRE tunnel is targeting. */ + export enum BaseNetworkType { + CLASSIC = 'classic', + VPC = 'vpc', + } + /** Tunnel's current configuration state. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values. */ + export enum Status { + ATTACHED = 'attached', + FAILED = 'failed', + PENDING = 'pending', + DELETING = 'deleting', + DETACHING = 'detaching', + DETACHED = 'detached', + SUSPENDING = 'suspending', + SUSPENDED = 'suspended', + } + } + } - /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ + /** + * Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. + */ export interface TransitGatewayTunnelCollection { /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ tunnels: TransitGatewayTunnel[]; } - /** A create template with information for redundant GRE tunnel. */ + /** + * A create template with information for redundant GRE tunnel. + */ export interface TransitGatewayTunnelTemplate { /** Local gateway IP address. */ local_gateway_ip: string; @@ -3523,17 +3742,23 @@ namespace TransitGatewayApisV1 { zone: ZoneIdentity; } - /** ZoneIdentity. */ + /** + * ZoneIdentity. + */ export interface ZoneIdentity { } - /** Availability zone reference. */ + /** + * Availability zone reference. + */ export interface ZoneReference { /** Availability zone name. */ name: string; } - /** Availability zone. */ + /** + * Availability zone. + */ export interface ZoneIdentityByName extends ZoneIdentity { /** Availability zone name. */ name?: string; @@ -3548,6 +3773,7 @@ namespace TransitGatewayApisV1 { */ export class TransitGatewaysPager { protected _hasNext: boolean; + protected pageContext: any; protected client: TransitGatewayApisV1; @@ -3562,10 +3788,7 @@ namespace TransitGatewayApisV1 { * @constructor * @returns {TransitGatewaysPager} */ - constructor( - client: TransitGatewayApisV1, - params?: TransitGatewayApisV1.ListTransitGatewaysParams - ) { + constructor(client: TransitGatewayApisV1, params?: TransitGatewayApisV1.ListTransitGatewaysParams) { if (params && params.start) { throw new Error(`the params.start field should not be set`); } @@ -3599,9 +3822,9 @@ namespace TransitGatewayApisV1 { const response = await this.client.listTransitGateways(this.params); const { result } = response; - let next = null; + let next; if (result && result.next) { - next = result.next.start + next = result.next.start; } this.pageContext.next = next; if (!this.pageContext.next) { @@ -3629,6 +3852,7 @@ namespace TransitGatewayApisV1 { */ export class ConnectionsPager { protected _hasNext: boolean; + protected pageContext: any; protected client: TransitGatewayApisV1; @@ -3643,10 +3867,7 @@ namespace TransitGatewayApisV1 { * @constructor * @returns {ConnectionsPager} */ - constructor( - client: TransitGatewayApisV1, - params?: TransitGatewayApisV1.ListConnectionsParams - ) { + constructor(client: TransitGatewayApisV1, params?: TransitGatewayApisV1.ListConnectionsParams) { if (params && params.start) { throw new Error(`the params.start field should not be set`); } @@ -3680,9 +3901,9 @@ namespace TransitGatewayApisV1 { const response = await this.client.listConnections(this.params); const { result } = response; - let next = null; + let next; if (result && result.next) { - next = result.next.start + next = result.next.start; } this.pageContext.next = next; if (!this.pageContext.next) { @@ -3710,6 +3931,7 @@ namespace TransitGatewayApisV1 { */ export class TransitGatewayConnectionsPager { protected _hasNext: boolean; + protected pageContext: any; protected client: TransitGatewayApisV1; @@ -3724,10 +3946,7 @@ namespace TransitGatewayApisV1 { * @constructor * @returns {TransitGatewayConnectionsPager} */ - constructor( - client: TransitGatewayApisV1, - params: TransitGatewayApisV1.ListTransitGatewayConnectionsParams - ) { + constructor(client: TransitGatewayApisV1, params: TransitGatewayApisV1.ListTransitGatewayConnectionsParams) { if (params && params.start) { throw new Error(`the params.start field should not be set`); } @@ -3761,9 +3980,9 @@ namespace TransitGatewayApisV1 { const response = await this.client.listTransitGatewayConnections(this.params); const { result } = response; - let next = null; + let next; if (result && result.next) { - next = result.next.start + next = result.next.start; } this.pageContext.next = next; if (!this.pageContext.next) { From 17ae79b3d1788eaf43c4c9d76a64e5cf73c01d85 Mon Sep 17 00:00:00 2001 From: Joseph Kalandarishvili Date: Thu, 13 Aug 2026 15:04:07 -0500 Subject: [PATCH 3/6] feat: Added Redundant Global TGW related changes dependency: none Signed-off-by: Joseph Kalandarishvili --- transit-gateway-apis/v1.ts | 132 ++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 69 deletions(-) diff --git a/transit-gateway-apis/v1.ts b/transit-gateway-apis/v1.ts index f29c101..96c18c9 100644 --- a/transit-gateway-apis/v1.ts +++ b/transit-gateway-apis/v1.ts @@ -600,32 +600,30 @@ class TransitGatewayApisV1 extends BaseService { * @param {string} [params.baseNetworkType] - The type of network the Unbound GRE tunnel is targeting. This field is * required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, * the value is required and can be either VPC or Classic. This field is required to be unspecified for network type - * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` - * connections. - * @param {string} [params.cidr] - network_type `vpn_gateway` and `dynamic_route_server`connections use `cidr` to - * specify the CIDR to use for the VPN gateway / Dynamic route server GRE tunnels. + * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. + * @param {string} [params.cidr] - network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for + * the VPN gateway / Dynamic route server GRE tunnels. * - * This field is optional for network type `vpn_gateway` and `dynamic_route_server` connections. If unspecified, the - * default value is 198.19.174.0/23. + * This field is optional for network type `vpn_gateway` connections. If unspecified, the default value is + * 198.19.174.0/23. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, * `gre_tunnel`, `unbound_gre_tunnel`, and `redundant_gre` connections. * @param {string} [params.localGatewayIp] - Local gateway IP address. This field is required for network type * `gre_tunnel` and `unbound_gre_tunnel` connections. This field is required to be unspecified for network type - * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` - * connections. + * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. * @param {string} [params.localTunnelIp] - Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip * addresses must be in the same /30 network. Neither can be the network nor broadcast addresses. * * This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, - * `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `vpn_gateway` and `redundant_gre` connections. * @param {string} [params.name] - The user-defined name for this transit gateway connection. Network type `vpc` * connections are defaulted to the name of the VPC. Network type `classic` connections are named `classic`. * * This field is required for network type `power_virtual_server`, `directlink`, `gre_tunnel`, `unbound_gre_tunnel`, - * `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `vpn_gateway` and `redundant_gre` connections. * * This field is optional for network type `classic`, `vpc` connections. * @param {string} [params.networkAccountId] - The ID of the account which owns the network that is being connected. @@ -633,22 +631,22 @@ class TransitGatewayApisV1 extends BaseService { * `unbound_gre_tunnel` when the associated_network_type is `classic` or network_type is `redundant_gre` and the GRE * tunnel is in a different account than the gateway. * @param {string} [params.networkId] - The ID of the network being connected via this connection. For network types - * `vpc`, `vpn_gateway`, `dynamic_route_server`, `power_virtual_server` and `directlink` this is the CRN of the VPC / - * VPN / Dynamic Route Server / PowerVS / Direct Link gateway respectively. This field is required for network type - * `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `directlink` connections. It is also - * required for `redundant_gre` connections when the base_network_type is set to VPC. This field is required to be - * unspecified for network type `classic`, `gre_tunnel` and `unbound_gre_tunnel` connections. + * `vpc`, `vpn_gateway`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route + * Server / PowerVS / Direct Link gateway respectively. This field is required for network type `vpc`, + * `power_virtual_server`, `vpn_gateway` and `directlink` connections. It is also required for `redundant_gre` + * connections when the base_network_type is set to VPC. This field is required to be unspecified for network type + * `classic`, `gre_tunnel` and `unbound_gre_tunnel` connections. * @param {TransitGatewayConnectionPrefixFilter[]} [params.prefixFilters] - Array of prefix route filters for a * transit gateway connection. Prefix filters can be specified for netowrk type `vpc`, `classic`, * `power_virtual_server` and `directlink` connections. They are not allowed for type `gre_tunnel` connections. This * is order dependent with those first in the array being applied first, and those at the end of the array being * applied last, or just before applying the default. This field is optional for network type `classic`, `vpc`, * `directlink`, and `power_virtual_server` connections. This field is required to be unspecified for network type - * `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. * @param {string} [params.prefixFiltersDefault] - Default setting of permit or deny which applies to any routes that * don't match a specified filter. This field is optional for network type `classic`, `vpc`, `directlink`, and * `power_virtual_server` connections. This field is required to be unspecified for network type `gre_tunnel`, - * `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. * @param {number} [params.remoteBgpAsn] - Remote network BGP ASN. The following ASN values are reserved and * unavailable 0, 13884, 36351, 64512, 64513, 65100, 65200-65234, 65402-65433, 65500, 65516, 65519, 65521, 65531 and * 4201065000-4201065999. If `remote_bgp_asn` is omitted on gre_tunnel or unbound_gre_tunnel connection create @@ -657,18 +655,17 @@ class TransitGatewayApisV1 extends BaseService { * This field is optional for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, - * `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. + * `vpn_gateway` and `gre_tunnel` connections. * @param {string} [params.remoteGatewayIp] - Remote gateway IP address. This field is required for network type * `gre_tunnel` and `unbound_gre_tunnel` connections. This field is required to be unspecified for network type - * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` - * connections. + * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. * @param {string} [params.remoteTunnelIp] - Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip * addresses must be in the same /30 network. Neither can be the network nor broadcast addresses. * * This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, - * `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `vpn_gateway` and `redundant_gre` connections. * @param {TransitGatewayTunnelTemplate[]} [params.tunnels] - Array of GRE tunnels for a transit gateway * `redundant_gre` connections. This field is required for `redundant_gre` connections. * @param {ZoneIdentity} [params.zone] - Specify the connection's location. The specified availability zone must @@ -679,8 +676,8 @@ class TransitGatewayApisV1 extends BaseService { * * This field is optional for network type `vpn_gateway` connections. * - * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, - * `redundant_gre` and `dynamic_route_server` connections. + * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` + * and `redundant_gre` connections. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise>} */ @@ -2389,14 +2386,14 @@ namespace TransitGatewayApisV1 { /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type * `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required * and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, - * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. + * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ baseNetworkType?: CreateTransitGatewayConnectionConstants.BaseNetworkType | string; - /** network_type `vpn_gateway` and `dynamic_route_server`connections use `cidr` to specify the CIDR to use for - * the VPN gateway / Dynamic route server GRE tunnels. + /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the VPN gateway / Dynamic + * route server GRE tunnels. * - * This field is optional for network type `vpn_gateway` and `dynamic_route_server` connections. If unspecified, - * the default value is 198.19.174.0/23. + * This field is optional for network type `vpn_gateway` connections. If unspecified, the default value is + * 198.19.174.0/23. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, * `power_virtual_server`, `gre_tunnel`, `unbound_gre_tunnel`, and `redundant_gre` connections. @@ -2404,7 +2401,7 @@ namespace TransitGatewayApisV1 { cidr?: string; /** Local gateway IP address. This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` * connections. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. */ localGatewayIp?: string; /** Local tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 network. @@ -2413,14 +2410,14 @@ namespace TransitGatewayApisV1 { * This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. */ localTunnelIp?: string; /** The user-defined name for this transit gateway connection. Network type `vpc` connections are defaulted to * the name of the VPC. Network type `classic` connections are named `classic`. * * This field is required for network type `power_virtual_server`, `directlink`, `gre_tunnel`, - * `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. * * This field is optional for network type `classic`, `vpc` connections. */ @@ -2432,11 +2429,11 @@ namespace TransitGatewayApisV1 { */ networkAccountId?: string; /** The ID of the network being connected via this connection. For network types `vpc`, `vpn_gateway`, - * `dynamic_route_server`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route - * Server / PowerVS / Direct Link gateway respectively. This field is required for network type `vpc`, - * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `directlink` connections. It is also required - * for `redundant_gre` connections when the base_network_type is set to VPC. This field is required to be - * unspecified for network type `classic`, `gre_tunnel` and `unbound_gre_tunnel` connections. + * `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route Server / PowerVS / + * Direct Link gateway respectively. This field is required for network type `vpc`, `power_virtual_server`, + * `vpn_gateway` and `directlink` connections. It is also required for `redundant_gre` connections when the + * base_network_type is set to VPC. This field is required to be unspecified for network type `classic`, + * `gre_tunnel` and `unbound_gre_tunnel` connections. */ networkId?: string; /** Array of prefix route filters for a transit gateway connection. Prefix filters can be specified for netowrk @@ -2444,14 +2441,14 @@ namespace TransitGatewayApisV1 { * `gre_tunnel` connections. This is order dependent with those first in the array being applied first, and those * at the end of the array being applied last, or just before applying the default. This field is optional for * network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This field is required to - * be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and - * `redundant_gre` connections. + * be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` + * connections. */ prefixFilters?: TransitGatewayConnectionPrefixFilter[]; /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This * field is optional for network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This - * field is required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway`, - * `dynamic_route_server` and `redundant_gre` connections. + * field is required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and + * `redundant_gre` connections. */ prefixFiltersDefault?: CreateTransitGatewayConnectionConstants.PrefixFiltersDefault | string; /** Remote network BGP ASN. The following ASN values are reserved and unavailable 0, 13884, 36351, 64512, 64513, @@ -2462,12 +2459,12 @@ namespace TransitGatewayApisV1 { * This field is optional for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. + * `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ remoteBgpAsn?: number; /** Remote gateway IP address. This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` * connections. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. */ remoteGatewayIp?: string; /** Remote tunnel IP address. The local_tunnel_ip and remote_tunnel_ip addresses must be in the same /30 @@ -2476,7 +2473,7 @@ namespace TransitGatewayApisV1 { * This field is required for network type `gre_tunnel` and `unbound_gre_tunnel` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `power_virtual_server`, `vpn_gateway` and `redundant_gre` connections. */ remoteTunnelIp?: string; /** Array of GRE tunnels for a transit gateway `redundant_gre` connections. This field is required for @@ -2490,8 +2487,8 @@ namespace TransitGatewayApisV1 { * * This field is optional for network type `vpn_gateway` connections. * - * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, - * `power_virtual_server`, `redundant_gre` and `dynamic_route_server` connections. + * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` + * and `redundant_gre` connections. */ zone?: ZoneIdentity; } @@ -2508,14 +2505,13 @@ namespace TransitGatewayApisV1 { POWER_VIRTUAL_SERVER = 'power_virtual_server', REDUNDANT_GRE = 'redundant_gre', VPN_GATEWAY = 'vpn_gateway', - DYNAMIC_ROUTE_SERVER = 'dynamic_route_server', } - /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. */ + /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ export enum BaseNetworkType { CLASSIC = 'classic', VPC = 'vpc', } - /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field is optional for network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This field is required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. */ + /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field is optional for network type `classic`, `vpc`, `directlink`, and `power_virtual_server` connections. This field is required to be unspecified for network type `gre_tunnel`, `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. */ export enum PrefixFiltersDefault { PERMIT = 'permit', DENY = 'deny', @@ -3171,9 +3167,9 @@ namespace TransitGatewayApisV1 { /** The user-defined name for this transit gateway connection. */ name: string; /** The ID of the network being connected via this connection. This field is required for some types, such as - * `vpc`, `power_virtual_server`, `directlink`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre`. For - * network types `vpc`, `vpn_gateway`, `dynamic_route_server`, `power_virtual_server` and `directlink` this is the - * CRN of the VPC / VPN / Dynamic Route Server / PowerVS / Direct Link gateway respectively. + * `vpc`, `power_virtual_server`, `directlink`, `vpn_gateway` and `redundant_gre`. For network types `vpc`, + * `vpn_gateway`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route Server / + * PowerVS / Direct Link gateway respectively. */ network_id?: string; /** Defines what type of network is connected via this connection. The list of enumerated values for this @@ -3189,8 +3185,8 @@ namespace TransitGatewayApisV1 { * `gre_tunnel` connections. */ base_connection_id?: string; - /** network_type `vpn_gateway` and `dynamic_route_server` connections use `cidr` to specify the CIDR to use for - * the `VPN gateway / Dynamic route server` GRE tunnels. + /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the `VPN gateway / Dynamic + * route server` GRE tunnels. */ cidr?: string; /** The date and time that this connection was created. */ @@ -3247,7 +3243,7 @@ namespace TransitGatewayApisV1 { status: TransitConnection.Constants.Status | string; /** Transit gateway reference. */ transit_gateway: TransitGatewayReference; - /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ + /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ tunnels?: TransitGatewayTunnel[]; /** The date and time that this connection was last updated. */ updated_at: string; @@ -3271,7 +3267,6 @@ namespace TransitGatewayApisV1 { POWER_VIRTUAL_SERVER = 'power_virtual_server', REDUNDANT_GRE = 'redundant_gre', VPN_GATEWAY = 'vpn_gateway', - DYNAMIC_ROUTE_SERVER = 'dynamic_route_server', } /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field does not apply to the `redundant_gre` network types. */ export enum PrefixFiltersDefault { @@ -3418,11 +3413,11 @@ namespace TransitGatewayApisV1 { /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type * `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required * and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, - * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. + * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ base_network_type?: TransitGatewayConnectionCust.Constants.BaseNetworkType | string; - /** network_type `vpn_gateway` and `dynamic_route_server` connections use `cidr` to specify the CIDR to use for - * the `VPN gateway / Dynamic route server` GRE tunnels. + /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the `VPN gateway / Dynamic + * route server` GRE tunnels. */ cidr?: string; /** The date and time that this connection was created. */ @@ -3447,7 +3442,7 @@ namespace TransitGatewayApisV1 { * the name of the VPC. Network type `classic` connections are named `classic`. * * This field is required for network type `power_virtual_server`, `directlink`, `gre_tunnel`, - * `unbound_gre_tunnel`, `vpn_gateway`, `dynamic_route_server` and `redundant_gre` connections. + * `unbound_gre_tunnel`, `vpn_gateway` and `redundant_gre` connections. * * This field is optional for network type `classic`, `vpc` connections. */ @@ -3457,11 +3452,11 @@ namespace TransitGatewayApisV1 { */ network_account_id?: string; /** The ID of the network being connected via this connection. For network types `vpc`, `vpn_gateway`, - * `dynamic_route_server`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route - * Server / PowerVS / Direct Link gateway respectively. This field is required for network type `vpc`, - * `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `directlink` connections. It is also required - * for `redundant_gre` connections when the base_network_type is set to VPC. This field is required to be - * unspecified for network type `classic`, `gre_tunnel` and `unbound_gre_tunnel` connections. + * `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route Server / PowerVS / + * Direct Link gateway respectively. This field is required for network type `vpc`, `power_virtual_server`, + * `vpn_gateway` and `directlink` connections. It is also required for `redundant_gre` connections when the + * base_network_type is set to VPC. This field is required to be unspecified for network type `classic`, + * `gre_tunnel` and `unbound_gre_tunnel` connections. */ network_id?: string; /** Defines what type of network is connected via this connection. */ @@ -3496,7 +3491,7 @@ namespace TransitGatewayApisV1 { * future. Code and processes using this field must tolerate unexpected values. */ status: TransitGatewayConnectionCust.Constants.Status | string; - /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ + /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ tunnels?: TransitGatewayTunnel[]; /** The date and time that this connection was last updated. */ updated_at: string; @@ -3508,7 +3503,7 @@ namespace TransitGatewayApisV1 { } export namespace TransitGatewayConnectionCust { export namespace Constants { - /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway`, `dynamic_route_server` and `gre_tunnel` connections. */ + /** The type of network the Unbound GRE tunnel is targeting. This field is required for network type `unbound_gre_tunnel` and must be set to `classic`. For a `redundant_gre` network type, the value is required and can be either VPC or Classic. This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ export enum BaseNetworkType { CLASSIC = 'classic', VPC = 'vpc', @@ -3523,7 +3518,6 @@ namespace TransitGatewayApisV1 { POWER_VIRTUAL_SERVER = 'power_virtual_server', REDUNDANT_GRE = 'redundant_gre', VPN_GATEWAY = 'vpn_gateway', - DYNAMIC_ROUTE_SERVER = 'dynamic_route_server', } /** Default setting of permit or deny which applies to any routes that don't match a specified filter. This field does not apply to the `redundant_gre` network type. */ export enum PrefixFiltersDefault { @@ -3706,10 +3700,10 @@ namespace TransitGatewayApisV1 { } /** - * Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. + * Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ export interface TransitGatewayTunnelCollection { - /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` and `dynamic_route_server` connections. */ + /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ tunnels: TransitGatewayTunnel[]; } From 7e0446843cb216511893aae202eb12c594c7be4f Mon Sep 17 00:00:00 2001 From: Joseph Kalandarishvili Date: Thu, 13 Aug 2026 15:26:22 -0500 Subject: [PATCH 4/6] feat: Added Redundant Global TGW related changes dependency: none Signed-off-by: Joseph Kalandarishvili --- transit-gateway-apis/v1.ts | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/transit-gateway-apis/v1.ts b/transit-gateway-apis/v1.ts index 96c18c9..0f0b7fb 100644 --- a/transit-gateway-apis/v1.ts +++ b/transit-gateway-apis/v1.ts @@ -602,7 +602,7 @@ class TransitGatewayApisV1 extends BaseService { * the value is required and can be either VPC or Classic. This field is required to be unspecified for network type * `classic`, `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. * @param {string} [params.cidr] - network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for - * the VPN gateway / Dynamic route server GRE tunnels. + * the VPN gateway GRE tunnels. * * This field is optional for network type `vpn_gateway` connections. If unspecified, the default value is * 198.19.174.0/23. @@ -631,11 +631,11 @@ class TransitGatewayApisV1 extends BaseService { * `unbound_gre_tunnel` when the associated_network_type is `classic` or network_type is `redundant_gre` and the GRE * tunnel is in a different account than the gateway. * @param {string} [params.networkId] - The ID of the network being connected via this connection. For network types - * `vpc`, `vpn_gateway`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route - * Server / PowerVS / Direct Link gateway respectively. This field is required for network type `vpc`, - * `power_virtual_server`, `vpn_gateway` and `directlink` connections. It is also required for `redundant_gre` - * connections when the base_network_type is set to VPC. This field is required to be unspecified for network type - * `classic`, `gre_tunnel` and `unbound_gre_tunnel` connections. + * `vpc`, `vpn_gateway`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / PowerVS / Direct + * Link gateway respectively. This field is required for network type `vpc`, `power_virtual_server`, `vpn_gateway` and + * `directlink` connections. It is also required for `redundant_gre` connections when the base_network_type is set to + * VPC. This field is required to be unspecified for network type `classic`, `gre_tunnel` and `unbound_gre_tunnel` + * connections. * @param {TransitGatewayConnectionPrefixFilter[]} [params.prefixFilters] - Array of prefix route filters for a * transit gateway connection. Prefix filters can be specified for netowrk type `vpc`, `classic`, * `power_virtual_server` and `directlink` connections. They are not allowed for type `gre_tunnel` connections. This @@ -2389,8 +2389,8 @@ namespace TransitGatewayApisV1 { * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ baseNetworkType?: CreateTransitGatewayConnectionConstants.BaseNetworkType | string; - /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the VPN gateway / Dynamic - * route server GRE tunnels. + /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the VPN gateway GRE + * tunnels. * * This field is optional for network type `vpn_gateway` connections. If unspecified, the default value is * 198.19.174.0/23. @@ -2429,11 +2429,11 @@ namespace TransitGatewayApisV1 { */ networkAccountId?: string; /** The ID of the network being connected via this connection. For network types `vpc`, `vpn_gateway`, - * `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route Server / PowerVS / - * Direct Link gateway respectively. This field is required for network type `vpc`, `power_virtual_server`, - * `vpn_gateway` and `directlink` connections. It is also required for `redundant_gre` connections when the - * base_network_type is set to VPC. This field is required to be unspecified for network type `classic`, - * `gre_tunnel` and `unbound_gre_tunnel` connections. + * `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / PowerVS / Direct Link gateway + * respectively. This field is required for network type `vpc`, `power_virtual_server`, `vpn_gateway` and + * `directlink` connections. It is also required for `redundant_gre` connections when the base_network_type is set + * to VPC. This field is required to be unspecified for network type `classic`, `gre_tunnel` and + * `unbound_gre_tunnel` connections. */ networkId?: string; /** Array of prefix route filters for a transit gateway connection. Prefix filters can be specified for netowrk @@ -3168,8 +3168,8 @@ namespace TransitGatewayApisV1 { name: string; /** The ID of the network being connected via this connection. This field is required for some types, such as * `vpc`, `power_virtual_server`, `directlink`, `vpn_gateway` and `redundant_gre`. For network types `vpc`, - * `vpn_gateway`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route Server / - * PowerVS / Direct Link gateway respectively. + * `vpn_gateway`, `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / PowerVS / Direct Link + * gateway respectively. */ network_id?: string; /** Defines what type of network is connected via this connection. The list of enumerated values for this @@ -3185,8 +3185,8 @@ namespace TransitGatewayApisV1 { * `gre_tunnel` connections. */ base_connection_id?: string; - /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the `VPN gateway / Dynamic - * route server` GRE tunnels. + /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the `VPN gateway` GRE + * tunnels. */ cidr?: string; /** The date and time that this connection was created. */ @@ -3416,8 +3416,8 @@ namespace TransitGatewayApisV1 { * `directlink`, `vpc`, `power_virtual_server`, `vpn_gateway` and `gre_tunnel` connections. */ base_network_type?: TransitGatewayConnectionCust.Constants.BaseNetworkType | string; - /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the `VPN gateway / Dynamic - * route server` GRE tunnels. + /** network_type `vpn_gateway` connections use `cidr` to specify the CIDR to use for the `VPN gateway` GRE + * tunnels. */ cidr?: string; /** The date and time that this connection was created. */ @@ -3452,11 +3452,11 @@ namespace TransitGatewayApisV1 { */ network_account_id?: string; /** The ID of the network being connected via this connection. For network types `vpc`, `vpn_gateway`, - * `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / Dynamic Route Server / PowerVS / - * Direct Link gateway respectively. This field is required for network type `vpc`, `power_virtual_server`, - * `vpn_gateway` and `directlink` connections. It is also required for `redundant_gre` connections when the - * base_network_type is set to VPC. This field is required to be unspecified for network type `classic`, - * `gre_tunnel` and `unbound_gre_tunnel` connections. + * `power_virtual_server` and `directlink` this is the CRN of the VPC / VPN / PowerVS / Direct Link gateway + * respectively. This field is required for network type `vpc`, `power_virtual_server`, `vpn_gateway` and + * `directlink` connections. It is also required for `redundant_gre` connections when the base_network_type is set + * to VPC. This field is required to be unspecified for network type `classic`, `gre_tunnel` and + * `unbound_gre_tunnel` connections. */ network_id?: string; /** Defines what type of network is connected via this connection. */ From ed4fc3401d476bc4c5fc96d4155e41f755514e67 Mon Sep 17 00:00:00 2001 From: Joseph Kalandarishvili Date: Wed, 19 Aug 2026 12:42:23 -0500 Subject: [PATCH 5/6] feat: Added RG ID changes dependency: none Signed-off-by: Joseph Kalandarishvili --- test/unit/transit-gateway-apis.v1.test.js | 5 +++- transit-gateway-apis/v1.ts | 31 ++++++++++++++++------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/test/unit/transit-gateway-apis.v1.test.js b/test/unit/transit-gateway-apis.v1.test.js index 2342949..1df609f 100644 --- a/test/unit/transit-gateway-apis.v1.test.js +++ b/test/unit/transit-gateway-apis.v1.test.js @@ -281,6 +281,7 @@ describe('TransitGatewayApisV1', () => { const global = true; const greEnhancedRoutePropagation = true; const redundancyGroup = 'rg-1'; + const redundancyGroupId = 'bf3f5f91-1234-41c7-9e11-9cd99e65c1f4'; const resourceGroup = resourceGroupIdentityModel; const createTransitGatewayParams = { location, @@ -288,6 +289,7 @@ describe('TransitGatewayApisV1', () => { global, greEnhancedRoutePropagation, redundancyGroup, + redundancyGroupId, resourceGroup, }; @@ -310,6 +312,7 @@ describe('TransitGatewayApisV1', () => { expect(mockRequestOptions.body.global).toEqual(global); expect(mockRequestOptions.body.gre_enhanced_route_propagation).toEqual(greEnhancedRoutePropagation); expect(mockRequestOptions.body.redundancy_group).toEqual(redundancyGroup); + expect(mockRequestOptions.body.redundancy_group_id).toEqual(redundancyGroupId); expect(mockRequestOptions.body.resource_group).toEqual(resourceGroup); expect(mockRequestOptions.qs.version).toEqual(transitGatewayApisServiceOptions.version); } @@ -951,7 +954,7 @@ describe('TransitGatewayApisV1', () => { const localGatewayIp = '192.168.100.1'; const localTunnelIp = '192.168.129.2'; const name = 'Transit_Service_BWTN_SJ_DL'; - const networkAccountId = 'testString'; + const networkAccountId = '28e4d90ac7504be694471ee66e70d0d5'; const networkId = 'crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b'; const prefixFilters = [transitGatewayConnectionPrefixFilterModel]; const prefixFiltersDefault = 'permit'; diff --git a/transit-gateway-apis/v1.ts b/transit-gateway-apis/v1.ts index 0f0b7fb..de4d1b2 100644 --- a/transit-gateway-apis/v1.ts +++ b/transit-gateway-apis/v1.ts @@ -181,8 +181,9 @@ class TransitGatewayApisV1 extends BaseService { * Create a Transit Gateway based on the supplied input template. Required fields: `name` (string, 1–60 chars), * `location` (IBM Cloud region, e.g. us-south). Optional fields: `global` (boolean, enables cross-region routing), * `resource_group` (object with `id`), `redundancy_group` (string, name of the redundancy group to join), - * `gre_enhanced_route_propagation` (boolean). Returns a `TransitGateway` object. Initial `status` will be `pending` - * while provisioning. + * `redundancy_group_id` (string, ID of an existing redundancy group in the account), + * `gre_enhanced_route_propagation` (boolean). Either `redundancy_group` or `redundancy_group_id` can be provided, but + * not both. Returns a `TransitGateway` object. Initial `status` will be `pending` while provisioning. * * @param {Object} params - The parameters to send to the service. * @param {string} params.location - Location of Transit Gateway Services. @@ -195,7 +196,12 @@ class TransitGatewayApisV1 extends BaseService { * @param {string} [params.redundancyGroup] - Include the global transit gateway in this redundancy group. When set, * this transit gateway will be redundant to other transit gateways in this redundancy group. If this redundancy group * doesn't exist in the account, it will be created. This property can only be set for global transit gateways and the - * transit gateway cannot be in a location already used by a global transit gateway in this redundancy group. + * transit gateway cannot be in a location already used by a global transit gateway in this redundancy group. If + * specified, `redundancy_group_id` cannot also be specified. + * @param {string} [params.redundancyGroupId] - Include the transit gateway in an existing redundancy group in the + * account. This property can only be set for global transit gateways and the transit gateway cannot be in a location + * already used by a global transit gateway in this redundancy group. If specified, `redundancy_group` cannot also be + * specified. * @param {ResourceGroupIdentity} [params.resourceGroup] - The resource group to use. If unspecified, the account's * [default resource group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers @@ -206,7 +212,7 @@ class TransitGatewayApisV1 extends BaseService { ): Promise> { const _params = { ...params }; const _requiredParams = ['location', 'name']; - const _validParams = ['location', 'name', 'global', 'greEnhancedRoutePropagation', 'redundancyGroup', 'resourceGroup', 'signal', 'headers']; + const _validParams = ['location', 'name', 'global', 'greEnhancedRoutePropagation', 'redundancyGroup', 'redundancyGroupId', 'resourceGroup', 'signal', 'headers']; const _validationErrors = validateParams(_params, _requiredParams, _validParams); if (_validationErrors) { return Promise.reject(_validationErrors); @@ -218,6 +224,7 @@ class TransitGatewayApisV1 extends BaseService { 'global': _params.global, 'gre_enhanced_route_propagation': _params.greEnhancedRoutePropagation, 'redundancy_group': _params.redundancyGroup, + 'redundancy_group_id': _params.redundancyGroupId, 'resource_group': _params.resourceGroup, }; @@ -677,7 +684,7 @@ class TransitGatewayApisV1 extends BaseService { * This field is optional for network type `vpn_gateway` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` - * and `redundant_gre` connections. + * and `redundant_gre` connections. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise>} */ @@ -2300,9 +2307,15 @@ namespace TransitGatewayApisV1 { /** Include the global transit gateway in this redundancy group. When set, this transit gateway will be * redundant to other transit gateways in this redundancy group. If this redundancy group doesn't exist in the * account, it will be created. This property can only be set for global transit gateways and the transit gateway - * cannot be in a location already used by a global transit gateway in this redundancy group. + * cannot be in a location already used by a global transit gateway in this redundancy group. If specified, + * `redundancy_group_id` cannot also be specified. */ redundancyGroup?: string; + /** Include the transit gateway in an existing redundancy group in the account. This property can only be set + * for global transit gateways and the transit gateway cannot be in a location already used by a global transit + * gateway in this redundancy group. If specified, `redundancy_group` cannot also be specified. + */ + redundancyGroupId?: string; /** The resource group to use. If unspecified, the account's [default resource * group](https://console.bluemix.net/apidocs/resource-manager#introduction) is used. */ @@ -2488,7 +2501,7 @@ namespace TransitGatewayApisV1 { * This field is optional for network type `vpn_gateway` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` - * and `redundant_gre` connections. + * and `redundant_gre` connections. */ zone?: ZoneIdentity; } @@ -3243,7 +3256,7 @@ namespace TransitGatewayApisV1 { status: TransitConnection.Constants.Status | string; /** Transit gateway reference. */ transit_gateway: TransitGatewayReference; - /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ + /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` connections. */ tunnels?: TransitGatewayTunnel[]; /** The date and time that this connection was last updated. */ updated_at: string; @@ -3700,7 +3713,7 @@ namespace TransitGatewayApisV1 { } /** - * Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. + * Collection of all tunnels for `redundant_gre` and`vpn_gateway` connections. */ export interface TransitGatewayTunnelCollection { /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ From f826fb8ac4f940c49d5ca2819f67c40d7f30a0a2 Mon Sep 17 00:00:00 2001 From: Joseph Kalandarishvili Date: Wed, 19 Aug 2026 13:32:14 -0500 Subject: [PATCH 6/6] feat: Added RG ID changes dependency: none Signed-off-by: Joseph Kalandarishvili --- transit-gateway-apis/v1.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transit-gateway-apis/v1.ts b/transit-gateway-apis/v1.ts index de4d1b2..8838c7b 100644 --- a/transit-gateway-apis/v1.ts +++ b/transit-gateway-apis/v1.ts @@ -684,7 +684,7 @@ class TransitGatewayApisV1 extends BaseService { * This field is optional for network type `vpn_gateway` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` - * and `redundant_gre` connections. + * and `redundant_gre` connections. * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers * @returns {Promise>} */ @@ -2501,7 +2501,7 @@ namespace TransitGatewayApisV1 { * This field is optional for network type `vpn_gateway` connections. * * This field is required to be unspecified for network type `classic`, `directlink`, `vpc`, `power_virtual_server` - * and `redundant_gre` connections. + * and `redundant_gre` connections. */ zone?: ZoneIdentity; } @@ -3256,7 +3256,7 @@ namespace TransitGatewayApisV1 { status: TransitConnection.Constants.Status | string; /** Transit gateway reference. */ transit_gateway: TransitGatewayReference; - /** Collection of all tunnels for `redundant_gre`, `vpn_gateway` connections. */ + /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ tunnels?: TransitGatewayTunnel[]; /** The date and time that this connection was last updated. */ updated_at: string; @@ -3713,7 +3713,7 @@ namespace TransitGatewayApisV1 { } /** - * Collection of all tunnels for `redundant_gre` and`vpn_gateway` connections. + * Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */ export interface TransitGatewayTunnelCollection { /** Collection of all tunnels for `redundant_gre` and `vpn_gateway` connections. */