IBM Cloud API Docs

Introduction

The IBM Cloud® Direct Link API is a RESTful API that allows you to manage your Direct Link resources.

compile 'com.ibm.cloud:direct-link:X.X.X'

The code examples on this tab use the client library that is provided for Go.

Installation


go get -u github.com/IBM/networking-go-sdk
go get  -u github.com/IBM/go-sdk-core

The code examples on this tab use the client library that is provided for Java.

Maven


<dependency>
    <groupId>com.ibm.cloud</groupId>
    <artifactId>direct-link</artifactId>
    <version>X.X.X</version>
</dependency>

The code examples on this tab use the client library that is provided for Node.js.

Installation


npm install ibm-networking-services

The code examples on this tab use the client library that is provided for Python.

Installation


pip install --upgrade "ibm-cloud-networking-services>=X.X.X"

Authentication

The IBM Cloud Direct Link API uses Identity and Access Management (IAM) to authenticate requests. Pass a bearer token in an Authorization header.

You can retrieve an access token by first creating an API key, and then exchanging your API key for an IBM Cloud IAM token. For more information, see Retrieving an access token programmatically.

The SDK provides initialization methods for each form of authentication.

  • Use the API key to have the SDK manage the lifecycle of the access token. The SDK requests an access token, ensures that the access token is valid, and refreshes it if necessary.
  • Use the access token to manage the lifecycle yourself. You must periodically refresh the token.

For more information, see Authentication with the SDK.

IAM authentication. Replace {apikey} and {url} with your service credentials.


curl -u "apikey:{apikey}" -X {request_method} "{url}/{method}"

SDK managing the IAM token. Replace {apikey}, {version}, and {url}.


IamAuthenticator authenticator = new IamAuthenticator("{apikey}");
DirectLink directLink = new DirectLink("{version}", "{serviceName}",authenticator);

// Use only when need to change the endpoint.
// Default endpoint is directlink.cloud.ibm.com
directLink.setServiceUrl("{url}")

SDK managing the IAM token. Replace {apikey}, {version}, and {url}.


const DirectLinkV1 = require('ibm-networking-services/direct-link');
const { IamAuthenticator } = require('ibm-cloud-sdk-core');

const directLinkV1 = new DirectLinkV1({
  authenticator: new IamAuthenticator({
    apikey: '{apikey}',
  }),
  version: '{version}',
  // Default is directlink.cloud.ibm.com
  serviceUrl: '{url}',
});

SDK managing the IAM token. Replace {apikey} , {version}, and {url}.


from ibm_cloud_networking_services import DirectLinkV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

authenticator = IAMAuthenticator('{apikey}')
direct_link = DirectLinkV1(
    version='{version}',
    authenticator=authenticator
)

# Use only when need to change the endpoint.
# Default endpoint is directlink.cloud.ibm.com
direct_link.set_service_url('{url}')

SDK managing the IAM token. Replace {apikey}, {version}, and {url}.


import (
  "github.com/IBM/go-sdk-core/core"
  "github.com/IBM/networking-go-sdk/directlinkv1"
)

func main() {
  authenticator := &core.IamAuthenticator{
    ApiKey: "{apikey}",
    URL:    "{serviceURL}"
  }

  version := "{version}"
  options := &directlinkv1.DirectLinkV1Options{
    Version: &version,
    Authenticator: authenticator,
    // Default is directlink.cloud.ibm.com
    URL:    "{serviceURL}",
  }

  directLink, directLinkErr := directlinkv1.NewDirectLinkV1UsingExternalConfig(options)

  if directLinkErr != nil {
    panic(directLinkErr)
  }
}

Auditing

You can monitor API activity within your account by using the IBM Cloud Direct Link service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker. The specific event type is listed for each individual method.

For more information about how to track IBM Cloud Direct Link activity, see Auditing events for IBM Cloud Direct Link.


Authorization

Access management to Direct Link resources is done through Identity and Access Management (IAM). For more information, see Using IAM permissions with Direct Link.

API endpoint

https://directlink.cloud.ibm.com

Use Virtual Private Endpoint (VPE) for VPC to access Direct Link via https://private.directlink.cloud.ibm.com.


Error handling

The Direct Link API uses standard HTTP response codes to indicate whether a method completed successfully. A 2xx response indicates success. A 4xx type response indicates a failure, and a 5xx type response indicates an internal system error.

| HTTP Error Code | Description           | Recovery                                                                    |
|-----------------|-----------------------|-----------------------------------------------------------------------------|
| `200`           | Success               | The request was successful.                                                 |
| `400`           | Bad Request           | The input parameters in the request body are either incomplete, in the wrong format, or resources are in an incorrect state. See the specific error message for more details. |
| `401`           | Unauthorized          | You are not authorized to make this request. Log in to IBM Cloud and try again. If this error persists, contact the account owner to check your permissions. |
| `403`           | Forbidden             | The supplied authentication is not authorized to access the requested action.      |
| `404`           | Not Found             | The requested resource might not exist, or the supplied authentication is not authorized to access it. See the specific error message for resource details, verify that the specified resource exists, or contact the account owner to check your permissions to view it.                                  |
| `500`           | Internal Server Error | IBM Cloud API is currently unavailable. Your request might not be processed. Wait a few minutes and try again. If the problem persists, contact IBM Support. |

ErrorResponse

Name Description
code{: .parameter-name .required}
string
An identifier of the problem.
Possible values: [invalid_field,invalid_header,invalid_method,missing_field,server_error]
message{: .parameter-name .required}
string
An explanation of the problem with possible solutions.
more_info{: .parameter-name}
string
A URL for more information about the solution.
target{: .parameter-name}
object
Details about the property (type and name) that is the focus of the problem.

The Java SDK generates an exception for any unsuccessful method invocation. All methods that accept an argument can also throw an IllegalArgumentException.

Exception Description
IllegalArgumentException An invalid argument was passed to the method.

When the Java SDK receives an error response from the Direct Link service, it generates an exception from the com.ibm.cloud.sdk.core.service.exception package. All service exceptions contain the following fields.

Field Description
statusCode The HTTP response code that is returned.
message A message that describes the error.

When the Node SDK receives an error response from the Direct Link service, it creates an Error object with information that describes the error that occurred. This error object is passed as the first parameter to the callback function for the method. The contents of the error object are as shown in the following table.

Error

Field Description
code The HTTP response code that is returned.
message A message that describes the error.

The Python SDK generates an exception for any unsuccessful method invocation. When the Python SDK receives an error response from the Direct Link service, it generates an ApiException with the following fields.

Field Description
code The HTTP response code that is returned.
message A message that describes the error.
info A dictionary of additional information about the error.

The Go SDK generates an error for any unsuccessful service instantiation and method invocation. You can check for the error immediately. The contents of the error object are as shown in the following table.

Error

Field Description
code The HTTP response code that is returned.
message A message that describes the error.

Example error handling


try {
  // Invoke a Direct Link method
} catch (BadRequestException e) {
  // Handle Bad Request (400) exception
} catch (UnauthorizedException e) {
  // Handle Unauthorized (401) exception
} catch (ForbiddenException e) {
  // Handle Forbidden (403) exception
} catch (NotFoundException e) {
  // Handle Not Found (404) exception
} catch (RequestTooLargeException e) {
  // Handle Request Too Large (413) exception
} catch (InternalServerErrorException e) {
  // Handle Internal Server Error (500) exception
} catch (ServiceResponseException e) {
  // Base class for all exceptions caused by error responses from the service
  System.out.println("Service returned status code "
    + e.getStatusCode() + ": " + e.getMessage());
}

Example error handling


directLink.method(params)
  .catch(err => {
    console.log('error:', err);
  });

Example error handling


from ibm_cloud_sdk_core.api_exception import ApiException
try:
    # Invoke a Direct Link method
except ApiException as ex:
    print "Method failed with status code " + str(ex.code) + ": " + ex.message

Example error handling


import "github.com/IBM/networking-go-sdk/directlinkv1"

// Instantiate a service
directLink, directLinkErr := directlinkv1.NewDirectLinkV1(options)

// Check for errors
if directLinkErr != nil {
  panic(directLinkErr)
}

// Call a method
result, response, responseErr := directLink.methodName(&methodOptions)

// Check for errors
if responseErr != nil {
  panic(responseErr)
}

Versioning

All API requests require a major version in the path (/v1/) and a date-based version as a query parameter in the format version=YYYY-MM-DD.

For example: GET /v1/gateways?version=2020-06-02

Any date-based version from Direct Link GA, up to the current date, is supported. Start development of new applications with the current date as a fixed value. Do not dynamically use the current date as the version for a production application. Instead, use a fixed date-based version that was tested with your application.

Specify the version to use on API requests with the version parameter when you create the service instance. The service uses the API version for the date you specify, or the most recent version before that date. Don't default to the current date. Instead, specify a date that matches a version that is compatible with your app, and don't change it until your app is ready for a later version.


// Mention the correct date for version param
String version = "2020-07-27";

// Instantiate authenticator as mentioned in Authentication
DirectLink directLink = new DirectLink(version, "{serviceName}", "${authenticator}");


const DirectLinkV1 = require('ibm-networking-services/direct-link');

const directLinkV1 = new DirectLinkV1({
  // Instantiate authenticator as mentioned in Authentication
  authenticator: '${authenticator}',
  version: '2020-07-27',  // Mention the correct date for version param
});


from ibm_cloud_networking_services import DirectLinkV1

# Instantiate authenticatior as mentioned in Authentication
direct_link = DirectLinkV1(
    version="2020-07-27", # Mention the correct date for version param
    authenticator=authenticator
)


import (
  "github.com/IBM/networking-go-sdk/directlinkv1"
)

func main() {

  // Mention the correct date for version param
  version := "2020-07-27"

  //Instantiate authenticator as mentioned in Authentication
  options := &directlinkv1.DirectLinkV1Options{
    Version: version,
    Authenticator: authenticator,
  }

  directLink, directLinkErr := directlinkv1.NewDirectLinkV1UsingExternalConfig(options)
}

API changes

API improvements and fixes are documented in the API change log, along with guidance on code updates that are required to use a new date-based version. By design, new features with backward-incompatible changes apply only to version dates on and after the feature's release. Changes that apply to older versions of the API are designed to maintain compatibility with existing applications and code.

Best practices

To minimize regressions from changes, the following best practices are recommended when you call the API:

  • Log any 4xx or 5xx HTTP status code along with the included trace property.
  • Follow HTTP redirect rules for any 3xx HTTP status code.
  • Consume only the resources and properties that are needed for your application to function.
  • Avoid depending on any behavior that is not explicitly documented.

Methods

List gateways

List all Direct Link gateways in this account. Gateways in other accounts with connections to networks in this account are also returned.

List all Direct Link gateways in this account. Gateways in other accounts with connections to networks in this account are also returned.

List all Direct Link gateways in this account. Gateways in other accounts with connections to networks in this account are also returned.

List all Direct Link gateways in this account. Gateways in other accounts with connections to networks in this account are also returned.

List all Direct Link gateways in this account. Gateways in other accounts with connections to networks in this account are also returned.

GET /gateways
ServiceCall<GatewayCollection> listGateways(ListGatewaysOptions listGatewaysOptions)
listGateways(params)
list_gateways(
        self,
        **kwargs,
    ) -> DetailedResponse
(directLink *DirectLinkV1) ListGateways(listGatewaysOptions *ListGatewaysOptions) (result *GatewayCollection, response *core.DetailedResponse, err error)
(directLink *DirectLinkV1) ListGatewaysWithContext(ctx context.Context, listGatewaysOptions *ListGatewaysOptions) (result *GatewayCollection, response *core.DetailedResponse, err error)

Auditing

Calling this method generates the following auditing events, depending on any listed conditions.

  • directlink.gateway.list

  • Dedicated and Connect gateways were listed.

Request

Use the ListGatewaysOptions.Builder to create a ListGatewaysOptions object that contains the parameter values for the listGateways method.

Instantiate the ListGatewaysOptions struct and set the fields to provide parameter values for the ListGateways method.

Query Parameters

  • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

    Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

parameters

    parameters

      WithContext method only

      • curl -X GET   https://$DL_ENDPOINT/v1/gateways?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
      • let res;
        try {
          res = await directLinkService.listGateways({});
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • ListGatewaysOptions listGatewaysOptions = new ListGatewaysOptions();
        
        Response<GatewayCollection> response = directLinkService.listGateways(listGatewaysOptions).execute();
        GatewayCollection gatewayCollection = response.getResult();
        
        System.out.println(gatewayCollection);
      • package main
        
        import (
          "fmt"
          "github.com/IBM/go-sdk-core/v4/core"
          "github.com/IBM/networking-go-sdk/directlinkv1"
          "os"
        )
        
        func main() {
          // For creating {directLink} refer Authentication
        
          listGatewaysOptions := directLink.NewListGatewaysOptions()
          result, response, responseErr := directLink.ListGateways(listGatewaysOptions)
          if responseErr != nil {
            panic(responseErr)
          }
          res, _ := json.MarshalIndent(result, "", "  ")
          fmt.Println(string(res))
        }
      • response = direct_link_service.list_gateways()
        gateway_collection = response.get_result()
        
        print(json.dumps(gateway_collection, indent=2))

      Response

      List of gateways

      List of gateways.

      List of gateways.

      List of gateways.

      List of gateways.

      Status Code

      • Successfully retrieved the list of gateways.

      Example responses
      • {
          "gateways": [
            {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          ]
        }
      • {
          "gateways": [
            {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          ]
        }

      Create gateway

      Creates a Direct Link gateway based on the supplied template.

      Creates a Direct Link gateway based on the supplied template.

      Creates a Direct Link gateway based on the supplied template.

      Creates a Direct Link gateway based on the supplied template.

      Creates a Direct Link gateway based on the supplied template.

      POST /gateways
      ServiceCall<Gateway> createGateway(CreateGatewayOptions createGatewayOptions)
      createGateway(params)
      create_gateway(
              self,
              gateway_template: 'GatewayTemplate',
              **kwargs,
          ) -> DetailedResponse
      (directLink *DirectLinkV1) CreateGateway(createGatewayOptions *CreateGatewayOptions) (result *Gateway, response *core.DetailedResponse, err error)
      (directLink *DirectLinkV1) CreateGatewayWithContext(ctx context.Context, createGatewayOptions *CreateGatewayOptions) (result *Gateway, response *core.DetailedResponse, err error)

      Auditing

      Calling this method generates the following auditing events, depending on any listed conditions.

      Depending on the type of offering_type of the gateway, one of the following events is generated.

      • directlink.dedicated.gateway.create

        A Dedicated gateway was created.

      • directlink.connect.gateway.create

        A Connect gateway was created.

      Request

      Use the CreateGatewayOptions.Builder to create a CreateGatewayOptions object that contains the parameter values for the createGateway method.

      Instantiate the CreateGatewayOptions struct and set the fields to provide parameter values for the CreateGateway method.

      Query Parameters

      • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

        Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

      The Direct Link Gateway template

      The createGateway options.

      parameters

      • Gateway fields specific to type=dedicated gateway create.

        parameters

        • Gateway fields specific to type=dedicated gateway create.

          WithContext method only

          The CreateGateway options.

          • curl -X POST   https://$DL_ENDPOINT/v1/gateways?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"   -d '{
                    "bgp_asn": 1000,
                    "bgp_base_cidr": "10.254.30.76/30",
                    "global": true,
                    "location_name": "dal03",
                    "name": "example-gateway",
                    "speed_mbps": 1000,
                    "connection_mode": "transit",
                    "type": "dedicated",
                    "cross_connect_router": "xcr03.dal03",
                    "metered": true,
                    "carrier_name": "my carrier",
                    "customer_name": "my customer"
                  }'
          • // Request models needed by this operation.
            
            // GatewayTemplateGatewayTypeDedicatedTemplate
            const gatewayTemplateModel = {
              bgp_asn: 64999,
              global: true,
              metered: false,
              name: 'myGateway',
              speed_mbps: 1000,
              type: 'dedicated',
              carrier_name: 'myCarrierName',
              cross_connect_router: 'xcr01.dal03',
              customer_name: 'newCustomerName',
              location_name: 'dal03',
            };
            
            const params = {
              gatewayTemplate: gatewayTemplateModel,
            };
            
            let res;
            try {
              res = await directLinkService.createGateway(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GatewayTemplateGatewayTypeDedicatedTemplate gatewayTemplateModel = new GatewayTemplateGatewayTypeDedicatedTemplate.Builder()
              .bgpAsn(Long.valueOf("64999"))
              .global(true)
              .metered(false)
              .name("myGateway")
              .speedMbps(Long.valueOf("1000"))
              .type("dedicated")
              .carrierName("myCarrierName")
              .crossConnectRouter("xcr01.dal03")
              .customerName("newCustomerName")
              .locationName("dal03")
              .build();
            CreateGatewayOptions createGatewayOptions = new CreateGatewayOptions.Builder()
              .gatewayTemplate(gatewayTemplateModel)
              .build();
            
            Response<Gateway> response = directLinkService.createGateway(createGatewayOptions).execute();
            Gateway gateway = response.getResult();
            
            System.out.println(gateway);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
            
              gatewayName := "gateway-name"
              bgpAsn := int64(64999)
              bgpBaseCidr := "169.254.0.0/16"
              crossConnectRouter := "LAB-xcr01.dal09"
              global := true
              locationName := "dal09"
              speedMbps := int64(1000)
              metered := false
              carrierName := "carrier1"
              customerName := "customer1"
              gatewayType := directlinkv1.GatewayTemplateGatewayTypeDedicatedTemplate_Type_Dedicated
            
              // For creating {directLink} refer Authentication
              gateway, _ := directLink.NewGatewayTemplateGatewayTypeDedicatedTemplate(bgpAsn, global, metered, gatewayName, speedMbps, gatewayType, carrierName, crossConnectRouter, customerName, locationName)
              createGatewayOptions := directLink.NewCreateGatewayOptions(gateway)
              result, response, responseErr := directLink.CreateGateway(createGatewayOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
            
              gatewayName := "gateway-name"
              bgpAsn := int64(64999)
              bgpBaseCidr := "169.254.0.0/16"
              global := true
              speedMbps := int64(1000)
              metered := false
              gatewayType := directlinkv1.GatewayTemplateGatewayTypeDedicatedTemplate_Type_Connect
              portIdentity, _ := directLink.NewGatewayPortIdentity(${portId})
              // For creating {directLink} refer Authentication
              gateway, _ := directLink.NewGatewayTemplateGatewayTypeConnectTemplate(bgpAsn, bgpBaseCidr, global, metered, gatewayName, speedMbps, gatewayType, portIdentity)
              createGatewayOptions := directLink.NewCreateGatewayOptions(gateway)
              result, response, responseErr := directLink.CreateGateway(createGatewayOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
            
              gatewayName := "gateway-name"
              bgpAsn := int64(64999)
              bgpBaseCidr := "169.254.0.0/16"
              crossConnectRouter := "LAB-xcr01.dal09"
              global := true
              locationName := "dal09"
              speedMbps := int64(1000)
              metered := false
              carrierName := "carrier1"
              customerName := "customer1"
              gatewayType := directlinkv1.GatewayTemplateGatewayTypeDedicatedTemplate_Type_Dedicated
            
              macsecWindowSize := int64(64)
              macsecCak := ${CRN_FOR_CAK}
            
              // For creating {directLink} refer Authentication
              gatewayMacsecCak := new(directlinkv1.GatewayMacsecConfigTemplatePrimaryCak)
              gatewayMacsecCak.Crn = core.StringPtr(macsecCak)
            
              // Construct an instance of the GatewayMacsecConfigTemplate model
              gatewayMacsecConfigTemplate := new(directlinkv1.GatewayMacsecConfigTemplate)
              gatewayMacsecConfigTemplate.Active = core.BoolPtr(true)
              gatewayMacsecConfigTemplate.PrimaryCak = gatewayMacsecCak
              gatewayMacsecConfigTemplate.WindowSize = core.Int64Ptr(macsecWindowSize)
            
              gateway, _ := directLink.NewGatewayTemplateGatewayTypeDedicatedTemplate(bgpAsn, global, metered, gatewayName, speedMbps, gatewayType, carrierName, crossConnectRouter, customerName, locationName)
              gateway.MacsecConfig = gatewayMacsecConfigTemplate
              createGatewayOptions := directLink.NewCreateGatewayOptions(gateway)
              result, response, responseErr := directLink.CreateGateway(createGatewayOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • gateway_template_model = {
              'bgp_asn': 64999,
              'global': True,
              'metered': False,
              'name': 'myGateway',
              'speed_mbps': 1000,
              'type': 'dedicated',
              'carrier_name': 'myCarrierName',
              'cross_connect_router': 'xcr01.dal03',
              'customer_name': 'newCustomerName',
              'location_name': 'dal03',
            }
            
            response = direct_link_service.create_gateway(
              gateway_template=gateway_template_model,
            )
            gateway = response.get_result()
            
            print(json.dumps(gateway, indent=2))

          Response

          gateway

          gateway.

          gateway.

          gateway.

          gateway.

          Status Code

          • The Direct Link gateway was created successfully.

          • An invalid Direct Link template was provided.

          Example responses
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          • {
              "errors": [
                {
                  "code": "validation_required_field_missing",
                  "message": "Mandatory field is missing.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "validation_required_field_missing",
                  "message": "Mandatory field is missing.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Delete gateway

          Delete a Direct Link gateway.

          Delete a Direct Link gateway.

          Delete a Direct Link gateway.

          Delete a Direct Link gateway.

          Delete a Direct Link gateway.

          DELETE /gateways/{id}
          ServiceCall<Void> deleteGateway(DeleteGatewayOptions deleteGatewayOptions)
          deleteGateway(params)
          delete_gateway(
                  self,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) DeleteGateway(deleteGatewayOptions *DeleteGatewayOptions) (response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) DeleteGatewayWithContext(ctx context.Context, deleteGatewayOptions *DeleteGatewayOptions) (response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing events, depending on any listed conditions.

          Depending on the type of offering_type of the gateway, one of the following events is generated.

          • directlink.dedicated.gateway.delete

            A Dedicated gateway was deleted.

          • directlink.connect.gateway.delete

            A Connect gateway was deleted.

          Request

          Use the DeleteGatewayOptions.Builder to create a DeleteGatewayOptions object that contains the parameter values for the deleteGateway method.

          Instantiate the DeleteGatewayOptions struct and set the fields to provide parameter values for the DeleteGateway method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The deleteGateway options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The DeleteGateway options.

          • curl -X DELETE   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            try {
              await directLinkService.deleteGateway(params);
            } catch (err) {
              console.warn(err);
            }
          • DeleteGatewayOptions deleteGatewayOptions = new DeleteGatewayOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<Void> response = directLinkService.deleteGateway(deleteGatewayOptions).execute();
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              deteleGatewayOptions := directLink.NewDeleteGatewayOptions(${gatewayID})
              result, responseErr := directLink.DeleteGateway(deteleGatewayOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.delete_gateway(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )

          Response

          Status Code

          • The Direct Link gateway was deleted successfully.

          • The gateway could not be deleted as there are virtual connections associated with it. Delete all virtual connections associated with this gateway and retry.

          • A Direct Link gateway with the specified identifier could not be found.

          Example responses
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The gateway could not be deleted as there are virtual connections associated with it. Delete all virtual connections associated with this gateway and retry.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The gateway could not be deleted as there are virtual connections associated with it. Delete all virtual connections associated with this gateway and retry.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Get gateway

          Retrieve a Direct Link gateway.

          Retrieve a Direct Link gateway.

          Retrieve a Direct Link gateway.

          Retrieve a Direct Link gateway.

          Retrieve a Direct Link gateway.

          GET /gateways/{id}
          ServiceCall<GetGatewayResponse> getGateway(GetGatewayOptions getGatewayOptions)
          getGateway(params)
          get_gateway(
                  self,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) GetGateway(getGatewayOptions *GetGatewayOptions) (result *Gateway, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetGatewayWithContext(ctx context.Context, getGatewayOptions *GetGatewayOptions) (result *Gateway, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing events, depending on any listed conditions.

          Depending on the type of offering_type of the gateway, one of the following events is generated.

          • directlink.dedicated.gateway.read

            A Dedicated gateway was retrieved.

          • directlink.connect.gateway.read

            A Connect gateway was retrieved.

          Request

          Use the GetGatewayOptions.Builder to create a GetGatewayOptions object that contains the parameter values for the getGateway method.

          Instantiate the GetGatewayOptions struct and set the fields to provide parameter values for the GetGateway method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The getGateway options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The GetGateway options.

          • curl -X GET   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.getGateway(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GetGatewayOptions getGatewayOptions = new GetGatewayOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<GetGatewayResponse> response = directLinkService.getGateway(getGatewayOptions).execute();
            GetGatewayResponse getGatewayResponse = response.getResult();
            
            System.out.println(getGatewayResponse);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              getGatewayOptions := directLink.NewGetGatewayOptions(${gatewayID})
              result, response, responseErr := directLink.GetGateway(getGatewayOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.get_gateway(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            get_gateway_response = response.get_result()
            
            print(json.dumps(get_gateway_response, indent=2))

          Response

          gateway

          gateway.

          gateway.

          gateway.

          gateway.

          Status Code

          • The Direct Link gateway was retrieved successfully.

          • A Direct Link gateway with the specified identifier could not be found.

          Example responses
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Update gateway

          Update a Direct Link gateway.

          Update a Direct Link gateway.

          Update a Direct Link gateway.

          Update a Direct Link gateway.

          Update a Direct Link gateway.

          PATCH /gateways/{id}
          ServiceCall<Gateway> updateGateway(UpdateGatewayOptions updateGatewayOptions)
          updateGateway(params)
          update_gateway(
                  self,
                  id: str,
                  gateway_patch_template: 'GatewayPatchTemplate',
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) UpdateGateway(updateGatewayOptions *UpdateGatewayOptions) (result *Gateway, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) UpdateGatewayWithContext(ctx context.Context, updateGatewayOptions *UpdateGatewayOptions) (result *Gateway, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing events, depending on any listed conditions.

          Depending on the type of offering_type of the gateway, one of the following events is generated.

          • directlink.dedicated.gateway.update

            A Dedicated gateway was updated.

          • directlink.connect.gateway.update

            A Connect gateway was updated.

          Request

          Use the UpdateGatewayOptions.Builder to create a UpdateGatewayOptions object that contains the parameter values for the updateGateway method.

          Instantiate the UpdateGatewayOptions struct and set the fields to provide parameter values for the UpdateGateway method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The Direct Link gateway patch

          The updateGateway options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The identity of the standard key to use for BGP MD5 authentication key. The key material that you provide must be base64 encoded and original string must be maximum 126 ASCII characters in length. To clear the optional authentication_key field patch its crn to "".

          • BFD configuration information.

          • The autonomous system number (ASN) of Border Gateway Protocol (BGP) configuration for the IBM side of the DL gateway.

            Examples:
          • BGP customer edge router CIDR is the new CIDR (Classless Inter-Domain Routing) value to be updated on customer edge router for the DL gateway.

            Customer edge IP and IBM IP should be in the same network. Updating customer edge router CIDR should be accompanied with IBM CIDR in the request. Update customer edge router IP to a valid bgp_cer_cidr and bgp_ibm_cidr CIDR, the value must reside in one of "10.254.0.0/16", "172.16.0.0/12", "192.168.0.0/16", "169.254.0.0/16" or an owned public CIDR. bgp_cer_cidr and bgp_ibm_cidr must have matching network and subnet mask values.

            Examples:
          • BGP IBM CIDR is the new CIDR (Classless Inter-Domain Routing) value to be updated on IBM edge router for the DL gateway.

            IBM IP and customer edge IP should be in the same network. Updating IBM CIDR should be accompanied with customer edge router CIDR in the request. Update IBM CIDR to a valid bgp_cer_cidr and bgp_ibm_cidr CIDR, the value must reside in one of "10.254.0.0/16", "172.16.0.0/12", "192.168.0.0/16", "169.254.0.0/16" or an owned public CIDR. bgp_cer_cidr and bgp_ibm_cidr must have matching network and subnet mask values.

            Examples:
          • Type of services this Gateway is attached to. Mode transit means this Gateway will be attached to Transit Gateway Service and direct means this Gateway will be attached to vpc or classic connection. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values.

            Allowable values: [direct,transit]

            Examples:
          • The default directional route filter action that applies to routes that do not match any directional route filters.

            Allowable values: [permit,deny]

            Examples:
          • The default directional route filter action that applies to routes that do not match any directional route filters.

            Allowable values: [permit,deny]

            Examples:
          • Gateways with global routing (true) can connect to networks outside of their associated region.

            Examples:
          • Use this field during LOA rejection to provide the reason for the rejection.

            Only allowed for type=dedicated gateways.

            Examples:
          • MACsec configuration information. When patching any macsec_config fields, no other fields may be specified in the patch request. Contact IBM support for access to MACsec.

            A MACsec config cannot be added to a gateway created without MACsec.

          • Metered billing option. When true gateway usage is billed per gigabyte. When false there is no per gigabyte usage charge, instead a flat rate is charged for the gateway.

            Examples:
          • The unique user-defined name for this gateway.

            Possible values: 1 ≤ length ≤ 63, Value must match regular expression /^([a-zA-Z]|[a-zA-Z][-_a-zA-Z0-9]*[a-zA-Z0-9])$/

            Examples:
          • Gateway operational status.

            For gateways pending LOA approval, patch operational_status to the appropriate value to approve or reject its LOA. When rejecting an LOA, provide reject reasoning in loa_reject_reason.

            Only allowed for type=dedicated gateways.

            Allowable values: [loa_accepted,loa_rejected]

            Examples:
          • Gateway patch panel complete notification from implementation team.

            Examples:
          • Gateway speed in megabits per second.

            Examples:
          • The VLAN to configure for this gateway.

            Specify null to remove an existing VLAN configuration.

            The gateway must have a type of dedicated.

            Possible values: 2 ≤ value ≤ 3967

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • patch gateway template.

          WithContext method only

          The UpdateGateway options.

          • curl -X PATCH   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
              -d '{
                    "name": "new_gateway_name"
                  }'
          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.updateGateway(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GatewayPatchTemplate gatewayPatchTemplateModel = new GatewayPatchTemplate.Builder()
              .build();
            Map<String, Object> gatewayPatchTemplateModelAsPatch = gatewayPatchTemplateModel.asPatch();
            UpdateGatewayOptions updateGatewayOptions = new UpdateGatewayOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .gatewayPatchTemplatePatch(gatewayPatchTemplateModelAsPatch)
              .build();
            
            Response<Gateway> response = directLinkService.updateGateway(updateGatewayOptions).execute();
            Gateway gateway = response.getResult();
            
            System.out.println(gateway);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              patchGatewayOptions := directLink.NewUpdateGatewayOptions(${gatewayID})
              result, response, responseErr := directLink.UpdateGateway(patchGatewayOptions.SetName(${updatedGatewayName}))
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              // Construct an instance of the GatewayMacsecConfigPatchTemplateFallbackCak model
              gatewayMacsecCak := new(directlinkv1.GatewayMacsecConfigPatchTemplateFallbackCak)
              gatewayMacsecCak.Crn = core.StringPtr(macsecCak)
            
              // Construct an instance of the GatewayMacsecConfigTemplate model
              gatewayMacsecConfigPatchTemplate := new(directlinkv1.GatewayMacsecConfigPatchTemplate)
              gatewayMacsecConfigPatchTemplate.FallbackCak = gatewayMacsecCak
            
              patchGatewayOptions := directLink.NewUpdateGatewayOptions(${gatewayID})
              result, response, responseErr := directLink.UpdateGateway(patchGatewayOptions.SetMacsecConfig(gatewayMacsecConfigPatchTemplate))
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • gateway_patch_template_model = {
            }
            
            response = direct_link_service.update_gateway(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              gateway_patch_template=gateway_patch_template_model,
            )
            gateway = response.get_result()
            
            print(json.dumps(gateway, indent=2))

          Response

          gateway

          gateway.

          gateway.

          gateway.

          gateway.

          Status Code

          • The Direct Link gateway was updated successfully.

          • The request was invalid.

          • A Direct Link gateway with the specified identifier could not be found.

          Example responses
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          • {
              "errors": [
                {
                  "code": "validation_invalid_argument",
                  "message": "Invalid Request",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "validation_invalid_argument",
                  "message": "Invalid Request",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Approve or reject change requests

          Approve or reject a gateway's current oustanding change request.

          This API is only used for provider created Direct Link Connect gateways to approve or reject specific changes initiated from a provider portal.

          Approve or reject a gateway's current oustanding change request.

          This API is only used for provider created Direct Link Connect gateways to approve or reject specific changes initiated from a provider portal.

          Approve or reject a gateway's current oustanding change request.

          This API is only used for provider created Direct Link Connect gateways to approve or reject specific changes initiated from a provider portal.

          Approve or reject a gateway's current oustanding change request.

          This API is only used for provider created Direct Link Connect gateways to approve or reject specific changes initiated from a provider portal.

          Approve or reject a gateway's current oustanding change request.

          This API is only used for provider created Direct Link Connect gateways to approve or reject specific changes initiated from a provider portal.

          POST /gateways/{id}/actions
          ServiceCall<Gateway> createGatewayAction(CreateGatewayActionOptions createGatewayActionOptions)
          createGatewayAction(params)
          create_gateway_action(
                  self,
                  id: str,
                  *,
                  action: str = None,
                  as_prepends: List['AsPrependTemplate'] = None,
                  authentication_key: 'GatewayActionTemplateAuthenticationKey' = None,
                  bfd_config: 'GatewayBfdConfigActionTemplate' = None,
                  connection_mode: str = None,
                  default_export_route_filter: str = None,
                  default_import_route_filter: str = None,
                  export_route_filters: List['GatewayTemplateRouteFilter'] = None,
                  global_: bool = None,
                  import_route_filters: List['GatewayTemplateRouteFilter'] = None,
                  metered: bool = None,
                  resource_group: 'ResourceGroupIdentity' = None,
                  updates: List['GatewayActionTemplateUpdatesItem'] = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) CreateGatewayAction(createGatewayActionOptions *CreateGatewayActionOptions) (result *Gateway, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) CreateGatewayActionWithContext(ctx context.Context, createGatewayActionOptions *CreateGatewayActionOptions) (result *Gateway, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing event, depending on any listed conditions.

          • directlink.connect.gateway.action

            A Connect gateway action was applied.

          Request

          Use the CreateGatewayActionOptions.Builder to create a CreateGatewayActionOptions object that contains the parameter values for the createGatewayAction method.

          Instantiate the CreateGatewayActionOptions struct and set the fields to provide parameter values for the CreateGatewayAction method.

          Path Parameters

          • Direct Link Connect gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          Approve or reject a pending change request. Only used for provider created gateways to approve or reject changes initiated from a providers portal.

          The createGatewayAction options.

          parameters

          • Direct Link Connect gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Action request.

            Allowable values: [create_gateway_approve,create_gateway_reject,delete_gateway_approve,delete_gateway_reject,update_attributes_approve,update_attributes_reject]

          • Applicable for create_gateway_approve requests to create AS Prepends. Contains an array of AS Prepend configuration information.

            Possible values: number of items ≤ 50

          • Applicable for create_gateway_approve requests to select the gateway's BGP MD5 authentication key. The key material that you provide must be base64 encoded and original string must be maximum 126 ASCII characters in length. To clear the optional authentication_key field patch its crn to "".

          • Applicable for create_gateway_approve requests to select the gateway's BFD configuration information.

          • Applicable for create_gateway_approve requests to select the type of services this gateway is attached to. Mode transit indicates this gateway will be attached to Transit Gateway Service and direct means this gateway will be attached to vpc or classic connection. If unspecified on create_gateway_approve, default value direct is used. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values.

            Allowable values: [direct,transit]

            Default: direct

            Examples:
          • The default directional route filter action that applies to routes that do not match any directional route filters.

            Allowable values: [permit,deny]

            Default: permit

            Examples:
          • The default directional route filter action that applies to routes that do not match any directional route filters.

            Allowable values: [permit,deny]

            Default: permit

            Examples:
          • Array of directional route filters for a Direct Link gateway. When creating a gateway or replacing existing route filters, the order of the items in the array will set the ordering of the list of route filters.

            Possible values: 0 ≤ number of items ≤ 100

          • Applicable for create_gateway_approve requests to select the gateway's routing option. Gateways with global routing (true) can connect to networks outside of their associated region.

            Examples:
          • Array of directional route filters for a Direct Link gateway. When creating a gateway or replacing existing route filters, the order of the items in the array will set the ordering of the list of route filters.

            Possible values: 0 ≤ number of items ≤ 100

          • Applicable for create_gateway_approve requests to select the gateway's metered billing option. When true gateway usage is billed per gigabyte. When false there is no per gigabyte usage charge, instead a flat rate is charged for the gateway.

            Examples:
          • Resource group for this resource. If unspecified, the account's default resource group is used.

          • Specify attribute updates being approved or rejected, update_attributes_approve and update_attributes_reject actions must provide an updates field that matches the gateway's current pending changes.

          parameters

          • Direct Link Connect gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Action request.

            Allowable values: [create_gateway_approve,create_gateway_reject,delete_gateway_approve,delete_gateway_reject,update_attributes_approve,update_attributes_reject]

          • Applicable for create_gateway_approve requests to create AS Prepends. Contains an array of AS Prepend configuration information.

            Possible values: number of items ≤ 50

          • Applicable for create_gateway_approve requests to select the gateway's BGP MD5 authentication key. The key material that you provide must be base64 encoded and original string must be maximum 126 ASCII characters in length. To clear the optional authentication_key field patch its crn to "".

          • Applicable for create_gateway_approve requests to select the gateway's BFD configuration information.

          • Applicable for create_gateway_approve requests to select the type of services this gateway is attached to. Mode transit indicates this gateway will be attached to Transit Gateway Service and direct means this gateway will be attached to vpc or classic connection. If unspecified on create_gateway_approve, default value direct is used. The list of enumerated values for this property may expand in the future. Code and processes using this field must tolerate unexpected values.

            Allowable values: [direct,transit]

            Default: direct

            Examples:
          • The default directional route filter action that applies to routes that do not match any directional route filters.

            Allowable values: [permit,deny]

            Default: permit

            Examples:
          • The default directional route filter action that applies to routes that do not match any directional route filters.

            Allowable values: [permit,deny]

            Default: permit

            Examples:
          • Array of directional route filters for a Direct Link gateway. When creating a gateway or replacing existing route filters, the order of the items in the array will set the ordering of the list of route filters.

            Possible values: 0 ≤ number of items ≤ 100

          • Applicable for create_gateway_approve requests to select the gateway's routing option. Gateways with global routing (true) can connect to networks outside of their associated region.

            Examples:
          • Array of directional route filters for a Direct Link gateway. When creating a gateway or replacing existing route filters, the order of the items in the array will set the ordering of the list of route filters.

            Possible values: 0 ≤ number of items ≤ 100

          • Applicable for create_gateway_approve requests to select the gateway's metered billing option. When true gateway usage is billed per gigabyte. When false there is no per gigabyte usage charge, instead a flat rate is charged for the gateway.

            Examples:
          • Resource group for this resource. If unspecified, the account's default resource group is used.

          • Specify attribute updates being approved or rejected, update_attributes_approve and update_attributes_reject actions must provide an updates field that matches the gateway's current pending changes.

          WithContext method only

          The CreateGatewayAction options.

          • curl -X POST   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/actions?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"   -d '{
                    "action": "create_gateway_approve",
                      "resource_group": {
                        "id": "testid-123456"
                    }
                  }'
          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.createGatewayAction(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • CreateGatewayActionOptions createGatewayActionOptions = new CreateGatewayActionOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<Gateway> response = directLinkService.createGatewayAction(createGatewayActionOptions).execute();
            Gateway gateway = response.getResult();
            
            System.out.println(gateway);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
            
              // For creating {directLink} refer Authentication
              action := directlinkv1.CreateGatewayActionOptions_Action_CreateGatewayApprove
              resourceGroupIdentity, _ := directLink.NewResourceGroupIdentity(${resourceGroupID})
            
              createGatewayActionOptions := directLink.NewCreateGatewayActionOptions({gatewayID}, action)
              createGatewayActionOptions = createGatewayActionOptions.SetGlobal(true).SetMetered(true).SetResourceGroup(resourceGroupIdentity)
            
              result, response, responseErr := directLink.CreateGatewayAction(createGatewayActionOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
            
              // For creating {directLink} refer Authentication
              action := directlinkv1.CreateGatewayActionOptions_Action_UpdateAttributesApprove
            
              createGatewayActionOptions := directLink.NewCreateGatewayActionOptions({gatewayID}, action)
            
              gatewayActionTemplateUpdatesItem := new(directlinkv1.GatewayActionTemplateUpdatesItemGatewayClientSpeedUpdate)
              gatewayActionTemplateUpdatesItem.SpeedMbps = core.Int64Ptr(updatedSpeedMbps)
              createGatewayActionOptions.Updates = []directlinkv1.GatewayActionTemplateUpdatesItemIntf{gatewayActionTemplateUpdatesItem}
            
              result, response, responseErr := directLink.CreateGatewayAction(createGatewayActionOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.create_gateway_action(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            gateway = response.get_result()
            
            print(json.dumps(gateway, indent=2))

          Response

          gateway

          gateway.

          gateway.

          gateway.

          gateway.

          Status Code

          • action successfully completed

          • action successfully completed

          • invalid request

          • request not authorized

          • resource not found

          Example responses
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T20:40:29.622Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c999",
                  "length": 4,
                  "policy": "import",
                  "prefix": "172.17.0.0/16",
                  "updated_at": "2020-11-02T20:40:29.622Z"
                }
              ],
              "authentication_key": {
                "crn": "crn:[...]"
              },
              "bgp_asn": 64999,
              "bgp_cer_cidr": "10.254.30.78/30",
              "bgp_ibm_asn": 13884,
              "bgp_ibm_cidr": "10.254.30.77/30",
              "bgp_status": "active",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:[...]",
              "cross_connect_router": "xcr01.dal03",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ],
              "link_status": "up",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "resource_group": {
                "id": "54321b1a-fee4-41c7-9e11-9cd99e000aaa"
              },
              "speed_mbps": 1000,
              "type": "dedicated"
            }
          • {
              "errors": [
                {
                  "code": "validation_invalid_argument",
                  "message": "The value of given argument is invalid",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "action",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "validation_invalid_argument",
                  "message": "The value of given argument is invalid",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "action",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_authorized",
                  "message": "request not authorized",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_authorized",
                  "message": "request not authorized",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Get completion notice

          Retrieve a Direct Link Dedicated gateway's completion notice.

          Retrieve a Direct Link Dedicated gateway's completion notice.

          Retrieve a Direct Link Dedicated gateway's completion notice.

          Retrieve a Direct Link Dedicated gateway's completion notice.

          Retrieve a Direct Link Dedicated gateway's completion notice.

          GET /gateways/{id}/completion_notice
          ServiceCall<InputStream> listGatewayCompletionNotice(ListGatewayCompletionNoticeOptions listGatewayCompletionNoticeOptions)
          listGatewayCompletionNotice(params)
          list_gateway_completion_notice(
                  self,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListGatewayCompletionNotice(listGatewayCompletionNoticeOptions *ListGatewayCompletionNoticeOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListGatewayCompletionNoticeWithContext(ctx context.Context, listGatewayCompletionNoticeOptions *ListGatewayCompletionNoticeOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing event, depending on any listed conditions.

          • directlink.dedicated.completion-notice.read

            A Dedicated completion notice was retrieved.

          Request

          Use the ListGatewayCompletionNoticeOptions.Builder to create a ListGatewayCompletionNoticeOptions object that contains the parameter values for the listGatewayCompletionNotice method.

          Instantiate the ListGatewayCompletionNoticeOptions struct and set the fields to provide parameter values for the ListGatewayCompletionNotice method.

          Path Parameters

          • Direct Link Dedicated gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listGatewayCompletionNotice options.

          parameters

          • Direct Link Dedicated gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link Dedicated gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The ListGatewayCompletionNotice options.

          • curl -X GET   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/completion_notice?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.listGatewayCompletionNotice(params);
              // response is binary
              // fs.writeFileSync('result.out', res.result);
            } catch (err) {
              console.warn(err);
            }
          • ListGatewayCompletionNoticeOptions listGatewayCompletionNoticeOptions = new ListGatewayCompletionNoticeOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<InputStream> response = directLinkService.listGatewayCompletionNotice(listGatewayCompletionNoticeOptions).execute();
            InputStream inputStream = response.getResult();
            
            System.out.println(inputStream);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              listGatewayCompletionNoticeOptions := directLink.NewListGatewayCompletionNoticeOptions(${gatewayID})
              result, response, responseErr := directLink.ListGatewayCompletionNotice(listGatewayCompletionNoticeOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              outFile, err := os.Create(${filename})
              defer outFile.Close()
              _, err = io.Copy(outFile, result)
              if err != nil {
                panic(err)
              }
            }
          • response = direct_link_service.list_gateway_completion_notice(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            result = response.get_result()
            
            with open('/tmp/result.out', 'wb') as fp:
              fp.write(result)

          Response

          Response type: InputStream

          Response type: NodeJS.ReadableStream

          Response type: BinaryIO

          Response type: io.ReadCloser

          Completion Notice

          Status Code

          • Completion notice retrieved successfully.

          • The Direct Link completion notice for the specified gateway could not be found.

          Example responses
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Create completion notice

          Upload a Direct Link Dedicated gateway completion notice.

          Upload a Direct Link Dedicated gateway completion notice.

          Upload a Direct Link Dedicated gateway completion notice.

          Upload a Direct Link Dedicated gateway completion notice.

          Upload a Direct Link Dedicated gateway completion notice.

          PUT /gateways/{id}/completion_notice
          ServiceCall<Void> createGatewayCompletionNotice(CreateGatewayCompletionNoticeOptions createGatewayCompletionNoticeOptions)
          createGatewayCompletionNotice(params)
          create_gateway_completion_notice(
                  self,
                  id: str,
                  *,
                  upload: BinaryIO = None,
                  upload_content_type: str = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) CreateGatewayCompletionNotice(createGatewayCompletionNoticeOptions *CreateGatewayCompletionNoticeOptions) (response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) CreateGatewayCompletionNoticeWithContext(ctx context.Context, createGatewayCompletionNoticeOptions *CreateGatewayCompletionNoticeOptions) (response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing event, depending on any listed conditions.

          • directlink.dedicated.completion-notice.create

            A Dedicated completion notice was created.

          Request

          Use the CreateGatewayCompletionNoticeOptions.Builder to create a CreateGatewayCompletionNoticeOptions object that contains the parameter values for the createGatewayCompletionNotice method.

          Instantiate the CreateGatewayCompletionNoticeOptions struct and set the fields to provide parameter values for the CreateGatewayCompletionNotice method.

          Path Parameters

          • Direct Link Dedicated gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          Form Parameters

          • Completion notice PDF file

          The createGatewayCompletionNotice options.

          parameters

          • Direct Link Dedicated gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Completion notice PDF file.

          • The content type of upload.

          parameters

          • Direct Link Dedicated gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Completion notice PDF file.

          • The content type of upload.

          WithContext method only

          The CreateGatewayCompletionNotice options.

          • curl -X PUT   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/completion_notice?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"   -F "upload=@completion_notice.pdf"   -H "Content-Type: multipart/form-data"
          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            try {
              await directLinkService.createGatewayCompletionNotice(params);
            } catch (err) {
              console.warn(err);
            }
          • CreateGatewayCompletionNoticeOptions createGatewayCompletionNoticeOptions = new CreateGatewayCompletionNoticeOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<Void> response = directLinkService.createGatewayCompletionNotice(createGatewayCompletionNoticeOptions).execute();
          • package main
            
            import (
              "fmt"
              "io/ioutil"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // Create the {directLink} as mentioned in Authentication
            
              buffer, err := ioutil.ReadFile("completion_notice.pdf")
              r := ioutil.NopCloser(bytes.NewReader(buffer))
              createGatewayCompletionNoticeOptions := directLink.NewCreateGatewayCompletionNoticeOptions(${gatewayID})
              createGatewayCompletionNoticeOptions.SetUpload(r)
              response, responseErr := directLink.CreateGatewayCompletionNotice(createGatewayCompletionNoticeOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(response, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.create_gateway_completion_notice(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )

          Response

          Status Code

          • Completion notice upload successful.

          • An invalid Direct Link completion notice request was provided.

          • The Direct Link completion notice for the specified gateway could not be found.

          Example responses
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "Required parameter missing.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "Required parameter missing.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Get letter of authorization

          Retrieve a Direct Link Dedicated gateway's Letter of Authorization.

          Retrieve a Direct Link Dedicated gateway's Letter of Authorization.

          Retrieve a Direct Link Dedicated gateway's Letter of Authorization.

          Retrieve a Direct Link Dedicated gateway's Letter of Authorization.

          Retrieve a Direct Link Dedicated gateway's Letter of Authorization.

          GET /gateways/{id}/letter_of_authorization
          ServiceCall<InputStream> listGatewayLetterOfAuthorization(ListGatewayLetterOfAuthorizationOptions listGatewayLetterOfAuthorizationOptions)
          listGatewayLetterOfAuthorization(params)
          list_gateway_letter_of_authorization(
                  self,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListGatewayLetterOfAuthorization(listGatewayLetterOfAuthorizationOptions *ListGatewayLetterOfAuthorizationOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListGatewayLetterOfAuthorizationWithContext(ctx context.Context, listGatewayLetterOfAuthorizationOptions *ListGatewayLetterOfAuthorizationOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)

          Request

          Use the ListGatewayLetterOfAuthorizationOptions.Builder to create a ListGatewayLetterOfAuthorizationOptions object that contains the parameter values for the listGatewayLetterOfAuthorization method.

          Instantiate the ListGatewayLetterOfAuthorizationOptions struct and set the fields to provide parameter values for the ListGatewayLetterOfAuthorization method.

          Path Parameters

          • Direct Link Dedicated gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listGatewayLetterOfAuthorization options.

          parameters

          • Direct Link Dedicated gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link Dedicated gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The ListGatewayLetterOfAuthorization options.

          • curl -X GET   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/letter_of_authorization?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.listGatewayLetterOfAuthorization(params);
              // response is binary
              // fs.writeFileSync('result.out', res.result);
            } catch (err) {
              console.warn(err);
            }
          • ListGatewayLetterOfAuthorizationOptions listGatewayLetterOfAuthorizationOptions = new ListGatewayLetterOfAuthorizationOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<InputStream> response = directLinkService.listGatewayLetterOfAuthorization(listGatewayLetterOfAuthorizationOptions).execute();
            InputStream inputStream = response.getResult();
            
            System.out.println(inputStream);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              listGatewayLetterOfAuthorizationOptions := directLink.NewListGatewayLetterOfAuthorizationOptions(${gatewayID})
              result, response, responseErr := directLink.ListGatewayLetterOfAuthorization(listGatewayLetterOfAuthorizationOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              outFile, err := os.Create(${filename})
              defer outFile.Close()
              _, err = io.Copy(outFile, result)
              if err != nil {
                panic(err)
              }
            }
          • response = direct_link_service.list_gateway_letter_of_authorization(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            result = response.get_result()
            
            with open('/tmp/result.out', 'wb') as fp:
              fp.write(result)

          Response

          Response type: InputStream

          Response type: NodeJS.ReadableStream

          Response type: BinaryIO

          Response type: io.ReadCloser

          Letter of Authorization

          Status Code

          • Letter of Authorization retrieved successfully.

          • Letter of authorization not found.

          Example responses
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Please check whether the resource you are requesting exists.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Please check whether the resource you are requesting exists.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Gateway statistics/debug information

          Retrieve gateway statistics or debug information. Specify statistic to retrieve using required type query parameter.

          Retrieve gateway statistics or debug information. Specify statistic to retrieve using required type query parameter.

          Retrieve gateway statistics or debug information. Specify statistic to retrieve using required type query parameter.

          Retrieve gateway statistics or debug information. Specify statistic to retrieve using required type query parameter.

          Retrieve gateway statistics or debug information. Specify statistic to retrieve using required type query parameter.

          GET /gateways/{id}/statistics
          ServiceCall<GatewayStatisticCollection> getGatewayStatistics(GetGatewayStatisticsOptions getGatewayStatisticsOptions)
          getGatewayStatistics(params)
          get_gateway_statistics(
                  self,
                  id: str,
                  type: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) GetGatewayStatistics(getGatewayStatisticsOptions *GetGatewayStatisticsOptions) (result *GatewayStatisticCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetGatewayStatisticsWithContext(ctx context.Context, getGatewayStatisticsOptions *GetGatewayStatisticsOptions) (result *GatewayStatisticCollection, response *core.DetailedResponse, err error)

          Request

          Use the GetGatewayStatisticsOptions.Builder to create a GetGatewayStatisticsOptions object that contains the parameter values for the getGatewayStatistics method.

          Instantiate the GetGatewayStatisticsOptions struct and set the fields to provide parameter values for the GetGatewayStatistics method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Specify statistic to retrieve

            Allowable values: [macsec_mka_session,macsec_policy,macsec_mka_statistics,bfd_session]

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The getGatewayStatistics options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Specify statistic to retrieve.

            Allowable values: [macsec_mka_session,macsec_policy,macsec_mka_statistics,bfd_session]

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Specify statistic to retrieve.

            Allowable values: [macsec_mka_session,macsec_policy,macsec_mka_statistics,bfd_session]

          WithContext method only

          The GetGatewayStatistics options.

          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              type: 'macsec_mka_session',
            };
            
            let res;
            try {
              res = await directLinkService.getGatewayStatistics(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GetGatewayStatisticsOptions getGatewayStatisticsOptions = new GetGatewayStatisticsOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .type("macsec_mka_session")
              .build();
            
            Response<GatewayStatisticCollection> response = directLinkService.getGatewayStatistics(getGatewayStatisticsOptions).execute();
            GatewayStatisticCollection gatewayStatisticCollection = response.getResult();
            
            System.out.println(gatewayStatisticCollection);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              getGatewayStatisticsOptions := directLink.NewGetGatewayStatisticsOptions(${gatewayID}, ${statisticsType})
              result, response, responseErr := directLink.GetGatewayStatistics(getGatewayStatisticsOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(response, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.get_gateway_statistics(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              type='macsec_mka_session',
            )
            gateway_statistic_collection = response.get_result()
            
            print(json.dumps(gateway_statistic_collection, indent=2))

          Response

          gateway statistics

          gateway statistics.

          gateway statistics.

          gateway statistics.

          gateway statistics.

          Status Code

          • action successfully completed

          • request not authorized

          • resource not found

          • MACsec must be active to retrieve MACsec related data

          Example responses
          • {
              "statistics": [
                {
                  "created_at": "2020-08-20T06:58:41.909781Z",
                  "data": "MKA session details",
                  "type": "macsec_mka_session"
                }
              ]
            }
          • {
              "statistics": [
                {
                  "created_at": "2020-08-20T06:58:41.909781Z",
                  "data": "MKA session details",
                  "type": "macsec_mka_session"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_authorized",
                  "message": "request not authorized",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_authorized",
                  "message": "request not authorized",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Request not valid for resource.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Request not valid for resource.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Gateway status information

          Retrieve gateway status. Specify status to retrieve using required type query parameter.

          Retrieve gateway status. Specify status to retrieve using required type query parameter.

          Retrieve gateway status. Specify status to retrieve using required type query parameter.

          Retrieve gateway status. Specify status to retrieve using required type query parameter.

          Retrieve gateway status. Specify status to retrieve using required type query parameter.

          GET /gateways/{id}/status
          ServiceCall<GatewayStatusCollection> getGatewayStatus(GetGatewayStatusOptions getGatewayStatusOptions)
          getGatewayStatus(params)
          get_gateway_status(
                  self,
                  id: str,
                  *,
                  type: str = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) GetGatewayStatus(getGatewayStatusOptions *GetGatewayStatusOptions) (result *GatewayStatusCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetGatewayStatusWithContext(ctx context.Context, getGatewayStatusOptions *GetGatewayStatusOptions) (result *GatewayStatusCollection, response *core.DetailedResponse, err error)

          Request

          Use the GetGatewayStatusOptions.Builder to create a GetGatewayStatusOptions object that contains the parameter values for the getGatewayStatus method.

          Instantiate the GetGatewayStatusOptions struct and set the fields to provide parameter values for the GetGatewayStatus method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          • Specify status to retrieve

            Allowable values: [bgp,bfd,link]

          The getGatewayStatus options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Specify status to retrieve.

            Allowable values: [bgp,bfd,link]

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Specify status to retrieve.

            Allowable values: [bgp,bfd,link]

          WithContext method only

          The GetGatewayStatus options.

          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.getGatewayStatus(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GetGatewayStatusOptions getGatewayStatusOptions = new GetGatewayStatusOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<GatewayStatusCollection> response = directLinkService.getGatewayStatus(getGatewayStatusOptions).execute();
            GatewayStatusCollection gatewayStatusCollection = response.getResult();
            
            System.out.println(gatewayStatusCollection);
          • response = direct_link_service.get_gateway_status(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            gateway_status_collection = response.get_result()
            
            print(json.dumps(gateway_status_collection, indent=2))

          Response

          gateway status

          gateway status.

          gateway status.

          gateway status.

          gateway status.

          Status Code

          • action successfully completed

          • request not authorized

          • resource not found

          • BFD must be active to retrieve BFD status

          Example responses
          • {
              "status": [
                {
                  "type": "bfd",
                  "updated_at": "2020-08-20T06:58:41.909781Z",
                  "value": "up"
                }
              ]
            }
          • {
              "status": [
                {
                  "type": "bfd",
                  "updated_at": "2020-08-20T06:58:41.909781Z",
                  "value": "up"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_authorized",
                  "message": "request not authorized",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_authorized",
                  "message": "request not authorized",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Request not valid for resource.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Request not valid for resource.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List export route filters

          List all export route filters that influence the export routes advertised to the on premises network and learned from attached virtual connections of the Direct Link gateway.

          The first export route filter an export route matches will determine whether the route is permitted or denied to be advertised by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an export route does not match any of the export route filters, the route is subject to the default_export_route_filter of the direct link.

          List all export route filters that influence the export routes advertised to the on premises network and learned from attached virtual connections of the Direct Link gateway.

          The first export route filter an export route matches will determine whether the route is permitted or denied to be advertised by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an export route does not match any of the export route filters, the route is subject to the default_export_route_filter of the direct link.

          List all export route filters that influence the export routes advertised to the on premises network and learned from attached virtual connections of the Direct Link gateway.

          The first export route filter an export route matches will determine whether the route is permitted or denied to be advertised by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an export route does not match any of the export route filters, the route is subject to the default_export_route_filter of the direct link.

          List all export route filters that influence the export routes advertised to the on premises network and learned from attached virtual connections of the Direct Link gateway.

          The first export route filter an export route matches will determine whether the route is permitted or denied to be advertised by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an export route does not match any of the export route filters, the route is subject to the default_export_route_filter of the direct link.

          List all export route filters that influence the export routes advertised to the on premises network and learned from attached virtual connections of the Direct Link gateway.

          The first export route filter an export route matches will determine whether the route is permitted or denied to be advertised by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an export route does not match any of the export route filters, the route is subject to the default_export_route_filter of the direct link.

          GET /gateways/{gateway_id}/export_route_filters
          ServiceCall<ExportRouteFilterCollection> listGatewayExportRouteFilters(ListGatewayExportRouteFiltersOptions listGatewayExportRouteFiltersOptions)
          listGatewayExportRouteFilters(params)
          list_gateway_export_route_filters(
                  self,
                  gateway_id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListGatewayExportRouteFilters(listGatewayExportRouteFiltersOptions *ListGatewayExportRouteFiltersOptions) (result *ExportRouteFilterCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListGatewayExportRouteFiltersWithContext(ctx context.Context, listGatewayExportRouteFiltersOptions *ListGatewayExportRouteFiltersOptions) (result *ExportRouteFilterCollection, response *core.DetailedResponse, err error)

          Request

          Use the ListGatewayExportRouteFiltersOptions.Builder to create a ListGatewayExportRouteFiltersOptions object that contains the parameter values for the listGatewayExportRouteFilters method.

          Instantiate the ListGatewayExportRouteFiltersOptions struct and set the fields to provide parameter values for the ListGatewayExportRouteFilters method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listGatewayExportRouteFilters options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The ListGatewayExportRouteFilters options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.listGatewayExportRouteFilters(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListGatewayExportRouteFiltersOptions listGatewayExportRouteFiltersOptions = new ListGatewayExportRouteFiltersOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<ExportRouteFilterCollection> response = directLinkService.listGatewayExportRouteFilters(listGatewayExportRouteFiltersOptions).execute();
            ExportRouteFilterCollection exportRouteFilterCollection = response.getResult();
            
            System.out.println(exportRouteFilterCollection);
          • listGatewayExportRouteFiltersOptions := directLinkService.NewListGatewayExportRouteFiltersOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
            )
            
            exportRouteFilterCollection, response, err := directLinkService.ListGatewayExportRouteFilters(listGatewayExportRouteFiltersOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(exportRouteFilterCollection, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.list_gateway_export_route_filters(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            export_route_filter_collection = response.get_result()
            
            print(json.dumps(export_route_filter_collection, indent=2))

          Response

          Collection of export route filters

          Collection of export route filters.

          Collection of export route filters.

          Collection of export route filters.

          Collection of export route filters.

          Status Code

          • Export route filters retrieved successfully.

          • The specified Direct Link gateway could not be found.

          Example responses
          • {
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ]
            }
          • {
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Create an export route filter

          Create a new export route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          Create a new export route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          Create a new export route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          Create a new export route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          Create a new export route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          POST /gateways/{gateway_id}/export_route_filters
          ServiceCall<RouteFilter> createGatewayExportRouteFilter(CreateGatewayExportRouteFilterOptions createGatewayExportRouteFilterOptions)
          createGatewayExportRouteFilter(params)
          create_gateway_export_route_filter(
                  self,
                  gateway_id: str,
                  action: str,
                  prefix: str,
                  *,
                  before: str = None,
                  ge: int = None,
                  le: int = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) CreateGatewayExportRouteFilter(createGatewayExportRouteFilterOptions *CreateGatewayExportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) CreateGatewayExportRouteFilterWithContext(ctx context.Context, createGatewayExportRouteFilterOptions *CreateGatewayExportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)

          Request

          Use the CreateGatewayExportRouteFilterOptions.Builder to create a CreateGatewayExportRouteFilterOptions object that contains the parameter values for the createGatewayExportRouteFilter method.

          Instantiate the CreateGatewayExportRouteFilterOptions struct and set the fields to provide parameter values for the CreateGatewayExportRouteFilter method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The export route filter create template

          The createGatewayExportRouteFilter options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Determines whether routes that match the prefix-set will be allowed (permit) or rejected (deny) through the filter.

            Allowable values: [permit,deny]

            Examples:
          • IP prefix representing an address and mask length of the prefix-set.

            Possible values: 7 ≤ length ≤ 18, Value must match regular expression /^([0-9]{1,3}\\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/

            Examples:
          • Identifier of the next route filter considered if a route does not match the current filter. This property builds the ordering among route filters and follows semantics:

            • When before is an identifier of a route filter that exists and is in the same collection, a route will first attempt to match on the current filter before preceding to the filter referenced in this property.
            • When a filter is created with before that matches another filter in the same collection, the existing filter will take precedence. The before of the existing filter will be updated to refer to the newly created filter. The newly created filter will refer to the route filter identified by the provided before.
            • When a filter is created without a before, it takes the lowest precedence. The existing filter of lowest precedence will be updated to refer to the newly created filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The minimum matching length of the prefix-set (mnemonic for greater than or equal to).

            Possible values: 1 ≤ value ≤ 32

            Examples:
          • The maximum matching length of the prefix-set (mnemonic for less than or equal to).

            Possible values: 1 ≤ value ≤ 32

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Determines whether routes that match the prefix-set will be allowed (permit) or rejected (deny) through the filter.

            Allowable values: [permit,deny]

            Examples:
          • IP prefix representing an address and mask length of the prefix-set.

            Possible values: 7 ≤ length ≤ 18, Value must match regular expression /^([0-9]{1,3}\\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/

            Examples:
          • Identifier of the next route filter considered if a route does not match the current filter. This property builds the ordering among route filters and follows semantics:

            • When before is an identifier of a route filter that exists and is in the same collection, a route will first attempt to match on the current filter before preceding to the filter referenced in this property.
            • When a filter is created with before that matches another filter in the same collection, the existing filter will take precedence. The before of the existing filter will be updated to refer to the newly created filter. The newly created filter will refer to the route filter identified by the provided before.
            • When a filter is created without a before, it takes the lowest precedence. The existing filter of lowest precedence will be updated to refer to the newly created filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The minimum matching length of the prefix-set (mnemonic for greater than or equal to).

            Possible values: 1 ≤ value ≤ 32

            Examples:
          • The maximum matching length of the prefix-set (mnemonic for less than or equal to).

            Possible values: 1 ≤ value ≤ 32

            Examples:

          WithContext method only

          The CreateGatewayExportRouteFilter options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              action: 'permit',
              prefix: '192.168.100.0/24',
            };
            
            let res;
            try {
              res = await directLinkService.createGatewayExportRouteFilter(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • CreateGatewayExportRouteFilterOptions createGatewayExportRouteFilterOptions = new CreateGatewayExportRouteFilterOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .action("permit")
              .prefix("192.168.100.0/24")
              .build();
            
            Response<RouteFilter> response = directLinkService.createGatewayExportRouteFilter(createGatewayExportRouteFilterOptions).execute();
            RouteFilter routeFilter = response.getResult();
            
            System.out.println(routeFilter);
          • createGatewayExportRouteFilterOptions := directLinkService.NewCreateGatewayExportRouteFilterOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              "permit",
              "192.168.100.0/24",
            )
            
            routeFilter, response, err := directLinkService.CreateGatewayExportRouteFilter(createGatewayExportRouteFilterOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(routeFilter, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.create_gateway_export_route_filter(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              action='permit',
              prefix='192.168.100.0/24',
            )
            route_filter = response.get_result()
            
            print(json.dumps(route_filter, indent=2))

          Response

          Route filter

          Route filter.

          Route filter.

          Route filter.

          Route filter.

          Status Code

          • Direct Link gateway export route filter was created successfully.

          • The information given was invalid, malformed, or missing a required field.

          • The specified Direct Link gateway could not be found.

          Example responses
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Replace existing export route filters

          Replace all existing export route filters configured on the Direct Link gateway

          Replace all existing export route filters configured on the Direct Link gateway.

          Replace all existing export route filters configured on the Direct Link gateway.

          Replace all existing export route filters configured on the Direct Link gateway.

          Replace all existing export route filters configured on the Direct Link gateway.

          PUT /gateways/{gateway_id}/export_route_filters
          ServiceCall<ExportRouteFilterCollection> replaceGatewayExportRouteFilters(ReplaceGatewayExportRouteFiltersOptions replaceGatewayExportRouteFiltersOptions)
          replaceGatewayExportRouteFilters(params)
          replace_gateway_export_route_filters(
                  self,
                  gateway_id: str,
                  if_match: str,
                  *,
                  export_route_filters: List['GatewayTemplateRouteFilter'] = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ReplaceGatewayExportRouteFilters(replaceGatewayExportRouteFiltersOptions *ReplaceGatewayExportRouteFiltersOptions) (result *ExportRouteFilterCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ReplaceGatewayExportRouteFiltersWithContext(ctx context.Context, replaceGatewayExportRouteFiltersOptions *ReplaceGatewayExportRouteFiltersOptions) (result *ExportRouteFilterCollection, response *core.DetailedResponse, err error)

          Request

          Use the ReplaceGatewayExportRouteFiltersOptions.Builder to create a ReplaceGatewayExportRouteFiltersOptions object that contains the parameter values for the replaceGatewayExportRouteFilters method.

          Instantiate the ReplaceGatewayExportRouteFiltersOptions struct and set the fields to provide parameter values for the ReplaceGatewayExportRouteFilters method.

          Custom Headers

          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression (?:W\/)?"(?:[ !#-\x7E\x80-\xFF]*|\r\n[\t ]|\\.)*"

            Example: W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          Template for replacing existing export route filters

          The replaceGatewayExportRouteFilters options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression /(?:W\/)?\"(?:[ !#-\\x7E\\x80-\\xFF]*|\\r\\n[\\t ]|\\\\.)*\"/

            Examples:
          • Array of directional route filters for a Direct Link gateway. When creating a gateway or replacing existing route filters, the order of the items in the array will set the ordering of the list of route filters.

            Possible values: 0 ≤ number of items ≤ 100

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression /(?:W\/)?\"(?:[ !#-\\x7E\\x80-\\xFF]*|\\r\\n[\\t ]|\\\\.)*\"/

            Examples:
          • Array of directional route filters for a Direct Link gateway. When creating a gateway or replacing existing route filters, the order of the items in the array will set the ordering of the list of route filters.

            Possible values: 0 ≤ number of items ≤ 100

          WithContext method only

          The ReplaceGatewayExportRouteFilters options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              ifMatch: 'W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"',
            };
            
            let res;
            try {
              res = await directLinkService.replaceGatewayExportRouteFilters(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ReplaceGatewayExportRouteFiltersOptions replaceGatewayExportRouteFiltersOptions = new ReplaceGatewayExportRouteFiltersOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"")
              .build();
            
            Response<ExportRouteFilterCollection> response = directLinkService.replaceGatewayExportRouteFilters(replaceGatewayExportRouteFiltersOptions).execute();
            ExportRouteFilterCollection exportRouteFilterCollection = response.getResult();
            
            System.out.println(exportRouteFilterCollection);
          • replaceGatewayExportRouteFiltersOptions := directLinkService.NewReplaceGatewayExportRouteFiltersOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              `W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"`,
            )
            
            exportRouteFilterCollection, response, err := directLinkService.ReplaceGatewayExportRouteFilters(replaceGatewayExportRouteFiltersOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(exportRouteFilterCollection, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.replace_gateway_export_route_filters(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              if_match='W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"',
            )
            export_route_filter_collection = response.get_result()
            
            print(json.dumps(export_route_filter_collection, indent=2))

          Response

          Collection of export route filters

          Collection of export route filters.

          Collection of export route filters.

          Collection of export route filters.

          Collection of export route filters.

          Status Code

          • Export route filters replaced successfully.

          • The information given was invalid, malformed, or missing a required field.

          • The specified Direct Link gateway could not be found.

          • The provided If-Match value does not match the current ETag value of the export route filters

          Example responses
          • {
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ]
            }
          • {
              "export_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Remove export route filter from Direct Link gateway

          Delete an export route filter.

          Deleting an export route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          Delete an export route filter.

          Deleting an export route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          Delete an export route filter.

          Deleting an export route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          Delete an export route filter.

          Deleting an export route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          Delete an export route filter.

          Deleting an export route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          DELETE /gateways/{gateway_id}/export_route_filters/{id}
          ServiceCall<Void> deleteGatewayExportRouteFilter(DeleteGatewayExportRouteFilterOptions deleteGatewayExportRouteFilterOptions)
          deleteGatewayExportRouteFilter(params)
          delete_gateway_export_route_filter(
                  self,
                  gateway_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) DeleteGatewayExportRouteFilter(deleteGatewayExportRouteFilterOptions *DeleteGatewayExportRouteFilterOptions) (response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) DeleteGatewayExportRouteFilterWithContext(ctx context.Context, deleteGatewayExportRouteFilterOptions *DeleteGatewayExportRouteFilterOptions) (response *core.DetailedResponse, err error)

          Request

          Use the DeleteGatewayExportRouteFilterOptions.Builder to create a DeleteGatewayExportRouteFilterOptions object that contains the parameter values for the deleteGatewayExportRouteFilter method.

          Instantiate the DeleteGatewayExportRouteFilterOptions struct and set the fields to provide parameter values for the DeleteGatewayExportRouteFilter method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • Identifier of an import route filter

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The deleteGatewayExportRouteFilter options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The DeleteGatewayExportRouteFilter options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            try {
              await directLinkService.deleteGatewayExportRouteFilter(params);
            } catch (err) {
              console.warn(err);
            }
          • DeleteGatewayExportRouteFilterOptions deleteGatewayExportRouteFilterOptions = new DeleteGatewayExportRouteFilterOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<Void> response = directLinkService.deleteGatewayExportRouteFilter(deleteGatewayExportRouteFilterOptions).execute();
          • deleteGatewayExportRouteFilterOptions := directLinkService.NewDeleteGatewayExportRouteFilterOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
            )
            
            response, err := directLinkService.DeleteGatewayExportRouteFilter(deleteGatewayExportRouteFilterOptions)
            if err != nil {
              panic(err)
            }
            if response.StatusCode != 204 {
              fmt.Printf("\nUnexpected response status code received from DeleteGatewayExportRouteFilter(): %d\n", response.StatusCode)
            }
          • response = direct_link_service.delete_gateway_export_route_filter(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )

          Response

          Status Code

          • The export route filter was deleted successfully.

          • An export route filter with the specified identifier could not be found.

          Example responses
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Retrieves the specified Direct Link gateway export route filter

          Retrieve an export route filter from the Direct Link gateway.

          Retrieve an export route filter from the Direct Link gateway.

          Retrieve an export route filter from the Direct Link gateway.

          Retrieve an export route filter from the Direct Link gateway.

          Retrieve an export route filter from the Direct Link gateway.

          GET /gateways/{gateway_id}/export_route_filters/{id}
          ServiceCall<RouteFilter> getGatewayExportRouteFilter(GetGatewayExportRouteFilterOptions getGatewayExportRouteFilterOptions)
          getGatewayExportRouteFilter(params)
          get_gateway_export_route_filter(
                  self,
                  gateway_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) GetGatewayExportRouteFilter(getGatewayExportRouteFilterOptions *GetGatewayExportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetGatewayExportRouteFilterWithContext(ctx context.Context, getGatewayExportRouteFilterOptions *GetGatewayExportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)

          Request

          Use the GetGatewayExportRouteFilterOptions.Builder to create a GetGatewayExportRouteFilterOptions object that contains the parameter values for the getGatewayExportRouteFilter method.

          Instantiate the GetGatewayExportRouteFilterOptions struct and set the fields to provide parameter values for the GetGatewayExportRouteFilter method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • Identifier of an import route filter

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The getGatewayExportRouteFilter options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The GetGatewayExportRouteFilter options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.getGatewayExportRouteFilter(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GetGatewayExportRouteFilterOptions getGatewayExportRouteFilterOptions = new GetGatewayExportRouteFilterOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<RouteFilter> response = directLinkService.getGatewayExportRouteFilter(getGatewayExportRouteFilterOptions).execute();
            RouteFilter routeFilter = response.getResult();
            
            System.out.println(routeFilter);
          • getGatewayExportRouteFilterOptions := directLinkService.NewGetGatewayExportRouteFilterOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
            )
            
            routeFilter, response, err := directLinkService.GetGatewayExportRouteFilter(getGatewayExportRouteFilterOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(routeFilter, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.get_gateway_export_route_filter(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            route_filter = response.get_result()
            
            print(json.dumps(route_filter, indent=2))

          Response

          Route filter

          Route filter.

          Route filter.

          Route filter.

          Route filter.

          Status Code

          • The export route filter was retrieved successfully.

          • An export route filter with the specified identifier could not be found.

          Example responses
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Updates the specified Direct Link gateway export route filter

          Update an export route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          Update an export route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          Update an export route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          Update an export route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          Update an export route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          PATCH /gateways/{gateway_id}/export_route_filters/{id}
          ServiceCall<RouteFilter> updateGatewayExportRouteFilter(UpdateGatewayExportRouteFilterOptions updateGatewayExportRouteFilterOptions)
          updateGatewayExportRouteFilter(params)
          update_gateway_export_route_filter(
                  self,
                  gateway_id: str,
                  id: str,
                  update_route_filter_template: 'UpdateRouteFilterTemplate',
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) UpdateGatewayExportRouteFilter(updateGatewayExportRouteFilterOptions *UpdateGatewayExportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) UpdateGatewayExportRouteFilterWithContext(ctx context.Context, updateGatewayExportRouteFilterOptions *UpdateGatewayExportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)

          Request

          Use the UpdateGatewayExportRouteFilterOptions.Builder to create a UpdateGatewayExportRouteFilterOptions object that contains the parameter values for the updateGatewayExportRouteFilter method.

          Instantiate the UpdateGatewayExportRouteFilterOptions struct and set the fields to provide parameter values for the UpdateGatewayExportRouteFilter method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • Identifier of an import route filter

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The export route filter update template

          The updateGatewayExportRouteFilter options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Determines whether routes that match the prefix-set will be allowed (permit) or rejected (deny) through the filter.

            Allowable values: [permit,deny]

            Examples:
          • Identifier of the next route filter considered if a route does not match the current filter. This property builds the ordering among route filters and follows semantics:

            • When before is an identifier of a route filter that exists and is in the same collection, a route will first attempt to match on the current filter before preceding to the filter referenced in this property.
            • When a filter is created with before that matches another filter in the same collection, the existing filter will take precedence. The before of the existing filter will be updated to refer to the newly created filter. The newly created filter will refer to the route filter identified by the provided before.
            • When a filter is created without a before, it takes the lowest precedence. The existing filter of lowest precedence will be updated to refer to the newly created filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The minimum matching length of the prefix-set (mnemonic for greater than or equal to).

            To clear the minimum matching length of the filter, patch the value to 0.

            Possible values: 0 ≤ value ≤ 32

            Examples:
          • The maximum matching length of the prefix-set (mnemonic for less than or equal to).

            To clear the maximum matching length of the filter, patch the value to 0.

            Possible values: 0 ≤ value ≤ 32

            Examples:
          • IP prefix representing an address and mask length of the prefix-set.

            Possible values: 7 ≤ length ≤ 18, Value must match regular expression /^([0-9]{1,3}\\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The route filter update template.

          WithContext method only

          The UpdateGatewayExportRouteFilter options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.updateGatewayExportRouteFilter(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • UpdateRouteFilterTemplate updateRouteFilterTemplateModel = new UpdateRouteFilterTemplate.Builder()
              .build();
            Map<String, Object> updateRouteFilterTemplateModelAsPatch = updateRouteFilterTemplateModel.asPatch();
            UpdateGatewayExportRouteFilterOptions updateGatewayExportRouteFilterOptions = new UpdateGatewayExportRouteFilterOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .updateRouteFilterTemplatePatch(updateRouteFilterTemplateModelAsPatch)
              .build();
            
            Response<RouteFilter> response = directLinkService.updateGatewayExportRouteFilter(updateGatewayExportRouteFilterOptions).execute();
            RouteFilter routeFilter = response.getResult();
            
            System.out.println(routeFilter);
          • updateRouteFilterTemplateModel := &directlinkv1.UpdateRouteFilterTemplate{
            }
            updateRouteFilterTemplateModelAsPatch, asPatchErr := updateRouteFilterTemplateModel.AsPatch()
            Expect(asPatchErr).To(BeNil())
            
            updateGatewayExportRouteFilterOptions := directLinkService.NewUpdateGatewayExportRouteFilterOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              updateRouteFilterTemplateModelAsPatch,
            )
            
            routeFilter, response, err := directLinkService.UpdateGatewayExportRouteFilter(updateGatewayExportRouteFilterOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(routeFilter, "", "  ")
            fmt.Println(string(b))
          • update_route_filter_template_model = {
            }
            
            response = direct_link_service.update_gateway_export_route_filter(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              update_route_filter_template=update_route_filter_template_model,
            )
            route_filter = response.get_result()
            
            print(json.dumps(route_filter, indent=2))

          Response

          Route filter

          Route filter.

          Route filter.

          Route filter.

          Route filter.

          Status Code

          • The export route filter was updated successfully.

          • The information given was invalid, malformed, or missing a required field.

          • An export route filter with the specified identifier could not be found.

          Example responses
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List import route filters

          List all import route filters that influence the import routes learned from the on premises network.

          The first import route filter an import route matches will determine whether the route is permitted or denied to be learned by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an import route does not match any of the import route filters, the route is subject to the default_import_route_filter of the direct link.

          List all import route filters that influence the import routes learned from the on premises network.

          The first import route filter an import route matches will determine whether the route is permitted or denied to be learned by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an import route does not match any of the import route filters, the route is subject to the default_import_route_filter of the direct link.

          List all import route filters that influence the import routes learned from the on premises network.

          The first import route filter an import route matches will determine whether the route is permitted or denied to be learned by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an import route does not match any of the import route filters, the route is subject to the default_import_route_filter of the direct link.

          List all import route filters that influence the import routes learned from the on premises network.

          The first import route filter an import route matches will determine whether the route is permitted or denied to be learned by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an import route does not match any of the import route filters, the route is subject to the default_import_route_filter of the direct link.

          List all import route filters that influence the import routes learned from the on premises network.

          The first import route filter an import route matches will determine whether the route is permitted or denied to be learned by the Direct Link gateway. Route filter order is determined by the filter's before field.

          If an import route does not match any of the import route filters, the route is subject to the default_import_route_filter of the direct link.

          GET /gateways/{gateway_id}/import_route_filters
          ServiceCall<ImportRouteFilterCollection> listGatewayImportRouteFilters(ListGatewayImportRouteFiltersOptions listGatewayImportRouteFiltersOptions)
          listGatewayImportRouteFilters(params)
          list_gateway_import_route_filters(
                  self,
                  gateway_id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListGatewayImportRouteFilters(listGatewayImportRouteFiltersOptions *ListGatewayImportRouteFiltersOptions) (result *ImportRouteFilterCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListGatewayImportRouteFiltersWithContext(ctx context.Context, listGatewayImportRouteFiltersOptions *ListGatewayImportRouteFiltersOptions) (result *ImportRouteFilterCollection, response *core.DetailedResponse, err error)

          Request

          Use the ListGatewayImportRouteFiltersOptions.Builder to create a ListGatewayImportRouteFiltersOptions object that contains the parameter values for the listGatewayImportRouteFilters method.

          Instantiate the ListGatewayImportRouteFiltersOptions struct and set the fields to provide parameter values for the ListGatewayImportRouteFilters method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listGatewayImportRouteFilters options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The ListGatewayImportRouteFilters options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.listGatewayImportRouteFilters(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListGatewayImportRouteFiltersOptions listGatewayImportRouteFiltersOptions = new ListGatewayImportRouteFiltersOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<ImportRouteFilterCollection> response = directLinkService.listGatewayImportRouteFilters(listGatewayImportRouteFiltersOptions).execute();
            ImportRouteFilterCollection importRouteFilterCollection = response.getResult();
            
            System.out.println(importRouteFilterCollection);
          • listGatewayImportRouteFiltersOptions := directLinkService.NewListGatewayImportRouteFiltersOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
            )
            
            importRouteFilterCollection, response, err := directLinkService.ListGatewayImportRouteFilters(listGatewayImportRouteFiltersOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(importRouteFilterCollection, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.list_gateway_import_route_filters(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            import_route_filter_collection = response.get_result()
            
            print(json.dumps(import_route_filter_collection, indent=2))

          Response

          Collection of import route filters

          Collection of import route filters.

          Collection of import route filters.

          Collection of import route filters.

          Collection of import route filters.

          Status Code

          • Import route filters retrieved successfully.

          • The specified Direct Link gateway could not be found.

          Example responses
          • {
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ]
            }
          • {
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Create an import route filter

          Create a new import route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          Create a new import route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          Create a new import route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          Create a new import route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          Create a new import route filter to be configured on the Direct Link gateway.

          This call can result in an implicit update to another route filter's before field.

          If the request's route filter template does not contain a before field, the created filter will be added to the end of of the list. The filter previously at the end of the list will have it's before field set to the created route filter.

          If the request's route filter template contains a before field, the created filter will be added directly before that specified route filter. If the specified route filter has a preceding route filter, that filter's before field is updated to the created route filter.

          POST /gateways/{gateway_id}/import_route_filters
          ServiceCall<RouteFilter> createGatewayImportRouteFilter(CreateGatewayImportRouteFilterOptions createGatewayImportRouteFilterOptions)
          createGatewayImportRouteFilter(params)
          create_gateway_import_route_filter(
                  self,
                  gateway_id: str,
                  action: str,
                  prefix: str,
                  *,
                  before: str = None,
                  ge: int = None,
                  le: int = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) CreateGatewayImportRouteFilter(createGatewayImportRouteFilterOptions *CreateGatewayImportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) CreateGatewayImportRouteFilterWithContext(ctx context.Context, createGatewayImportRouteFilterOptions *CreateGatewayImportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)

          Request

          Use the CreateGatewayImportRouteFilterOptions.Builder to create a CreateGatewayImportRouteFilterOptions object that contains the parameter values for the createGatewayImportRouteFilter method.

          Instantiate the CreateGatewayImportRouteFilterOptions struct and set the fields to provide parameter values for the CreateGatewayImportRouteFilter method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The import route filter create template

          The createGatewayImportRouteFilter options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Determines whether routes that match the prefix-set will be allowed (permit) or rejected (deny) through the filter.

            Allowable values: [permit,deny]

            Examples:
          • IP prefix representing an address and mask length of the prefix-set.

            Possible values: 7 ≤ length ≤ 18, Value must match regular expression /^([0-9]{1,3}\\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/

            Examples:
          • Identifier of the next route filter considered if a route does not match the current filter. This property builds the ordering among route filters and follows semantics:

            • When before is an identifier of a route filter that exists and is in the same collection, a route will first attempt to match on the current filter before preceding to the filter referenced in this property.
            • When a filter is created with before that matches another filter in the same collection, the existing filter will take precedence. The before of the existing filter will be updated to refer to the newly created filter. The newly created filter will refer to the route filter identified by the provided before.
            • When a filter is created without a before, it takes the lowest precedence. The existing filter of lowest precedence will be updated to refer to the newly created filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The minimum matching length of the prefix-set (mnemonic for greater than or equal to).

            Possible values: 1 ≤ value ≤ 32

            Examples:
          • The maximum matching length of the prefix-set (mnemonic for less than or equal to).

            Possible values: 1 ≤ value ≤ 32

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Determines whether routes that match the prefix-set will be allowed (permit) or rejected (deny) through the filter.

            Allowable values: [permit,deny]

            Examples:
          • IP prefix representing an address and mask length of the prefix-set.

            Possible values: 7 ≤ length ≤ 18, Value must match regular expression /^([0-9]{1,3}\\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/

            Examples:
          • Identifier of the next route filter considered if a route does not match the current filter. This property builds the ordering among route filters and follows semantics:

            • When before is an identifier of a route filter that exists and is in the same collection, a route will first attempt to match on the current filter before preceding to the filter referenced in this property.
            • When a filter is created with before that matches another filter in the same collection, the existing filter will take precedence. The before of the existing filter will be updated to refer to the newly created filter. The newly created filter will refer to the route filter identified by the provided before.
            • When a filter is created without a before, it takes the lowest precedence. The existing filter of lowest precedence will be updated to refer to the newly created filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The minimum matching length of the prefix-set (mnemonic for greater than or equal to).

            Possible values: 1 ≤ value ≤ 32

            Examples:
          • The maximum matching length of the prefix-set (mnemonic for less than or equal to).

            Possible values: 1 ≤ value ≤ 32

            Examples:

          WithContext method only

          The CreateGatewayImportRouteFilter options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              action: 'permit',
              prefix: '192.168.100.0/24',
            };
            
            let res;
            try {
              res = await directLinkService.createGatewayImportRouteFilter(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • CreateGatewayImportRouteFilterOptions createGatewayImportRouteFilterOptions = new CreateGatewayImportRouteFilterOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .action("permit")
              .prefix("192.168.100.0/24")
              .build();
            
            Response<RouteFilter> response = directLinkService.createGatewayImportRouteFilter(createGatewayImportRouteFilterOptions).execute();
            RouteFilter routeFilter = response.getResult();
            
            System.out.println(routeFilter);
          • createGatewayImportRouteFilterOptions := directLinkService.NewCreateGatewayImportRouteFilterOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              "permit",
              "192.168.100.0/24",
            )
            
            routeFilter, response, err := directLinkService.CreateGatewayImportRouteFilter(createGatewayImportRouteFilterOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(routeFilter, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.create_gateway_import_route_filter(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              action='permit',
              prefix='192.168.100.0/24',
            )
            route_filter = response.get_result()
            
            print(json.dumps(route_filter, indent=2))

          Response

          Route filter

          Route filter.

          Route filter.

          Route filter.

          Route filter.

          Status Code

          • Direct Link gateway import route filter was created successfully.

          • The information given was invalid, malformed, or missing a required field.

          • The specified Direct Link gateway could not be found.

          Example responses
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Replace existing import route filters

          Replace all existing import route filters configured on the Direct Link gateway

          Replace all existing import route filters configured on the Direct Link gateway.

          Replace all existing import route filters configured on the Direct Link gateway.

          Replace all existing import route filters configured on the Direct Link gateway.

          Replace all existing import route filters configured on the Direct Link gateway.

          PUT /gateways/{gateway_id}/import_route_filters
          ServiceCall<ImportRouteFilterCollection> replaceGatewayImportRouteFilters(ReplaceGatewayImportRouteFiltersOptions replaceGatewayImportRouteFiltersOptions)
          replaceGatewayImportRouteFilters(params)
          replace_gateway_import_route_filters(
                  self,
                  gateway_id: str,
                  if_match: str,
                  *,
                  import_route_filters: List['GatewayTemplateRouteFilter'] = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ReplaceGatewayImportRouteFilters(replaceGatewayImportRouteFiltersOptions *ReplaceGatewayImportRouteFiltersOptions) (result *ImportRouteFilterCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ReplaceGatewayImportRouteFiltersWithContext(ctx context.Context, replaceGatewayImportRouteFiltersOptions *ReplaceGatewayImportRouteFiltersOptions) (result *ImportRouteFilterCollection, response *core.DetailedResponse, err error)

          Request

          Use the ReplaceGatewayImportRouteFiltersOptions.Builder to create a ReplaceGatewayImportRouteFiltersOptions object that contains the parameter values for the replaceGatewayImportRouteFilters method.

          Instantiate the ReplaceGatewayImportRouteFiltersOptions struct and set the fields to provide parameter values for the ReplaceGatewayImportRouteFilters method.

          Custom Headers

          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression (?:W\/)?"(?:[ !#-\x7E\x80-\xFF]*|\r\n[\t ]|\\.)*"

            Example: W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          Template for replacing existing import route filters

          The replaceGatewayImportRouteFilters options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression /(?:W\/)?\"(?:[ !#-\\x7E\\x80-\\xFF]*|\\r\\n[\\t ]|\\\\.)*\"/

            Examples:
          • Array of directional route filters for a Direct Link gateway. When creating a gateway or replacing existing route filters, the order of the items in the array will set the ordering of the list of route filters.

            Possible values: 0 ≤ number of items ≤ 100

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression /(?:W\/)?\"(?:[ !#-\\x7E\\x80-\\xFF]*|\\r\\n[\\t ]|\\\\.)*\"/

            Examples:
          • Array of directional route filters for a Direct Link gateway. When creating a gateway or replacing existing route filters, the order of the items in the array will set the ordering of the list of route filters.

            Possible values: 0 ≤ number of items ≤ 100

          WithContext method only

          The ReplaceGatewayImportRouteFilters options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              ifMatch: 'W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"',
            };
            
            let res;
            try {
              res = await directLinkService.replaceGatewayImportRouteFilters(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ReplaceGatewayImportRouteFiltersOptions replaceGatewayImportRouteFiltersOptions = new ReplaceGatewayImportRouteFiltersOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"")
              .build();
            
            Response<ImportRouteFilterCollection> response = directLinkService.replaceGatewayImportRouteFilters(replaceGatewayImportRouteFiltersOptions).execute();
            ImportRouteFilterCollection importRouteFilterCollection = response.getResult();
            
            System.out.println(importRouteFilterCollection);
          • replaceGatewayImportRouteFiltersOptions := directLinkService.NewReplaceGatewayImportRouteFiltersOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              `W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"`,
            )
            
            importRouteFilterCollection, response, err := directLinkService.ReplaceGatewayImportRouteFilters(replaceGatewayImportRouteFiltersOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(importRouteFilterCollection, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.replace_gateway_import_route_filters(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              if_match='W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"',
            )
            import_route_filter_collection = response.get_result()
            
            print(json.dumps(import_route_filter_collection, indent=2))

          Response

          Collection of import route filters

          Collection of import route filters.

          Collection of import route filters.

          Collection of import route filters.

          Collection of import route filters.

          Status Code

          • Import route filters replaced successfully.

          • The information given was invalid, malformed, or missing a required field.

          • The specified Direct Link gateway could not be found.

          • The provided If-Match value does not match the current ETag value of the export route filters

          Example responses
          • {
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ]
            }
          • {
              "import_route_filters": [
                {
                  "action": "permit",
                  "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
                  "created_at": "2021-11-15T12:08:05.000Z",
                  "ge": 25,
                  "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
                  "le": 32,
                  "prefix": "192.168.100.0/24",
                  "updated_at": "2021-11-15T12:08:05.000Z"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Remove import route filter from Direct Link gateway

          Delete an import route filter.

          Deleting an import route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          Delete an import route filter.

          Deleting an import route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          Delete an import route filter.

          Deleting an import route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          Delete an import route filter.

          Deleting an import route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          Delete an import route filter.

          Deleting an import route filter will implicitly update the preceding filter's before field to the filter that follows the deleted filter. The preceding filter will result with an empty before field if there is no filter following the deleted route filter.

          DELETE /gateways/{gateway_id}/import_route_filters/{id}
          ServiceCall<Void> deleteGatewayImportRouteFilter(DeleteGatewayImportRouteFilterOptions deleteGatewayImportRouteFilterOptions)
          deleteGatewayImportRouteFilter(params)
          delete_gateway_import_route_filter(
                  self,
                  gateway_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) DeleteGatewayImportRouteFilter(deleteGatewayImportRouteFilterOptions *DeleteGatewayImportRouteFilterOptions) (response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) DeleteGatewayImportRouteFilterWithContext(ctx context.Context, deleteGatewayImportRouteFilterOptions *DeleteGatewayImportRouteFilterOptions) (response *core.DetailedResponse, err error)

          Request

          Use the DeleteGatewayImportRouteFilterOptions.Builder to create a DeleteGatewayImportRouteFilterOptions object that contains the parameter values for the deleteGatewayImportRouteFilter method.

          Instantiate the DeleteGatewayImportRouteFilterOptions struct and set the fields to provide parameter values for the DeleteGatewayImportRouteFilter method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • Identifier of an import route filter

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The deleteGatewayImportRouteFilter options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The DeleteGatewayImportRouteFilter options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            try {
              await directLinkService.deleteGatewayImportRouteFilter(params);
            } catch (err) {
              console.warn(err);
            }
          • DeleteGatewayImportRouteFilterOptions deleteGatewayImportRouteFilterOptions = new DeleteGatewayImportRouteFilterOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<Void> response = directLinkService.deleteGatewayImportRouteFilter(deleteGatewayImportRouteFilterOptions).execute();
          • deleteGatewayImportRouteFilterOptions := directLinkService.NewDeleteGatewayImportRouteFilterOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
            )
            
            response, err := directLinkService.DeleteGatewayImportRouteFilter(deleteGatewayImportRouteFilterOptions)
            if err != nil {
              panic(err)
            }
            if response.StatusCode != 204 {
              fmt.Printf("\nUnexpected response status code received from DeleteGatewayImportRouteFilter(): %d\n", response.StatusCode)
            }
          • response = direct_link_service.delete_gateway_import_route_filter(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )

          Response

          Status Code

          • The import route filter was deleted successfully.

          • An export route filter with the specified identifier could not be found.

          Example responses
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Retrieves the specified Direct Link gateway import route filter

          Retrieve an import route filter from the Direct Link gateway.

          Retrieve an import route filter from the Direct Link gateway.

          Retrieve an import route filter from the Direct Link gateway.

          Retrieve an import route filter from the Direct Link gateway.

          Retrieve an import route filter from the Direct Link gateway.

          GET /gateways/{gateway_id}/import_route_filters/{id}
          ServiceCall<RouteFilter> getGatewayImportRouteFilter(GetGatewayImportRouteFilterOptions getGatewayImportRouteFilterOptions)
          getGatewayImportRouteFilter(params)
          get_gateway_import_route_filter(
                  self,
                  gateway_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) GetGatewayImportRouteFilter(getGatewayImportRouteFilterOptions *GetGatewayImportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetGatewayImportRouteFilterWithContext(ctx context.Context, getGatewayImportRouteFilterOptions *GetGatewayImportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)

          Request

          Use the GetGatewayImportRouteFilterOptions.Builder to create a GetGatewayImportRouteFilterOptions object that contains the parameter values for the getGatewayImportRouteFilter method.

          Instantiate the GetGatewayImportRouteFilterOptions struct and set the fields to provide parameter values for the GetGatewayImportRouteFilter method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • Identifier of an import route filter

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The getGatewayImportRouteFilter options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The GetGatewayImportRouteFilter options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.getGatewayImportRouteFilter(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GetGatewayImportRouteFilterOptions getGatewayImportRouteFilterOptions = new GetGatewayImportRouteFilterOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<RouteFilter> response = directLinkService.getGatewayImportRouteFilter(getGatewayImportRouteFilterOptions).execute();
            RouteFilter routeFilter = response.getResult();
            
            System.out.println(routeFilter);
          • getGatewayImportRouteFilterOptions := directLinkService.NewGetGatewayImportRouteFilterOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
            )
            
            routeFilter, response, err := directLinkService.GetGatewayImportRouteFilter(getGatewayImportRouteFilterOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(routeFilter, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.get_gateway_import_route_filter(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            route_filter = response.get_result()
            
            print(json.dumps(route_filter, indent=2))

          Response

          Route filter

          Route filter.

          Route filter.

          Route filter.

          Route filter.

          Status Code

          • The import route filter was retrieved successfully.

          • An import route filter with the specified identifier could not be found.

          Example responses
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find import route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find import route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Updates the specified Direct Link gateway import route filter

          Update an import route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          Update an import route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          Update an import route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          Update an import route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          Update an import route filter from the Direct Link gateway.

          Updating a route filter's before field will result in implicit updates to other route filters' before fields.

          Considering the updated filter prior to the update, the preceding route filter's before field will be set to the filter following the updating route filter, if present. Otherwise it is set to empty.

          Considering the updated filter after the update, if the new filter following the updated filter has an existing filter preceding it, that preceding filter's before field will be set to the updated filter.

          PATCH /gateways/{gateway_id}/import_route_filters/{id}
          ServiceCall<RouteFilter> updateGatewayImportRouteFilter(UpdateGatewayImportRouteFilterOptions updateGatewayImportRouteFilterOptions)
          updateGatewayImportRouteFilter(params)
          update_gateway_import_route_filter(
                  self,
                  gateway_id: str,
                  id: str,
                  update_route_filter_template: 'UpdateRouteFilterTemplate',
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) UpdateGatewayImportRouteFilter(updateGatewayImportRouteFilterOptions *UpdateGatewayImportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) UpdateGatewayImportRouteFilterWithContext(ctx context.Context, updateGatewayImportRouteFilterOptions *UpdateGatewayImportRouteFilterOptions) (result *RouteFilter, response *core.DetailedResponse, err error)

          Request

          Use the UpdateGatewayImportRouteFilterOptions.Builder to create a UpdateGatewayImportRouteFilterOptions object that contains the parameter values for the updateGatewayImportRouteFilter method.

          Instantiate the UpdateGatewayImportRouteFilterOptions struct and set the fields to provide parameter values for the UpdateGatewayImportRouteFilter method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • Identifier of an import route filter

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The import route filter update template

          The updateGatewayImportRouteFilter options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Determines whether routes that match the prefix-set will be allowed (permit) or rejected (deny) through the filter.

            Allowable values: [permit,deny]

            Examples:
          • Identifier of the next route filter considered if a route does not match the current filter. This property builds the ordering among route filters and follows semantics:

            • When before is an identifier of a route filter that exists and is in the same collection, a route will first attempt to match on the current filter before preceding to the filter referenced in this property.
            • When a filter is created with before that matches another filter in the same collection, the existing filter will take precedence. The before of the existing filter will be updated to refer to the newly created filter. The newly created filter will refer to the route filter identified by the provided before.
            • When a filter is created without a before, it takes the lowest precedence. The existing filter of lowest precedence will be updated to refer to the newly created filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The minimum matching length of the prefix-set (mnemonic for greater than or equal to).

            To clear the minimum matching length of the filter, patch the value to 0.

            Possible values: 0 ≤ value ≤ 32

            Examples:
          • The maximum matching length of the prefix-set (mnemonic for less than or equal to).

            To clear the maximum matching length of the filter, patch the value to 0.

            Possible values: 0 ≤ value ≤ 32

            Examples:
          • IP prefix representing an address and mask length of the prefix-set.

            Possible values: 7 ≤ length ≤ 18, Value must match regular expression /^([0-9]{1,3}\\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Identifier of an import route filter.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The route filter update template.

          WithContext method only

          The UpdateGatewayImportRouteFilter options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.updateGatewayImportRouteFilter(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • UpdateRouteFilterTemplate updateRouteFilterTemplateModel = new UpdateRouteFilterTemplate.Builder()
              .build();
            Map<String, Object> updateRouteFilterTemplateModelAsPatch = updateRouteFilterTemplateModel.asPatch();
            UpdateGatewayImportRouteFilterOptions updateGatewayImportRouteFilterOptions = new UpdateGatewayImportRouteFilterOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .updateRouteFilterTemplatePatch(updateRouteFilterTemplateModelAsPatch)
              .build();
            
            Response<RouteFilter> response = directLinkService.updateGatewayImportRouteFilter(updateGatewayImportRouteFilterOptions).execute();
            RouteFilter routeFilter = response.getResult();
            
            System.out.println(routeFilter);
          • updateRouteFilterTemplateModel := &directlinkv1.UpdateRouteFilterTemplate{
            }
            updateRouteFilterTemplateModelAsPatch, asPatchErr := updateRouteFilterTemplateModel.AsPatch()
            Expect(asPatchErr).To(BeNil())
            
            updateGatewayImportRouteFilterOptions := directLinkService.NewUpdateGatewayImportRouteFilterOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
              updateRouteFilterTemplateModelAsPatch,
            )
            
            routeFilter, response, err := directLinkService.UpdateGatewayImportRouteFilter(updateGatewayImportRouteFilterOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(routeFilter, "", "  ")
            fmt.Println(string(b))
          • update_route_filter_template_model = {
            }
            
            response = direct_link_service.update_gateway_import_route_filter(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              update_route_filter_template=update_route_filter_template_model,
            )
            route_filter = response.get_result()
            
            print(json.dumps(route_filter, indent=2))

          Response

          Route filter

          Route filter.

          Route filter.

          Route filter.

          Route filter.

          Status Code

          • The import route filter was updated successfully.

          • The information given was invalid, malformed, or missing a required field.

          • An export route filter with the specified identifier could not be found.

          Example responses
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "action": "permit",
              "before": "1a15dcab-7e40-45e1-b7c5-bc690eaa9782",
              "created_at": "2021-11-15T12:08:05.000Z",
              "ge": 25,
              "id": "1a15dcab-7e30-45e1-b7c5-bc690eaa9865",
              "le": 32,
              "prefix": "192.168.100.0/24",
              "updated_at": "2021-11-15T12:08:05.000Z"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find export route filter",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List route reports

          Retrieve all route reports for the specified Direct Link gateway.

          Retrieve all route reports for the specified Direct Link gateway.

          Retrieve all route reports for the specified Direct Link gateway.

          Retrieve all route reports for the specified Direct Link gateway.

          Retrieve all route reports for the specified Direct Link gateway.

          GET /gateways/{gateway_id}/route_reports
          ServiceCall<RouteReportCollection> listGatewayRouteReports(ListGatewayRouteReportsOptions listGatewayRouteReportsOptions)
          listGatewayRouteReports(params)
          list_gateway_route_reports(
                  self,
                  gateway_id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListGatewayRouteReports(listGatewayRouteReportsOptions *ListGatewayRouteReportsOptions) (result *RouteReportCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListGatewayRouteReportsWithContext(ctx context.Context, listGatewayRouteReportsOptions *ListGatewayRouteReportsOptions) (result *RouteReportCollection, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing event, depending on any listed conditions.

          • directlink.gateway.route-report.list

            A route report was listed.

          Request

          Use the ListGatewayRouteReportsOptions.Builder to create a ListGatewayRouteReportsOptions object that contains the parameter values for the listGatewayRouteReports method.

          Instantiate the ListGatewayRouteReportsOptions struct and set the fields to provide parameter values for the ListGatewayRouteReports method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listGatewayRouteReports options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The ListGatewayRouteReports options.

          • curl -X GET   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/route_reports?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.listGatewayRouteReports(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListGatewayRouteReportsOptions listGatewayRouteReportsOptions = new ListGatewayRouteReportsOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<RouteReportCollection> response = directLinkService.listGatewayRouteReports(listGatewayRouteReportsOptions).execute();
            RouteReportCollection routeReportCollection = response.getResult();
            
            System.out.println(routeReportCollection);
          • response = direct_link_service.list_gateway_route_reports(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            route_report_collection = response.get_result()
            
            print(json.dumps(route_report_collection, indent=2))

          Response

          route reports

          route reports.

          route reports.

          route reports.

          route reports.

          Status Code

          • Reports retrieved successfully.

          • The specified Direct Link gateway could not be found.

          Example responses
          • {
              "route_reports": [
                {
                  "advertised_routes": [
                    {
                      "as_path": "64999 64999 64998 I",
                      "prefix": "10.10.0.0/16"
                    }
                  ],
                  "created_at": "2020-11-02T23:05:52.724Z",
                  "gateway_routes": [
                    {
                      "prefix": "172.17.0.0/16"
                    }
                  ],
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                  "on_prem_routes": [
                    {
                      "as_path": "64999 64999 64998 I",
                      "next_hop": "10.10.0.0/16",
                      "prefix": "172.17.0.0/16"
                    }
                  ],
                  "overlapping_routes": [
                    {
                      "routes": [
                        {
                          "prefix": "172.17.0.0/16",
                          "type": "virtual_connection",
                          "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff"
                        }
                      ]
                    }
                  ],
                  "status": "complete",
                  "updated_at": "2020-11-02T23:05:52.724Z",
                  "virtual_connection_routes": [
                    {
                      "routes": [
                        {
                          "active": false,
                          "local_preference": "200",
                          "prefix": "172.17.0.0/16"
                        },
                        {
                          "active": true,
                          "local_preference": "200",
                          "prefix": "10.10.0.0/16"
                        }
                      ],
                      "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff",
                      "virtual_connection_name": "vpc1",
                      "virtual_connection_type": "vpc"
                    }
                  ]
                }
              ]
            }
          • {
              "route_reports": [
                {
                  "advertised_routes": [
                    {
                      "as_path": "64999 64999 64998 I",
                      "prefix": "10.10.0.0/16"
                    }
                  ],
                  "created_at": "2020-11-02T23:05:52.724Z",
                  "gateway_routes": [
                    {
                      "prefix": "172.17.0.0/16"
                    }
                  ],
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                  "on_prem_routes": [
                    {
                      "as_path": "64999 64999 64998 I",
                      "next_hop": "10.10.0.0/16",
                      "prefix": "172.17.0.0/16"
                    }
                  ],
                  "overlapping_routes": [
                    {
                      "routes": [
                        {
                          "prefix": "172.17.0.0/16",
                          "type": "virtual_connection",
                          "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff"
                        }
                      ]
                    }
                  ],
                  "status": "complete",
                  "updated_at": "2020-11-02T23:05:52.724Z",
                  "virtual_connection_routes": [
                    {
                      "routes": [
                        {
                          "active": false,
                          "local_preference": "200",
                          "prefix": "172.17.0.0/16"
                        },
                        {
                          "active": true,
                          "local_preference": "200",
                          "prefix": "10.10.0.0/16"
                        }
                      ],
                      "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff",
                      "virtual_connection_name": "vpc1",
                      "virtual_connection_type": "vpc"
                    }
                  ]
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Request a route report

          Request route report generation. While report generation is in progress, additional requests to generate a report are ignored and return the current pending report. While status is pending, gateway_routes, on_prem_routes, virtual_connection_routes, and overlapping_routes will be empty arrays. These fields will be filled when the status enters the complete status. Call get_gateway_route_report with the pending route report's id to check on the current status of the report.

          Request route report generation. While report generation is in progress, additional requests to generate a report are ignored and return the current pending report. While status is pending, gateway_routes, on_prem_routes, virtual_connection_routes, and overlapping_routes will be empty arrays. These fields will be filled when the status enters the complete status. Call get_gateway_route_report with the pending route report's id to check on the current status of the report.

          Request route report generation. While report generation is in progress, additional requests to generate a report are ignored and return the current pending report. While status is pending, gateway_routes, on_prem_routes, virtual_connection_routes, and overlapping_routes will be empty arrays. These fields will be filled when the status enters the complete status. Call get_gateway_route_report with the pending route report's id to check on the current status of the report.

          Request route report generation. While report generation is in progress, additional requests to generate a report are ignored and return the current pending report. While status is pending, gateway_routes, on_prem_routes, virtual_connection_routes, and overlapping_routes will be empty arrays. These fields will be filled when the status enters the complete status. Call get_gateway_route_report with the pending route report's id to check on the current status of the report.

          Request route report generation. While report generation is in progress, additional requests to generate a report are ignored and return the current pending report. While status is pending, gateway_routes, on_prem_routes, virtual_connection_routes, and overlapping_routes will be empty arrays. These fields will be filled when the status enters the complete status. Call get_gateway_route_report with the pending route report's id to check on the current status of the report.

          POST /gateways/{gateway_id}/route_reports
          ServiceCall<RouteReport> createGatewayRouteReport(CreateGatewayRouteReportOptions createGatewayRouteReportOptions)
          createGatewayRouteReport(params)
          create_gateway_route_report(
                  self,
                  gateway_id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) CreateGatewayRouteReport(createGatewayRouteReportOptions *CreateGatewayRouteReportOptions) (result *RouteReport, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) CreateGatewayRouteReportWithContext(ctx context.Context, createGatewayRouteReportOptions *CreateGatewayRouteReportOptions) (result *RouteReport, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing event, depending on any listed conditions.

          • directlink.gateway.route-report.create

            A route report was created.

          Request

          Use the CreateGatewayRouteReportOptions.Builder to create a CreateGatewayRouteReportOptions object that contains the parameter values for the createGatewayRouteReport method.

          Instantiate the CreateGatewayRouteReportOptions struct and set the fields to provide parameter values for the CreateGatewayRouteReport method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The createGatewayRouteReport options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The CreateGatewayRouteReport options.

          • curl -X POST   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/route_reports?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.createGatewayRouteReport(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • CreateGatewayRouteReportOptions createGatewayRouteReportOptions = new CreateGatewayRouteReportOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<RouteReport> response = directLinkService.createGatewayRouteReport(createGatewayRouteReportOptions).execute();
            RouteReport routeReport = response.getResult();
            
            System.out.println(routeReport);
          • response = direct_link_service.create_gateway_route_report(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            route_report = response.get_result()
            
            print(json.dumps(route_report, indent=2))

          Response

          route report

          route report.

          route report.

          route report.

          route report.

          Status Code

          • Route report request successful. If not already in progress, report generation has begun.

          • The specified Direct Link gateway could not be found.

          Example responses
          • {
              "advertised_routes": [
                {
                  "as_path": "64999 64999 64998 I",
                  "prefix": "10.10.0.0/16"
                }
              ],
              "created_at": "2020-11-02T23:05:52.724Z",
              "gateway_routes": [
                {
                  "prefix": "172.17.0.0/16"
                }
              ],
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "on_prem_routes": [
                {
                  "as_path": "64999 64999 64998 I",
                  "next_hop": "10.10.0.0/16",
                  "prefix": "172.17.0.0/16"
                }
              ],
              "overlapping_routes": [
                {
                  "routes": [
                    {
                      "prefix": "172.17.0.0/16",
                      "type": "virtual_connection",
                      "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff"
                    }
                  ]
                }
              ],
              "status": "complete",
              "updated_at": "2020-11-02T23:05:52.724Z",
              "virtual_connection_routes": [
                {
                  "routes": [
                    {
                      "active": false,
                      "local_preference": "200",
                      "prefix": "172.17.0.0/16"
                    },
                    {
                      "active": true,
                      "local_preference": "200",
                      "prefix": "10.10.0.0/16"
                    }
                  ],
                  "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff",
                  "virtual_connection_name": "vpc1",
                  "virtual_connection_type": "vpc"
                }
              ]
            }
          • {
              "advertised_routes": [
                {
                  "as_path": "64999 64999 64998 I",
                  "prefix": "10.10.0.0/16"
                }
              ],
              "created_at": "2020-11-02T23:05:52.724Z",
              "gateway_routes": [
                {
                  "prefix": "172.17.0.0/16"
                }
              ],
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "on_prem_routes": [
                {
                  "as_path": "64999 64999 64998 I",
                  "next_hop": "10.10.0.0/16",
                  "prefix": "172.17.0.0/16"
                }
              ],
              "overlapping_routes": [
                {
                  "routes": [
                    {
                      "prefix": "172.17.0.0/16",
                      "type": "virtual_connection",
                      "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff"
                    }
                  ]
                }
              ],
              "status": "complete",
              "updated_at": "2020-11-02T23:05:52.724Z",
              "virtual_connection_routes": [
                {
                  "routes": [
                    {
                      "active": false,
                      "local_preference": "200",
                      "prefix": "172.17.0.0/16"
                    },
                    {
                      "active": true,
                      "local_preference": "200",
                      "prefix": "10.10.0.0/16"
                    }
                  ],
                  "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff",
                  "virtual_connection_name": "vpc1",
                  "virtual_connection_type": "vpc"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Delete route report

          Delete a route report.

          Delete a route report.

          Delete a route report.

          Delete a route report.

          Delete a route report.

          DELETE /gateways/{gateway_id}/route_reports/{id}
          ServiceCall<Void> deleteGatewayRouteReport(DeleteGatewayRouteReportOptions deleteGatewayRouteReportOptions)
          deleteGatewayRouteReport(params)
          delete_gateway_route_report(
                  self,
                  gateway_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) DeleteGatewayRouteReport(deleteGatewayRouteReportOptions *DeleteGatewayRouteReportOptions) (response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) DeleteGatewayRouteReportWithContext(ctx context.Context, deleteGatewayRouteReportOptions *DeleteGatewayRouteReportOptions) (response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing event, depending on any listed conditions.

          • directlink.gateway.route-report.delete

            A route report was deleted.

          Request

          Use the DeleteGatewayRouteReportOptions.Builder to create a DeleteGatewayRouteReportOptions object that contains the parameter values for the deleteGatewayRouteReport method.

          Instantiate the DeleteGatewayRouteReportOptions struct and set the fields to provide parameter values for the DeleteGatewayRouteReport method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • Route report identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The deleteGatewayRouteReport options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Route report identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Route report identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The DeleteGatewayRouteReport options.

          • curl -X DELETE   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/route_reports/$REPORT_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            try {
              await directLinkService.deleteGatewayRouteReport(params);
            } catch (err) {
              console.warn(err);
            }
          • DeleteGatewayRouteReportOptions deleteGatewayRouteReportOptions = new DeleteGatewayRouteReportOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<Void> response = directLinkService.deleteGatewayRouteReport(deleteGatewayRouteReportOptions).execute();
          • response = direct_link_service.delete_gateway_route_report(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )

          Response

          Status Code

          • Route report deleted successfully.

          • A Direct Link gateway or route report with the specified identifier could not be found.

          Example responses
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Route report not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Route report not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Retrieve route report

          Retrieve a route report.

          Retrieve a route report.

          Retrieve a route report.

          Retrieve a route report.

          Retrieve a route report.

          GET /gateways/{gateway_id}/route_reports/{id}
          ServiceCall<RouteReport> getGatewayRouteReport(GetGatewayRouteReportOptions getGatewayRouteReportOptions)
          getGatewayRouteReport(params)
          get_gateway_route_report(
                  self,
                  gateway_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) GetGatewayRouteReport(getGatewayRouteReportOptions *GetGatewayRouteReportOptions) (result *RouteReport, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetGatewayRouteReportWithContext(ctx context.Context, getGatewayRouteReportOptions *GetGatewayRouteReportOptions) (result *RouteReport, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing event, depending on any listed conditions.

          • directlink.gateway.route-report.read

            A route report was retrieved.

          Request

          Use the GetGatewayRouteReportOptions.Builder to create a GetGatewayRouteReportOptions object that contains the parameter values for the getGatewayRouteReport method.

          Instantiate the GetGatewayRouteReportOptions struct and set the fields to provide parameter values for the GetGatewayRouteReport method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • Route report identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The getGatewayRouteReport options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Route report identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • Route report identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The GetGatewayRouteReport options.

          • curl -X GET   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/route_reports/$REPORT_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.getGatewayRouteReport(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GetGatewayRouteReportOptions getGatewayRouteReportOptions = new GetGatewayRouteReportOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<RouteReport> response = directLinkService.getGatewayRouteReport(getGatewayRouteReportOptions).execute();
            RouteReport routeReport = response.getResult();
            
            System.out.println(routeReport);
          • response = direct_link_service.get_gateway_route_report(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            route_report = response.get_result()
            
            print(json.dumps(route_report, indent=2))

          Response

          route report

          route report.

          route report.

          route report.

          route report.

          Status Code

          • Route report retrieved successfully.

          • A route report or gateway with the specified identifier(s) could not be found.

          Example responses
          • {
              "advertised_routes": [
                {
                  "as_path": "64999 64999 64998 I",
                  "prefix": "10.10.0.0/16"
                }
              ],
              "created_at": "2020-11-02T23:05:52.724Z",
              "gateway_routes": [
                {
                  "prefix": "172.17.0.0/16"
                }
              ],
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "on_prem_routes": [
                {
                  "as_path": "64999 64999 64998 I",
                  "next_hop": "10.10.0.0/16",
                  "prefix": "172.17.0.0/16"
                }
              ],
              "overlapping_routes": [
                {
                  "routes": [
                    {
                      "prefix": "172.17.0.0/16",
                      "type": "virtual_connection",
                      "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff"
                    }
                  ]
                }
              ],
              "status": "complete",
              "updated_at": "2020-11-02T23:05:52.724Z",
              "virtual_connection_routes": [
                {
                  "routes": [
                    {
                      "active": false,
                      "local_preference": "200",
                      "prefix": "172.17.0.0/16"
                    },
                    {
                      "active": true,
                      "local_preference": "200",
                      "prefix": "10.10.0.0/16"
                    }
                  ],
                  "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff",
                  "virtual_connection_name": "vpc1",
                  "virtual_connection_type": "vpc"
                }
              ]
            }
          • {
              "advertised_routes": [
                {
                  "as_path": "64999 64999 64998 I",
                  "prefix": "10.10.0.0/16"
                }
              ],
              "created_at": "2020-11-02T23:05:52.724Z",
              "gateway_routes": [
                {
                  "prefix": "172.17.0.0/16"
                }
              ],
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "on_prem_routes": [
                {
                  "as_path": "64999 64999 64998 I",
                  "next_hop": "10.10.0.0/16",
                  "prefix": "172.17.0.0/16"
                }
              ],
              "overlapping_routes": [
                {
                  "routes": [
                    {
                      "prefix": "172.17.0.0/16",
                      "type": "virtual_connection",
                      "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff"
                    }
                  ]
                }
              ],
              "status": "complete",
              "updated_at": "2020-11-02T23:05:52.724Z",
              "virtual_connection_routes": [
                {
                  "routes": [
                    {
                      "active": false,
                      "local_preference": "200",
                      "prefix": "172.17.0.0/16"
                    },
                    {
                      "active": true,
                      "local_preference": "200",
                      "prefix": "10.10.0.0/16"
                    }
                  ],
                  "virtual_connection_id": "d2d985d8-1d8e-4e8b-96cd-cee2290ecaff",
                  "virtual_connection_name": "vpc1",
                  "virtual_connection_type": "vpc"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Route report not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Route report not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List virtual connections

          List a gateway's virtual connections.
          For gateway in other account with virtual connections that connect to network in this account. Only virtual connections that connect to this account are returned.

          List a gateway's virtual connections. For gateway in other account with virtual connections that connect to network in this account. Only virtual connections that connect to this account are returned.

          List a gateway's virtual connections. For gateway in other account with virtual connections that connect to network in this account. Only virtual connections that connect to this account are returned.

          List a gateway's virtual connections. For gateway in other account with virtual connections that connect to network in this account. Only virtual connections that connect to this account are returned.

          List a gateway's virtual connections. For gateway in other account with virtual connections that connect to network in this account. Only virtual connections that connect to this account are returned.

          GET /gateways/{gateway_id}/virtual_connections
          ServiceCall<GatewayVirtualConnectionCollection> listGatewayVirtualConnections(ListGatewayVirtualConnectionsOptions listGatewayVirtualConnectionsOptions)
          listGatewayVirtualConnections(params)
          list_gateway_virtual_connections(
                  self,
                  gateway_id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListGatewayVirtualConnections(listGatewayVirtualConnectionsOptions *ListGatewayVirtualConnectionsOptions) (result *GatewayVirtualConnectionCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListGatewayVirtualConnectionsWithContext(ctx context.Context, listGatewayVirtualConnectionsOptions *ListGatewayVirtualConnectionsOptions) (result *GatewayVirtualConnectionCollection, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing events, depending on any listed conditions.

          Depending on the type of offering_type of the gateway, one of the following events is generated.

          • directlink.dedicated.virtual-connection.list

            A Dedicated gateway's virtual connections were listed.

          • directlink.connect.virtual-connection.list

            A Connect gateway's virtual connections were listed.

          Request

          Use the ListGatewayVirtualConnectionsOptions.Builder to create a ListGatewayVirtualConnectionsOptions object that contains the parameter values for the listGatewayVirtualConnections method.

          Instantiate the ListGatewayVirtualConnectionsOptions struct and set the fields to provide parameter values for the ListGatewayVirtualConnections method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listGatewayVirtualConnections options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The ListGatewayVirtualConnections options.

          • curl -X GET   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/virtual_connections?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.listGatewayVirtualConnections(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListGatewayVirtualConnectionsOptions listGatewayVirtualConnectionsOptions = new ListGatewayVirtualConnectionsOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<GatewayVirtualConnectionCollection> response = directLinkService.listGatewayVirtualConnections(listGatewayVirtualConnectionsOptions).execute();
            GatewayVirtualConnectionCollection gatewayVirtualConnectionCollection = response.getResult();
            
            System.out.println(gatewayVirtualConnectionCollection);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              listGatewayVCOptions := directLink.NewListGatewayVirtualConnectionsOptions(${gatewayID})
              result, response, responseErr := directLink.ListGatewayVirtualConnections(listGatewayVCOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.list_gateway_virtual_connections(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            gateway_virtual_connection_collection = response.get_result()
            
            print(json.dumps(gateway_virtual_connection_collection, indent=2))

          Response

          Virtual connection collection

          Virtual connection collection.

          Virtual connection collection.

          Virtual connection collection.

          Virtual connection collection.

          Status Code

          • The virtual connections were retrieved successfully.

          • The specified virtual connection could not be found.

          Example responses
          • {
              "virtual_connections": [
                {
                  "created_at": "2020-11-02T23:05:52.724Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                  "name": "newVC",
                  "network_account": "00aa14a2e0fb102c8995ebefff865555",
                  "network_id": "crn:[...]",
                  "status": "attached",
                  "type": "vpc"
                }
              ]
            }
          • {
              "virtual_connections": [
                {
                  "created_at": "2020-11-02T23:05:52.724Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                  "name": "newVC",
                  "network_account": "00aa14a2e0fb102c8995ebefff865555",
                  "network_id": "crn:[...]",
                  "status": "attached",
                  "type": "vpc"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Create virtual connection

          Create a virtual connection to the specified network.

          Create a virtual connection to the specified network.

          Create a virtual connection to the specified network.

          Create a virtual connection to the specified network.

          Create a virtual connection to the specified network.

          POST /gateways/{gateway_id}/virtual_connections
          ServiceCall<GatewayVirtualConnection> createGatewayVirtualConnection(CreateGatewayVirtualConnectionOptions createGatewayVirtualConnectionOptions)
          createGatewayVirtualConnection(params)
          create_gateway_virtual_connection(
                  self,
                  gateway_id: str,
                  name: str,
                  type: str,
                  *,
                  network_id: str = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) CreateGatewayVirtualConnection(createGatewayVirtualConnectionOptions *CreateGatewayVirtualConnectionOptions) (result *GatewayVirtualConnection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) CreateGatewayVirtualConnectionWithContext(ctx context.Context, createGatewayVirtualConnectionOptions *CreateGatewayVirtualConnectionOptions) (result *GatewayVirtualConnection, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing events, depending on any listed conditions.

          Depending on the type of offering_type of the gateway, one of the following events is generated.

          • directlink.dedicated.virtual-connection.create

            A Dedicated virtual connection was created.

          • directlink.connect.virtual-connection.create

            A Connect virtual connection was created.

          Request

          Use the CreateGatewayVirtualConnectionOptions.Builder to create a CreateGatewayVirtualConnectionOptions object that contains the parameter values for the createGatewayVirtualConnection method.

          Instantiate the CreateGatewayVirtualConnectionOptions struct and set the fields to provide parameter values for the CreateGatewayVirtualConnection method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The virtual connection template

          The createGatewayVirtualConnection options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The user-defined name for this virtual connection. Virtual connection names are unique within a gateway. This is the name of the virtual connection itself, the network being connected may have its own name attribute.

            Possible values: 1 ≤ length ≤ 63, Value must match regular expression /^([a-zA-Z]|[a-zA-Z][-_a-zA-Z0-9]*[a-zA-Z0-9])$/

            Examples:
          • The type of virtual connection.

            Allowable values: [classic,vpc]

            Examples:
          • Unique identifier of the target network. For type=vpc virtual connections this is the CRN of the target VPC. This field does not apply to type=classic connections.

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The user-defined name for this virtual connection. Virtual connection names are unique within a gateway. This is the name of the virtual connection itself, the network being connected may have its own name attribute.

            Possible values: 1 ≤ length ≤ 63, Value must match regular expression /^([a-zA-Z]|[a-zA-Z][-_a-zA-Z0-9]*[a-zA-Z0-9])$/

            Examples:
          • The type of virtual connection.

            Allowable values: [classic,vpc]

            Examples:
          • Unique identifier of the target network. For type=vpc virtual connections this is the CRN of the target VPC. This field does not apply to type=classic connections.

            Examples:

          WithContext method only

          The CreateGatewayVirtualConnection options.

          • curl -X POST   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/virtual_connections?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"   -d '{
                    "type": "vpc",
                    "name": "my-example-connection",
                    "network_id": "$VPC_CRN"
                  }'
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              name: 'newVC',
              type: 'vpc',
            };
            
            let res;
            try {
              res = await directLinkService.createGatewayVirtualConnection(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • CreateGatewayVirtualConnectionOptions createGatewayVirtualConnectionOptions = new CreateGatewayVirtualConnectionOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .name("newVC")
              .type("vpc")
              .build();
            
            Response<GatewayVirtualConnection> response = directLinkService.createGatewayVirtualConnection(createGatewayVirtualConnectionOptions).execute();
            GatewayVirtualConnection gatewayVirtualConnection = response.getResult();
            
            System.out.println(gatewayVirtualConnection);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              vcName := "virtual-connection-name"
              createGatewayVCOptions := directLink.NewCreateGatewayVirtualConnectionOptions(${gatewayID}, vcName, directlinkv1.CreateGatewayVirtualConnectionOptions_Type_Vpc)
              createGatewayVCOptions = createGatewayVCOptions.SetNetworkID(${vpcCrn})
              result, response, responseErr := directLink.CreateGatewayVirtualConnection(createGatewayVCOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              vcName := "virtual-connection-name"
              createGatewayVCOptions := directLink.NewListGatewayVirtualConnectionsOptions(${gatewayID}, vcName, directlinkv1.CreateGatewayVirtualConnectionOptions_Type_Classic)
              result, response, responseErr := directLink.CreateGatewayVirtualConnection(createGatewayVCOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.create_gateway_virtual_connection(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              name='newVC',
              type='vpc',
            )
            gateway_virtual_connection = response.get_result()
            
            print(json.dumps(gateway_virtual_connection, indent=2))

          Response

          Virtual connection

          Virtual connection.

          Virtual connection.

          Virtual connection.

          Virtual connection.

          Status Code

          • The virtual connection was created successfully.

          • An invalid template was provided.

          • The specified gateway could not be found.

          Example responses
          • {
              "created_at": "2020-11-02T23:05:52.724Z",
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "name": "newVC",
              "network_account": "00aa14a2e0fb102c8995ebefff865555",
              "network_id": "crn:[...]",
              "status": "attached",
              "type": "vpc"
            }
          • {
              "created_at": "2020-11-02T23:05:52.724Z",
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "name": "newVC",
              "network_account": "00aa14a2e0fb102c8995ebefff865555",
              "network_id": "crn:[...]",
              "status": "attached",
              "type": "vpc"
            }
          • {
              "errors": [
                {
                  "code": "validation_required_field_missing",
                  "message": "Mandatory field is missing.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "type",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "validation_required_field_missing",
                  "message": "Mandatory field is missing.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "type",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find Gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Delete virtual connection

          Delete the virtual connection.

          Delete the virtual connection.

          Delete the virtual connection.

          Delete the virtual connection.

          Delete the virtual connection.

          DELETE /gateways/{gateway_id}/virtual_connections/{id}
          ServiceCall<Void> deleteGatewayVirtualConnection(DeleteGatewayVirtualConnectionOptions deleteGatewayVirtualConnectionOptions)
          deleteGatewayVirtualConnection(params)
          delete_gateway_virtual_connection(
                  self,
                  gateway_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) DeleteGatewayVirtualConnection(deleteGatewayVirtualConnectionOptions *DeleteGatewayVirtualConnectionOptions) (response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) DeleteGatewayVirtualConnectionWithContext(ctx context.Context, deleteGatewayVirtualConnectionOptions *DeleteGatewayVirtualConnectionOptions) (response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing events, depending on any listed conditions.

          Depending on the type of offering_type of the gateway, one of the following events is generated.

          • directlink.dedicated.virtual-connection.delete

            A Dedicated virtual connection was deleted.

          • directlink.connect.virtual-connection.delete

            A Connect virtual connection was deleted.

          Request

          Use the DeleteGatewayVirtualConnectionOptions.Builder to create a DeleteGatewayVirtualConnectionOptions object that contains the parameter values for the deleteGatewayVirtualConnection method.

          Instantiate the DeleteGatewayVirtualConnectionOptions struct and set the fields to provide parameter values for the DeleteGatewayVirtualConnection method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • The virtual connection identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The deleteGatewayVirtualConnection options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The virtual connection identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The virtual connection identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The DeleteGatewayVirtualConnection options.

          • curl -X DELETE   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/virtual_connections/$VIRTUAL_CONNECTION_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            try {
              await directLinkService.deleteGatewayVirtualConnection(params);
            } catch (err) {
              console.warn(err);
            }
          • DeleteGatewayVirtualConnectionOptions deleteGatewayVirtualConnectionOptions = new DeleteGatewayVirtualConnectionOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<Void> response = directLinkService.deleteGatewayVirtualConnection(deleteGatewayVirtualConnectionOptions).execute();
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              deleteGatewayVCOptions := directLink.NewDeleteGatewayVirtualConnectionOptions(${gatewayID}, ${virtualConnectionID})
              result, responseErr := directLink.DeleteGatewayVirtualConnection(deleteGatewayVCOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.delete_gateway_virtual_connection(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )

          Response

          Status Code

          • The virtual connection was removed successfully.

          • A virtual connection with the specified identifier could not be found.

          Example responses
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find a VirtualConnection",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find a VirtualConnection",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Get virtual connection

          Retrieve a virtual connection.

          Retrieve a virtual connection.

          Retrieve a virtual connection.

          Retrieve a virtual connection.

          Retrieve a virtual connection.

          GET /gateways/{gateway_id}/virtual_connections/{id}
          ServiceCall<GatewayVirtualConnection> getGatewayVirtualConnection(GetGatewayVirtualConnectionOptions getGatewayVirtualConnectionOptions)
          getGatewayVirtualConnection(params)
          get_gateway_virtual_connection(
                  self,
                  gateway_id: str,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) GetGatewayVirtualConnection(getGatewayVirtualConnectionOptions *GetGatewayVirtualConnectionOptions) (result *GatewayVirtualConnection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetGatewayVirtualConnectionWithContext(ctx context.Context, getGatewayVirtualConnectionOptions *GetGatewayVirtualConnectionOptions) (result *GatewayVirtualConnection, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing events, depending on any listed conditions.

          Depending on the type of offering_type of the gateway, one of the following events is generated.

          • directlink.dedicated.virtual-connection.read

            A Dedicated virtual connection was retrieved.

          • directlink.connect.virtual-connection.read

            A Connect virtual connection was retrieved.

          Request

          Use the GetGatewayVirtualConnectionOptions.Builder to create a GetGatewayVirtualConnectionOptions object that contains the parameter values for the getGatewayVirtualConnection method.

          Instantiate the GetGatewayVirtualConnectionOptions struct and set the fields to provide parameter values for the GetGatewayVirtualConnection method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • The virtual connection identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The getGatewayVirtualConnection options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The virtual connection identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The virtual connection identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The GetGatewayVirtualConnection options.

          • curl -X GET   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/virtual_connections/$VIRTUAL_CONNECTION_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.getGatewayVirtualConnection(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GetGatewayVirtualConnectionOptions getGatewayVirtualConnectionOptions = new GetGatewayVirtualConnectionOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<GatewayVirtualConnection> response = directLinkService.getGatewayVirtualConnection(getGatewayVirtualConnectionOptions).execute();
            GatewayVirtualConnection gatewayVirtualConnection = response.getResult();
            
            System.out.println(gatewayVirtualConnection);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              getGatewayVCOptions := directLink.NewGetGatewayVirtualConnectionOptions(${gatewayID}, ${virtualConnectionID})
              result, response, responseErr := directLink.GetGatewayVirtualConnection(getGatewayVCOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.get_gateway_virtual_connection(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            gateway_virtual_connection = response.get_result()
            
            print(json.dumps(gateway_virtual_connection, indent=2))

          Response

          Virtual connection

          Virtual connection.

          Virtual connection.

          Virtual connection.

          Virtual connection.

          Status Code

          • The virtual connection was retrieved successfully.

          • A virtual connection with the specified identifier could not be found.

          Example responses
          • {
              "created_at": "2020-11-02T23:05:52.724Z",
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "name": "newVC",
              "network_account": "00aa14a2e0fb102c8995ebefff865555",
              "network_id": "crn:[...]",
              "status": "attached",
              "type": "vpc"
            }
          • {
              "created_at": "2020-11-02T23:05:52.724Z",
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "name": "newVC",
              "network_account": "00aa14a2e0fb102c8995ebefff865555",
              "network_id": "crn:[...]",
              "status": "attached",
              "type": "vpc"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find a VirtualConnection",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find a VirtualConnection",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Update virtual connection

          Update a virtual connection.

          Update a virtual connection.

          Update a virtual connection.

          Update a virtual connection.

          Update a virtual connection.

          PATCH /gateways/{gateway_id}/virtual_connections/{id}
          ServiceCall<GatewayVirtualConnection> updateGatewayVirtualConnection(UpdateGatewayVirtualConnectionOptions updateGatewayVirtualConnectionOptions)
          updateGatewayVirtualConnection(params)
          update_gateway_virtual_connection(
                  self,
                  gateway_id: str,
                  id: str,
                  *,
                  name: str = None,
                  status: str = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) UpdateGatewayVirtualConnection(updateGatewayVirtualConnectionOptions *UpdateGatewayVirtualConnectionOptions) (result *GatewayVirtualConnection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) UpdateGatewayVirtualConnectionWithContext(ctx context.Context, updateGatewayVirtualConnectionOptions *UpdateGatewayVirtualConnectionOptions) (result *GatewayVirtualConnection, response *core.DetailedResponse, err error)

          Auditing

          Calling this method generates the following auditing events, depending on any listed conditions.

          Depending on the type of offering_type of the gateway, one of the following events is generated.

          • directlink.dedicated.virtual-connection.update

            A Dedicated virtual connection was updated.

          • directlink.connect.virtual-connection.update

            A Connect virtual connection was updated.

          Request

          Use the UpdateGatewayVirtualConnectionOptions.Builder to create a UpdateGatewayVirtualConnectionOptions object that contains the parameter values for the updateGatewayVirtualConnection method.

          Instantiate the UpdateGatewayVirtualConnectionOptions struct and set the fields to provide parameter values for the UpdateGatewayVirtualConnection method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          • The virtual connection identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The virtual connection patch template

          The updateGatewayVirtualConnection options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The virtual connection identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The user-defined name for this virtual connection. Virtual connection names are unique within a gateway. This is the name of the virtual connection itself, the network being connected may have its own name attribute.

            Possible values: 1 ≤ length ≤ 63, Value must match regular expression /^([a-zA-Z]|[a-zA-Z][-_a-zA-Z0-9]*[a-zA-Z0-9])$/

            Examples:
          • Status of the virtual connection. Virtual connections that span IBM Cloud Accounts are created in approval_pending status. The owner of the target network can accept or reject connection requests by patching status to attached or rejected respectively.

            Allowable values: [attached,rejected]

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The virtual connection identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • The user-defined name for this virtual connection. Virtual connection names are unique within a gateway. This is the name of the virtual connection itself, the network being connected may have its own name attribute.

            Possible values: 1 ≤ length ≤ 63, Value must match regular expression /^([a-zA-Z]|[a-zA-Z][-_a-zA-Z0-9]*[a-zA-Z0-9])$/

            Examples:
          • Status of the virtual connection. Virtual connections that span IBM Cloud Accounts are created in approval_pending status. The owner of the target network can accept or reject connection requests by patching status to attached or rejected respectively.

            Allowable values: [attached,rejected]

            Examples:

          WithContext method only

          The UpdateGatewayVirtualConnection options.

          • curl -X PATCH   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/virtual_connections/$VIRTUAL_CONNECTION_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"   -d '{
                    "name": "new-name"
                  }'
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.updateGatewayVirtualConnection(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • UpdateGatewayVirtualConnectionOptions updateGatewayVirtualConnectionOptions = new UpdateGatewayVirtualConnectionOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<GatewayVirtualConnection> response = directLinkService.updateGatewayVirtualConnection(updateGatewayVirtualConnectionOptions).execute();
            GatewayVirtualConnection gatewayVirtualConnection = response.getResult();
            
            System.out.println(gatewayVirtualConnection);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              patchGatewayVCOptions := directLink.NewUpdateGatewayVirtualConnectionOptions(${gatewayID}, ${virtualConnectionID})
              patchGatewayVCOptions = patchGatewayVCOptions.SetStatus(directlinkv1.UpdateGatewayVirtualConnectionOptions_Status_Rejected)
              result, response, responseErr := directLink.UpdateGatewayVirtualConnection(patchGatewayVCOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.update_gateway_virtual_connection(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            gateway_virtual_connection = response.get_result()
            
            print(json.dumps(gateway_virtual_connection, indent=2))

          Response

          Virtual connection

          Virtual connection.

          Virtual connection.

          Virtual connection.

          Virtual connection.

          Status Code

          • The virtual connection was updated successfully.

          • The request was invalid.

          • A virtual connection with the specified identifier could not be found.

          Example responses
          • {
              "created_at": "2020-11-02T23:05:52.724Z",
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "name": "newVC",
              "network_account": "00aa14a2e0fb102c8995ebefff865555",
              "network_id": "crn:[...]",
              "status": "attached",
              "type": "vpc"
            }
          • {
              "created_at": "2020-11-02T23:05:52.724Z",
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "name": "newVC",
              "network_account": "00aa14a2e0fb102c8995ebefff865555",
              "network_id": "crn:[...]",
              "status": "attached",
              "type": "vpc"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "request_body",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "request_body",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find a VirtualConnection",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find a VirtualConnection",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List available locations

          Retrieve the list of valid locations for the specified Direct Link offering.

          Retrieve the list of valid locations for the specified Direct Link offering.

          Retrieve the list of valid locations for the specified Direct Link offering.

          Retrieve the list of valid locations for the specified Direct Link offering.

          Retrieve the list of valid locations for the specified Direct Link offering.

          GET /offering_types/{offering_type}/locations
          ServiceCall<LocationCollection> listOfferingTypeLocations(ListOfferingTypeLocationsOptions listOfferingTypeLocationsOptions)
          listOfferingTypeLocations(params)
          list_offering_type_locations(
                  self,
                  offering_type: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListOfferingTypeLocations(listOfferingTypeLocationsOptions *ListOfferingTypeLocationsOptions) (result *LocationCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListOfferingTypeLocationsWithContext(ctx context.Context, listOfferingTypeLocationsOptions *ListOfferingTypeLocationsOptions) (result *LocationCollection, response *core.DetailedResponse, err error)

          Request

          Use the ListOfferingTypeLocationsOptions.Builder to create a ListOfferingTypeLocationsOptions object that contains the parameter values for the listOfferingTypeLocations method.

          Instantiate the ListOfferingTypeLocationsOptions struct and set the fields to provide parameter values for the ListOfferingTypeLocations method.

          Path Parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Example: dedicated

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listOfferingTypeLocations options.

          parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Examples:

          parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Examples:

          WithContext method only

          The ListOfferingTypeLocations options.

          • curl -X GET   https://$DL_ENDPOINT/v1/offering_types/dedicated/locations?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              offeringType: 'dedicated',
            };
            
            let res;
            try {
              res = await directLinkService.listOfferingTypeLocations(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListOfferingTypeLocationsOptions listOfferingTypeLocationsOptions = new ListOfferingTypeLocationsOptions.Builder()
              .offeringType("dedicated")
              .build();
            
            Response<LocationCollection> response = directLinkService.listOfferingTypeLocations(listOfferingTypeLocationsOptions).execute();
            LocationCollection locationCollection = response.getResult();
            
            System.out.println(locationCollection);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              listOfferingTypeLocationsOptions := directLink.NewListOfferingTypeLocationsOptions(directlinkv1.ListOfferingTypeLocationsOptions_OfferingType_Dedicated)
              result, response, responseErr := directLink.ListOfferingTypeLocations(listOfferingTypeLocationsOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              listOfferingTypeLocationsOptions := directLink.NewListOfferingTypeLocationsOptions(directlinkv1.ListOfferingTypeLocationsOptions_OfferingType_Connect)
              result, response, responseErr := directLink.ListOfferingTypeLocations(listOfferingTypeLocationsOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.list_offering_type_locations(
              offering_type='dedicated',
            )
            location_collection = response.get_result()
            
            print(json.dumps(location_collection, indent=2))

          Response

          location collection

          location collection.

          location collection.

          location collection.

          location collection.

          Status Code

          • The Direct Link locations for offering type were retrieved successfully.

          • The Direct Link locations offering type could not be retrieved.

          • A Direct Link locations for the specified offering type could not be found.

          Example responses
          • {
              "locations": [
                {
                  "billing_location": "us",
                  "building_colocation_owner": "MyProvider",
                  "display_name": "Dallas 9",
                  "location_type": "PoP",
                  "macsec_enabled": false,
                  "market": "Dallas",
                  "market_geography": "N/S America",
                  "mzr": true,
                  "name": "dal03",
                  "offering_type": "dedicated",
                  "provision_enabled": true,
                  "vpc_region": "us-south"
                }
              ]
            }
          • {
              "locations": [
                {
                  "billing_location": "us",
                  "building_colocation_owner": "MyProvider",
                  "display_name": "Dallas 9",
                  "location_type": "PoP",
                  "macsec_enabled": false,
                  "market": "Dallas",
                  "market_geography": "N/S America",
                  "mzr": true,
                  "name": "dal03",
                  "offering_type": "dedicated",
                  "provision_enabled": true,
                  "vpc_region": "us-south"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "Required parameter missing.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "request_body",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "Required parameter missing.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "request_body",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Location not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Location not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List routers

          Retrieve location specific cross connect router information. Only valid for offering_type=dedicated locations.

          Retrieve location specific cross connect router information. Only valid for offering_type=dedicated locations.

          Retrieve location specific cross connect router information. Only valid for offering_type=dedicated locations.

          Retrieve location specific cross connect router information. Only valid for offering_type=dedicated locations.

          Retrieve location specific cross connect router information. Only valid for offering_type=dedicated locations.

          GET /offering_types/{offering_type}/locations/{location_name}/cross_connect_routers
          ServiceCall<LocationCrossConnectRouterCollection> listOfferingTypeLocationCrossConnectRouters(ListOfferingTypeLocationCrossConnectRoutersOptions listOfferingTypeLocationCrossConnectRoutersOptions)
          listOfferingTypeLocationCrossConnectRouters(params)
          list_offering_type_location_cross_connect_routers(
                  self,
                  offering_type: str,
                  location_name: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListOfferingTypeLocationCrossConnectRouters(listOfferingTypeLocationCrossConnectRoutersOptions *ListOfferingTypeLocationCrossConnectRoutersOptions) (result *LocationCrossConnectRouterCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListOfferingTypeLocationCrossConnectRoutersWithContext(ctx context.Context, listOfferingTypeLocationCrossConnectRoutersOptions *ListOfferingTypeLocationCrossConnectRoutersOptions) (result *LocationCrossConnectRouterCollection, response *core.DetailedResponse, err error)

          Request

          Use the ListOfferingTypeLocationCrossConnectRoutersOptions.Builder to create a ListOfferingTypeLocationCrossConnectRoutersOptions object that contains the parameter values for the listOfferingTypeLocationCrossConnectRouters method.

          Instantiate the ListOfferingTypeLocationCrossConnectRoutersOptions struct and set the fields to provide parameter values for the ListOfferingTypeLocationCrossConnectRouters method.

          Path Parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Example: dedicated

          • The name of the Direct Link location

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listOfferingTypeLocationCrossConnectRouters options.

          parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Examples:
          • The name of the Direct Link location.

          parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Examples:
          • The name of the Direct Link location.

          WithContext method only

          The ListOfferingTypeLocationCrossConnectRouters options.

          • curl -X GET   https://$DL_ENDPOINT/v1/offering_types/dedicated/locations/dal03/cross_connect_routers?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              offeringType: 'dedicated',
              locationName: 'testString',
            };
            
            let res;
            try {
              res = await directLinkService.listOfferingTypeLocationCrossConnectRouters(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListOfferingTypeLocationCrossConnectRoutersOptions listOfferingTypeLocationCrossConnectRoutersOptions = new ListOfferingTypeLocationCrossConnectRoutersOptions.Builder()
              .offeringType("dedicated")
              .locationName("testString")
              .build();
            
            Response<LocationCrossConnectRouterCollection> response = directLinkService.listOfferingTypeLocationCrossConnectRouters(listOfferingTypeLocationCrossConnectRoutersOptions).execute();
            LocationCrossConnectRouterCollection locationCrossConnectRouterCollection = response.getResult();
            
            System.out.println(locationCrossConnectRouterCollection);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              listOfferingTypeLocationCrossConnectRoutersOptions := directLink.NewListOfferingTypeLocationCrossConnectRoutersOptions(directlinkv1.ListOfferingTypeLocationsOptions_OfferingType_Dedicated, ${locationName})
              result, response, responseErr := directLink.ListOfferingTypeLocationCrossConnectRouters(listOfferingTypeLocationCrossConnectRoutersOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.list_offering_type_location_cross_connect_routers(
              offering_type='dedicated',
              location_name='testString',
            )
            location_cross_connect_router_collection = response.get_result()
            
            print(json.dumps(location_cross_connect_router_collection, indent=2))

          Response

          List of cross connect router details

          List of cross connect router details.

          List of cross connect router details.

          List of cross connect router details.

          List of cross connect router details.

          Status Code

          • The location information was retrieved successfully.

          • A location information with the specified identifier could not be found.

          Example responses
          • {
              "cross_connect_routers": [
                {
                  "capbilities": [
                    "macsec",
                    "non-macsec"
                  ],
                  "router_name": "xcr01.dal03",
                  "total_connections": 1
                }
              ]
            }
          • {
              "cross_connect_routers": [
                {
                  "capbilities": [
                    "macsec",
                    "non-macsec"
                  ],
                  "router_name": "xcr01.dal03",
                  "total_connections": 1
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Location not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Location not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List speed options

          List the available Direct Link speeds.

          List the available Direct Link speeds.

          List the available Direct Link speeds.

          List the available Direct Link speeds.

          List the available Direct Link speeds.

          GET /offering_types/{offering_type}/speeds
          ServiceCall<OfferingSpeedCollection> listOfferingTypeSpeeds(ListOfferingTypeSpeedsOptions listOfferingTypeSpeedsOptions)
          listOfferingTypeSpeeds(params)
          list_offering_type_speeds(
                  self,
                  offering_type: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListOfferingTypeSpeeds(listOfferingTypeSpeedsOptions *ListOfferingTypeSpeedsOptions) (result *OfferingSpeedCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListOfferingTypeSpeedsWithContext(ctx context.Context, listOfferingTypeSpeedsOptions *ListOfferingTypeSpeedsOptions) (result *OfferingSpeedCollection, response *core.DetailedResponse, err error)

          Request

          Use the ListOfferingTypeSpeedsOptions.Builder to create a ListOfferingTypeSpeedsOptions object that contains the parameter values for the listOfferingTypeSpeeds method.

          Instantiate the ListOfferingTypeSpeedsOptions struct and set the fields to provide parameter values for the ListOfferingTypeSpeeds method.

          Path Parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Example: dedicated

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listOfferingTypeSpeeds options.

          parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Examples:

          parameters

          • The Direct Link offering type. Current supported values are "dedicated" and "connect".

            Allowable values: [dedicated,connect]

            Examples:

          WithContext method only

          The ListOfferingTypeSpeeds options.

          • curl -X GET   https://$DL_ENDPOINT/v1/offering_types/dedicated/speeds?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              offeringType: 'dedicated',
            };
            
            let res;
            try {
              res = await directLinkService.listOfferingTypeSpeeds(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListOfferingTypeSpeedsOptions listOfferingTypeSpeedsOptions = new ListOfferingTypeSpeedsOptions.Builder()
              .offeringType("dedicated")
              .build();
            
            Response<OfferingSpeedCollection> response = directLinkService.listOfferingTypeSpeeds(listOfferingTypeSpeedsOptions).execute();
            OfferingSpeedCollection offeringSpeedCollection = response.getResult();
            
            System.out.println(offeringSpeedCollection);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              listOfferingTypeSpeedsOptions:= directLink.NewListOfferingTypeSpeedsOptions(directlinkv1.ListOfferingTypeLocationsOptions_OfferingType_Dedicated)
              result, response, responseErr := directLink.directLink.ListOfferingTypeSpeeds(listOfferingTypeSpeedsOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.list_offering_type_speeds(
              offering_type='dedicated',
            )
            offering_speed_collection = response.get_result()
            
            print(json.dumps(offering_speed_collection, indent=2))

          Response

          List of speeds

          List of speeds.

          List of speeds.

          List of speeds.

          List of speeds.

          Status Code

          • The Direct Link offering speeds were retrieved successfully.

          • The Direct Link offering speeds could not be retrieved for the offering type.

          • A Direct Link offering speed with the specified offering type could not be found.

          Example responses
          • {
              "speeds": [
                {
                  "capbilities": [
                    "metered",
                    "non-metered"
                  ],
                  "link_speed": 2000,
                  "macsec_enabled": false
                }
              ]
            }
          • {
              "speeds": [
                {
                  "capbilities": [
                    "metered",
                    "non-metered"
                  ],
                  "link_speed": 2000,
                  "macsec_enabled": false
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "Required Parameter missing",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "Required Parameter missing",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find OfferingType",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find OfferingType",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List ports

          Retrieve list of available Direct Link connect ports. These ports can be used to create Direct Link connect gateways.

          Retrieve list of available Direct Link connect ports. These ports can be used to create Direct Link connect gateways.

          Retrieve list of available Direct Link connect ports. These ports can be used to create Direct Link connect gateways.

          Retrieve list of available Direct Link connect ports. These ports can be used to create Direct Link connect gateways.

          Retrieve list of available Direct Link connect ports. These ports can be used to create Direct Link connect gateways.

          GET /ports
          ServiceCall<PortCollection> listPorts(ListPortsOptions listPortsOptions)
          listPorts(params)
          list_ports(
                  self,
                  *,
                  start: str = None,
                  limit: int = None,
                  location_name: str = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListPorts(listPortsOptions *ListPortsOptions) (result *PortCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListPortsWithContext(ctx context.Context, listPortsOptions *ListPortsOptions) (result *PortCollection, response *core.DetailedResponse, err error)

          Request

          Use the ListPortsOptions.Builder to create a ListPortsOptions object that contains the parameter values for the listPorts method.

          Instantiate the ListPortsOptions struct and set the fields to provide parameter values for the ListPorts method.

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          • A server-supplied token determining which resource to start the page on

          • The number of resources to return on a page

            Possible values: 1 ≤ value ≤ 100

            Default: 50

          • Direct Link location short name

          The listPorts options.

          parameters

          • A server-supplied token determining which resource to start the page on.

          • The number of resources to return on a page.

            Possible values: 1 ≤ value ≤ 100

            Default: 50

          • Direct Link location short name.

          parameters

          • A server-supplied token determining which resource to start the page on.

          • The number of resources to return on a page.

            Possible values: 1 ≤ value ≤ 100

            Default: 50

          • Direct Link location short name.

          WithContext method only

          The ListPorts options.

          • curl -X GET   https://$DL_ENDPOINT/v1/ports?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              limit: 10,
              locationName: 'testString',
            };
            
            const allResults = [];
            try {
              const pager = new DirectLinkV1.PortsPager(directLinkService, params);
              while (pager.hasNext()) {
                const nextPage = await pager.getNext();
                expect(nextPage).not.toBeNull();
                allResults.push(...nextPage);
              }
              console.log(JSON.stringify(allResults, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListPortsOptions listPortsOptions = new ListPortsOptions.Builder()
              .limit(Long.valueOf("10"))
              .locationName("testString")
              .build();
            
            PortsPager pager = new PortsPager(directLinkService, listPortsOptions);
            List<Port> allResults = new ArrayList<>();
            while (pager.hasNext()) {
              List<Port> nextPage = pager.getNext();
              allResults.addAll(nextPage);
            }
            
            System.out.println(GsonSingleton.getGson().toJson(allResults));
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              listPortsOptions := directLink.NewListPortsOptions()
              result, response, responseErr := directLink.ListPorts(listPortsOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • all_results = []
            pager = PortsPager(
              client=direct_link_service,
              limit=10,
              location_name='testString',
            )
            while pager.has_next():
              next_page = pager.get_next()
              assert next_page is not None
              all_results.extend(next_page)
            
            print(json.dumps(all_results, indent=2))

          Response

          List of port label details

          List of port label details.

          List of port label details.

          List of port label details.

          List of port label details.

          Status Code

          • Ports retrieved successfully.

          • Port information could not be found.

          Example responses
          • {
              "ports": [
                {
                  "direct_link_count": 1,
                  "id": "01122b9b-820f-4c44-8a31-77f1f0806765",
                  "label": "XCR-FRK-CS-SEC-01",
                  "location_display_name": "Dallas 03",
                  "location_name": "dal03",
                  "provider_name": "provider_1",
                  "supported_link_speeds": [
                    1000,
                    2000,
                    5000,
                    10000
                  ]
                }
              ]
            }
          • {
              "ports": [
                {
                  "direct_link_count": 1,
                  "id": "01122b9b-820f-4c44-8a31-77f1f0806765",
                  "label": "XCR-FRK-CS-SEC-01",
                  "location_display_name": "Dallas 03",
                  "location_name": "dal03",
                  "provider_name": "provider_1",
                  "supported_link_speeds": [
                    1000,
                    2000,
                    5000,
                    10000
                  ]
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Resource not found.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Resource not found.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          Get port

          Retrieve Direct Link Connect provider port.

          Retrieve Direct Link Connect provider port.

          Retrieve Direct Link Connect provider port.

          Retrieve Direct Link Connect provider port.

          Retrieve Direct Link Connect provider port.

          GET /ports/{id}
          ServiceCall<Port> getPort(GetPortOptions getPortOptions)
          getPort(params)
          get_port(
                  self,
                  id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) GetPort(getPortOptions *GetPortOptions) (result *Port, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetPortWithContext(ctx context.Context, getPortOptions *GetPortOptions) (result *Port, response *core.DetailedResponse, err error)

          Request

          Use the GetPortOptions.Builder to create a GetPortOptions object that contains the parameter values for the getPort method.

          Instantiate the GetPortOptions struct and set the fields to provide parameter values for the GetPort method.

          Path Parameters

          • The port identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The getPort options.

          parameters

          • The port identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • The port identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The GetPort options.

          • curl -X GET   https://$DL_ENDPOINT/v1/ports/$PORT_ID?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.getPort(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • GetPortOptions getPortOptions = new GetPortOptions.Builder()
              .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<Port> response = directLinkService.getPort(getPortOptions).execute();
            Port port = response.getResult();
            
            System.out.println(port);
          • package main
            
            import (
              "fmt"
              "github.com/IBM/go-sdk-core/v4/core"
              "github.com/IBM/networking-go-sdk/directlinkv1"
              "os"
            )
            
            func main() {
              // For creating {directLink} refer Authentication
            
              getPortOptions := directLink.NewGetPortOptions(${portID})
              result, response, responseErr := directLink.GetPort(getPortOptions)
              if responseErr != nil {
                panic(responseErr)
              }
              res, _ := json.MarshalIndent(result, "", "  ")
              fmt.Println(string(res))
            }
          • response = direct_link_service.get_port(
              id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            port = response.get_result()
            
            print(json.dumps(port, indent=2))

          Response

          Provider port details

          Provider port details.

          Provider port details.

          Provider port details.

          Provider port details.

          Status Code

          • Port retrieved successfully.

          • Port not be found.

          Example responses
          • {
              "direct_link_count": 1,
              "id": "01122b9b-820f-4c44-8a31-77f1f0806765",
              "label": "XCR-FRK-CS-SEC-01",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "provider_name": "provider_1",
              "supported_link_speeds": [
                1000,
                2000,
                5000,
                10000
              ]
            }
          • {
              "direct_link_count": 1,
              "id": "01122b9b-820f-4c44-8a31-77f1f0806765",
              "label": "XCR-FRK-CS-SEC-01",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "provider_name": "provider_1",
              "supported_link_speeds": [
                1000,
                2000,
                5000,
                10000
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Resource not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Resource not found",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }

          List AS Prepends

          Retrieve all AS Prepends for the specified Direct Link gateway.

          Retrieve all AS Prepends for the specified Direct Link gateway.

          Retrieve all AS Prepends for the specified Direct Link gateway.

          Retrieve all AS Prepends for the specified Direct Link gateway.

          Retrieve all AS Prepends for the specified Direct Link gateway.

          GET /gateways/{gateway_id}/as_prepends
          ServiceCall<AsPrependCollection> listGatewayAsPrepends(ListGatewayAsPrependsOptions listGatewayAsPrependsOptions)
          listGatewayAsPrepends(params)
          list_gateway_as_prepends(
                  self,
                  gateway_id: str,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ListGatewayAsPrepends(listGatewayAsPrependsOptions *ListGatewayAsPrependsOptions) (result *AsPrependCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ListGatewayAsPrependsWithContext(ctx context.Context, listGatewayAsPrependsOptions *ListGatewayAsPrependsOptions) (result *AsPrependCollection, response *core.DetailedResponse, err error)

          Request

          Use the ListGatewayAsPrependsOptions.Builder to create a ListGatewayAsPrependsOptions object that contains the parameter values for the listGatewayAsPrepends method.

          Instantiate the ListGatewayAsPrependsOptions struct and set the fields to provide parameter values for the ListGatewayAsPrepends method.

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The listGatewayAsPrepends options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:

          WithContext method only

          The ListGatewayAsPrepends options.

          • curl -X GET   https://$DL_ENDPOINT/v1/gateways/$GATEWAY_ID/as_prepends?version=2019-12-13   -H "authorization: Bearer $IAM_TOKEN"
          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            };
            
            let res;
            try {
              res = await directLinkService.listGatewayAsPrepends(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ListGatewayAsPrependsOptions listGatewayAsPrependsOptions = new ListGatewayAsPrependsOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .build();
            
            Response<AsPrependCollection> response = directLinkService.listGatewayAsPrepends(listGatewayAsPrependsOptions).execute();
            AsPrependCollection asPrependCollection = response.getResult();
            
            System.out.println(asPrependCollection);
          • listGatewayAsPrependsOptions := directLinkService.NewListGatewayAsPrependsOptions(
              "testString",
            )
            
            asPrependCollection, response, err := directLinkService.ListGatewayAsPrepends(listGatewayAsPrependsOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(asPrependCollection, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.list_gateway_as_prepends(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
            )
            as_prepend_collection = response.get_result()
            
            print(json.dumps(as_prepend_collection, indent=2))

          Response

          array of AS Prepends

          array of AS Prepends.

          array of AS Prepends.

          array of AS Prepends.

          array of AS Prepends.

          Status Code

          • AS Prepends retrieved successfully.

          • The specified Direct Link gateway could not be found.

          Example responses
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T23:05:52.724Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                  "length": 3,
                  "policy": "import",
                  "specific_prefixes": [
                    "172.17.0.0/16",
                    "172.24.10.0/24"
                  ],
                  "updated_at": "2020-11-02T23:05:52.724Z"
                }
              ]
            }
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T23:05:52.724Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                  "length": 3,
                  "policy": "import",
                  "specific_prefixes": [
                    "172.17.0.0/16",
                    "172.24.10.0/24"
                  ],
                  "updated_at": "2020-11-02T23:05:52.724Z"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "request_id"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "request_id"
            }

          Replace existing AS Prepends

          Replace the given set of AS prepends on the specified gateway. Existing resources may be reused when the individual AS Prepend item is unchanged.

          Replace the given set of AS prepends on the specified gateway. Existing resources may be reused when the individual AS Prepend item is unchanged.

          Replace the given set of AS prepends on the specified gateway. Existing resources may be reused when the individual AS Prepend item is unchanged.

          Replace the given set of AS prepends on the specified gateway. Existing resources may be reused when the individual AS Prepend item is unchanged.

          Replace the given set of AS prepends on the specified gateway. Existing resources may be reused when the individual AS Prepend item is unchanged.

          PUT /gateways/{gateway_id}/as_prepends
          ServiceCall<AsPrependCollection> replaceGatewayAsPrepends(ReplaceGatewayAsPrependsOptions replaceGatewayAsPrependsOptions)
          replaceGatewayAsPrepends(params)
          replace_gateway_as_prepends(
                  self,
                  gateway_id: str,
                  if_match: str,
                  *,
                  as_prepends: List['AsPrependPrefixArrayTemplate'] = None,
                  **kwargs,
              ) -> DetailedResponse
          (directLink *DirectLinkV1) ReplaceGatewayAsPrepends(replaceGatewayAsPrependsOptions *ReplaceGatewayAsPrependsOptions) (result *AsPrependCollection, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) ReplaceGatewayAsPrependsWithContext(ctx context.Context, replaceGatewayAsPrependsOptions *ReplaceGatewayAsPrependsOptions) (result *AsPrependCollection, response *core.DetailedResponse, err error)

          Request

          Use the ReplaceGatewayAsPrependsOptions.Builder to create a ReplaceGatewayAsPrependsOptions object that contains the parameter values for the replaceGatewayAsPrepends method.

          Instantiate the ReplaceGatewayAsPrependsOptions struct and set the fields to provide parameter values for the ReplaceGatewayAsPrepends method.

          Custom Headers

          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression (?:W\/)?"(?:[ !#-\x7E\x80-\xFF]*|\r\n[\t ]|\\.)*"

            Example: W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"

          Path Parameters

          • Direct Link gateway identifier

            Possible values: length = 36, Value must match regular expression ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

            Example: 0a06fb9b-820f-4c44-8a31-77f1f0806d28

          Query Parameters

          • Requests the version of the API as a date in the format YYYY-MM-DD. Any date from 2019-12-13 up to the current date may be provided. Specify the current date to request the latest version.

            Possible values: length = 10, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

          The AS Prepend replace template

          The replaceGatewayAsPrepends options.

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression /(?:W\/)?\"(?:[ !#-\\x7E\\x80-\\xFF]*|\\r\\n[\\t ]|\\\\.)*\"/

            Examples:
          • array of AS Prepend configuration information.

            Possible values: number of items ≤ 50

          parameters

          • Direct Link gateway identifier.

            Possible values: length = 36, Value must match regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

            Examples:
          • If present, the request will fail if the specified ETag value does not match the resource's current ETag value.

            Possible values: 2 ≤ length ≤ 512, Value must match regular expression /(?:W\/)?\"(?:[ !#-\\x7E\\x80-\\xFF]*|\\r\\n[\\t ]|\\\\.)*\"/

            Examples:
          • array of AS Prepend configuration information.

            Possible values: number of items ≤ 50

          WithContext method only

          The ReplaceGatewayAsPrepends options.

          • const params = {
              gatewayId: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              ifMatch: 'W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"',
            };
            
            let res;
            try {
              res = await directLinkService.replaceGatewayAsPrepends(params);
              console.log(JSON.stringify(res.result, null, 2));
            } catch (err) {
              console.warn(err);
            }
          • ReplaceGatewayAsPrependsOptions replaceGatewayAsPrependsOptions = new ReplaceGatewayAsPrependsOptions.Builder()
              .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
              .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"")
              .build();
            
            Response<AsPrependCollection> response = directLinkService.replaceGatewayAsPrepends(replaceGatewayAsPrependsOptions).execute();
            AsPrependCollection asPrependCollection = response.getResult();
            
            System.out.println(asPrependCollection);
          • replaceGatewayAsPrependsOptions := directLinkService.NewReplaceGatewayAsPrependsOptions(
              "testString",
              `W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"`,
            )
            
            asPrependCollection, response, err := directLinkService.ReplaceGatewayAsPrepends(replaceGatewayAsPrependsOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(asPrependCollection, "", "  ")
            fmt.Println(string(b))
          • response = direct_link_service.replace_gateway_as_prepends(
              gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
              if_match='W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"',
            )
            as_prepend_collection = response.get_result()
            
            print(json.dumps(as_prepend_collection, indent=2))

          Response

          array of AS Prepends

          array of AS Prepends.

          array of AS Prepends.

          array of AS Prepends.

          array of AS Prepends.

          Status Code

          • AS Prepends replaced successfully.

          • The information given was invalid, malformed, or missing a required field.

          • The specified Direct Link gateway could not be found.

          • The provided If-Match value does not match the current ETag value of the AS Prepends

          Example responses
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T23:05:52.724Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                  "length": 3,
                  "policy": "import",
                  "specific_prefixes": [
                    "172.17.0.0/16",
                    "172.24.10.0/24"
                  ],
                  "updated_at": "2020-11-02T23:05:52.724Z"
                }
              ]
            }
          • {
              "as_prepends": [
                {
                  "created_at": "2020-11-02T23:05:52.724Z",
                  "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                  "length": 3,
                  "policy": "import",
                  "specific_prefixes": [
                    "172.17.0.0/16",
                    "172.24.10.0/24"
                  ],
                  "updated_at": "2020-11-02T23:05:52.724Z"
                }
              ]
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "bad_request",
                  "message": "The information given was invalid, malformed, or missing a required field.",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling",
                  "target": {
                    "name": "name",
                    "type": "field"
                  }
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          • {
              "errors": [
                {
                  "code": "not_found",
                  "message": "Cannot find gateway",
                  "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                }
              ],
              "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
            }
          id=curlclassName=tab-item-selected