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)

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);
      • listGatewaysOptions := directLinkService.NewListGatewaysOptions()
        
        gatewayCollection, response, err := directLinkService.ListGateways(listGatewaysOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(gatewayCollection, "", "  ")
        fmt.Println(string(b))
      • 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:v1:bluemix:public:kms:us-south:a/766d8d374a484f029d0fca5a40a52a1c:5d343839-07d3-4213-a950-0f71ed45423f:key:7fc1a0ba-4633-48cb-997b-5749787c952c"
              },
              "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:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
              "cross_account": false,
              "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",
              "operational_status_reasons": [],
              "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:v1:bluemix:public:kms:us-south:a/766d8d374a484f029d0fca5a40a52a1c:5d343839-07d3-4213-a950-0f71ed45423f:key:7fc1a0ba-4633-48cb-997b-5749787c952c"
              },
              "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:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
              "cross_account": false,
              "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",
              "operational_status_reasons": [],
              "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)

      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);
          • gatewayTemplateModel := &directlinkv1.GatewayTemplateGatewayTypeDedicatedTemplate{
              BgpAsn: core.Int64Ptr(int64(64999)),
              Global: core.BoolPtr(true),
              Metered: core.BoolPtr(false),
              Name: core.StringPtr("myGateway"),
              SpeedMbps: core.Int64Ptr(int64(1000)),
              Type: core.StringPtr("dedicated"),
              CarrierName: core.StringPtr("myCarrierName"),
              CrossConnectRouter: core.StringPtr("xcr01.dal03"),
              CustomerName: core.StringPtr("newCustomerName"),
              LocationName: core.StringPtr("dal03"),
            }
            
            createGatewayOptions := directLinkService.NewCreateGatewayOptions(
              gatewayTemplateModel,
            )
            
            gateway, response, err := directLinkService.CreateGateway(createGatewayOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(gateway, "", "  ")
            fmt.Println(string(b))
          • 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:v1:bluemix:public:kms:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
              },
              "bfd_config": {
                "bfd_status": "up",
                "bfd_status_updated_at": "2020-08-20T06:58:41.909781Z",
                "interval": 2000,
                "multiplier": 3
              },
              "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",
              "bgp_status_updated_at": "2020-08-20T06:58:41.909781Z",
              "carrier_name": "CarrierName",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
              "cross_account": false,
              "cross_connect_router": "xcr01.dal03",
              "customer_name": "CustomerName",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "link_status": "up",
              "link_status_updated_at": "2020-08-20T06:58:41.909781Z",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "macsec": {
                "active": true,
                "security_policy": "must_secure",
                "status": "secured"
              },
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "operational_status_reasons": [],
              "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:v1:bluemix:public:kms:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
              },
              "bfd_config": {
                "bfd_status": "up",
                "bfd_status_updated_at": "2020-08-20T06:58:41.909781Z",
                "interval": 2000,
                "multiplier": 3
              },
              "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",
              "bgp_status_updated_at": "2020-08-20T06:58:41.909781Z",
              "carrier_name": "CarrierName",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
              "cross_account": false,
              "cross_connect_router": "xcr01.dal03",
              "customer_name": "CustomerName",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "link_status": "up",
              "link_status_updated_at": "2020-08-20T06:58:41.909781Z",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "macsec": {
                "active": true,
                "security_policy": "must_secure",
                "status": "secured"
              },
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "operational_status_reasons": [],
              "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)

          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();
          • deleteGatewayOptions := directLinkService.NewDeleteGatewayOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
            )
            
            response, err := directLinkService.DeleteGateway(deleteGatewayOptions)
            if err != nil {
              panic(err)
            }
            if response.StatusCode != 204 {
              fmt.Printf("\nUnexpected response status code received from DeleteGateway(): %d\n", response.StatusCode)
            }
          • 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 GetGatewayResponseIntf, response *core.DetailedResponse, err error)
          (directLink *DirectLinkV1) GetGatewayWithContext(ctx context.Context, getGatewayOptions *GetGatewayOptions) (result GetGatewayResponseIntf, response *core.DetailedResponse, err error)

          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);
          • getGatewayOptions := directLinkService.NewGetGatewayOptions(
              "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
            )
            
            getGatewayResponse, response, err := directLinkService.GetGateway(getGatewayOptions)
            if err != nil {
              panic(err)
            }
            b, _ := json.MarshalIndent(getGatewayResponse, "", "  ")
            fmt.Println(string(b))
          • 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:v1:bluemix:public:kms:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
              },
              "bfd_config": {
                "bfd_status": "up",
                "bfd_status_updated_at": "2020-08-20T06:58:41.909781Z",
                "interval": 2000,
                "multiplier": 3
              },
              "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",
              "bgp_status_updated_at": "2020-08-20T06:58:41.909781Z",
              "carrier_name": "CarrierName",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
              "cross_account": false,
              "cross_connect_router": "xcr01.dal03",
              "customer_name": "CustomerName",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "link_status": "up",
              "link_status_updated_at": "2020-08-20T06:58:41.909781Z",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "macsec": {
                "active": true,
                "security_policy": "must_secure",
                "status": "secured"
              },
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "operational_status_reasons": [],
              "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:v1:bluemix:public:kms:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
              },
              "bfd_config": {
                "bfd_status": "up",
                "bfd_status_updated_at": "2020-08-20T06:58:41.909781Z",
                "interval": 2000,
                "multiplier": 3
              },
              "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",
              "bgp_status_updated_at": "2020-08-20T06:58:41.909781Z",
              "carrier_name": "CarrierName",
              "connection_mode": "transit",
              "created_at": "2020-11-02T20:40:29.622Z",
              "crn": "crn:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
              "cross_account": false,
              "cross_connect_router": "xcr01.dal03",
              "customer_name": "CustomerName",
              "default_export_route_filter": "permit",
              "default_import_route_filter": "deny",
              "global": true,
              "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
              "link_status": "up",
              "link_status_updated_at": "2020-08-20T06:58:41.909781Z",
              "location_display_name": "Dallas 03",
              "location_name": "dal03",
              "macsec": {
                "active": true,
                "security_policy": "must_secure",
                "status": "secured"
              },
              "metered": false,
              "name": "example-gateway",
              "operational_status": "provisioned",
              "operational_status_reasons": [],
              "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)

          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:
            • BFD configuration information.

            • The autonomous system number (ASN) of Border Gateway Protocol (BGP) configuration for the IBM side of the DL 2.0 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 2.0 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 2.0 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:
            • 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);
            • gatewayPatchTemplateModel := &directlinkv1.GatewayPatchTemplate{
              }
              gatewayPatchTemplateModelAsPatch, asPatchErr := gatewayPatchTemplateModel.AsPatch()
              Expect(asPatchErr).To(BeNil())
              
              updateGatewayOptions := directLinkService.NewUpdateGatewayOptions(
                "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                gatewayPatchTemplateModelAsPatch,
              )
              
              gateway, response, err := directLinkService.UpdateGateway(updateGatewayOptions)
              if err != nil {
                panic(err)
              }
              b, _ := json.MarshalIndent(gateway, "", "  ")
              fmt.Println(string(b))
            • 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:v1:bluemix:public:kms:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                },
                "bfd_config": {
                  "bfd_status": "up",
                  "bfd_status_updated_at": "2020-08-20T06:58:41.909781Z",
                  "interval": 2000,
                  "multiplier": 3
                },
                "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",
                "bgp_status_updated_at": "2020-08-20T06:58:41.909781Z",
                "carrier_name": "CarrierName",
                "connection_mode": "transit",
                "created_at": "2020-11-02T20:40:29.622Z",
                "crn": "crn:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
                "cross_account": false,
                "cross_connect_router": "xcr01.dal03",
                "customer_name": "CustomerName",
                "default_export_route_filter": "permit",
                "default_import_route_filter": "deny",
                "global": true,
                "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                "link_status": "up",
                "link_status_updated_at": "2020-08-20T06:58:41.909781Z",
                "location_display_name": "Dallas 03",
                "location_name": "dal03",
                "macsec": {
                  "active": true,
                  "security_policy": "must_secure",
                  "status": "secured"
                },
                "metered": false,
                "name": "example-gateway",
                "operational_status": "provisioned",
                "operational_status_reasons": [],
                "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:v1:bluemix:public:kms:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                },
                "bfd_config": {
                  "bfd_status": "up",
                  "bfd_status_updated_at": "2020-08-20T06:58:41.909781Z",
                  "interval": 2000,
                  "multiplier": 3
                },
                "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",
                "bgp_status_updated_at": "2020-08-20T06:58:41.909781Z",
                "carrier_name": "CarrierName",
                "connection_mode": "transit",
                "created_at": "2020-11-02T20:40:29.622Z",
                "crn": "crn:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
                "cross_account": false,
                "cross_connect_router": "xcr01.dal03",
                "customer_name": "CustomerName",
                "default_export_route_filter": "permit",
                "default_import_route_filter": "deny",
                "global": true,
                "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                "link_status": "up",
                "link_status_updated_at": "2020-08-20T06:58:41.909781Z",
                "location_display_name": "Dallas 03",
                "location_name": "dal03",
                "macsec": {
                  "active": true,
                  "security_policy": "must_secure",
                  "status": "secured"
                },
                "metered": false,
                "name": "example-gateway",
                "operational_status": "provisioned",
                "operational_status_reasons": [],
                "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: Optional[str] = None,
                    as_prepends: Optional[List['AsPrependTemplate']] = None,
                    authentication_key: Optional['AuthenticationKeyIdentity'] = None,
                    bfd_config: Optional['GatewayBfdConfigActionTemplate'] = None,
                    connection_mode: Optional[str] = None,
                    default_export_route_filter: Optional[str] = None,
                    default_import_route_filter: Optional[str] = None,
                    export_route_filters: Optional[List['GatewayTemplateRouteFilter']] = None,
                    global_: Optional[bool] = None,
                    import_route_filters: Optional[List['GatewayTemplateRouteFilter']] = None,
                    metered: Optional[bool] = None,
                    resource_group: Optional['ResourceGroupIdentity'] = None,
                    updates: Optional[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)

            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: 0 ≤ number of items ≤ 50

              • 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: 0 ≤ number of items ≤ 50

                • 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);
                • createGatewayActionOptions := directLinkService.NewCreateGatewayActionOptions(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                  )
                  
                  gateway, response, err := directLinkService.CreateGatewayAction(createGatewayActionOptions)
                  if err != nil {
                    panic(err)
                  }
                  b, _ := json.MarshalIndent(gateway, "", "  ")
                  fmt.Println(string(b))
                • 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:v1:bluemix:public:kms:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                    },
                    "bfd_config": {
                      "bfd_status": "up",
                      "bfd_status_updated_at": "2020-08-20T06:58:41.909781Z",
                      "interval": 2000,
                      "multiplier": 3
                    },
                    "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",
                    "bgp_status_updated_at": "2020-08-20T06:58:41.909781Z",
                    "carrier_name": "CarrierName",
                    "connection_mode": "transit",
                    "created_at": "2020-11-02T20:40:29.622Z",
                    "crn": "crn:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
                    "cross_account": false,
                    "cross_connect_router": "xcr01.dal03",
                    "customer_name": "CustomerName",
                    "default_export_route_filter": "permit",
                    "default_import_route_filter": "deny",
                    "global": true,
                    "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                    "link_status": "up",
                    "link_status_updated_at": "2020-08-20T06:58:41.909781Z",
                    "location_display_name": "Dallas 03",
                    "location_name": "dal03",
                    "macsec": {
                      "active": true,
                      "security_policy": "must_secure",
                      "status": "secured"
                    },
                    "metered": false,
                    "name": "example-gateway",
                    "operational_status": "provisioned",
                    "operational_status_reasons": [],
                    "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:v1:bluemix:public:kms:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                    },
                    "bfd_config": {
                      "bfd_status": "up",
                      "bfd_status_updated_at": "2020-08-20T06:58:41.909781Z",
                      "interval": 2000,
                      "multiplier": 3
                    },
                    "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",
                    "bgp_status_updated_at": "2020-08-20T06:58:41.909781Z",
                    "carrier_name": "CarrierName",
                    "connection_mode": "transit",
                    "created_at": "2020-11-02T20:40:29.622Z",
                    "crn": "crn:v1:bluemix:public:directlink:dal00:a/aaaaaaaa4a484f029d0fca5a11111111::connect:bbbbbbbb-f326-428f-a345-222222222222",
                    "cross_account": false,
                    "cross_connect_router": "xcr01.dal03",
                    "customer_name": "CustomerName",
                    "default_export_route_filter": "permit",
                    "default_import_route_filter": "deny",
                    "global": true,
                    "id": "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                    "link_status": "up",
                    "link_status_updated_at": "2020-08-20T06:58:41.909781Z",
                    "location_display_name": "Dallas 03",
                    "location_name": "dal03",
                    "macsec": {
                      "active": true,
                      "security_policy": "must_secure",
                      "status": "secured"
                    },
                    "metered": false,
                    "name": "example-gateway",
                    "operational_status": "provisioned",
                    "operational_status_reasons": [],
                    "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)

                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();
                  try (InputStream inputStream = response.getResult();) {
                      inputStream.transferTo(new java.io.FileOutputStream("result.out"));
                  }
                • listGatewayCompletionNoticeOptions := directLinkService.NewListGatewayCompletionNoticeOptions(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                  )
                  
                  result, response, err := directLinkService.ListGatewayCompletionNotice(listGatewayCompletionNoticeOptions)
                  if err != nil {
                    panic(err)
                  }
                  if result != nil {
                    defer result.Close()
                    outFile, err := os.Create("result.out")
                    if err != nil { panic(err) }
                    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: Optional[BinaryIO] = None,
                        upload_content_type: Optional[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)

                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();
                • createGatewayCompletionNoticeOptions := directLinkService.NewCreateGatewayCompletionNoticeOptions(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                  )
                  
                  response, err := directLinkService.CreateGatewayCompletionNotice(createGatewayCompletionNoticeOptions)
                  if err != nil {
                    panic(err)
                  }
                  if response.StatusCode != 204 {
                    fmt.Printf("\nUnexpected response status code received from CreateGatewayCompletionNotice(): %d\n", response.StatusCode)
                  }
                • 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();
                  try (InputStream inputStream = response.getResult();) {
                      inputStream.transferTo(new java.io.FileOutputStream("result.out"));
                  }
                • listGatewayLetterOfAuthorizationOptions := directLinkService.NewListGatewayLetterOfAuthorizationOptions(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                  )
                  
                  result, response, err := directLinkService.ListGatewayLetterOfAuthorization(listGatewayLetterOfAuthorizationOptions)
                  if err != nil {
                    panic(err)
                  }
                  if result != nil {
                    defer result.Close()
                    outFile, err := os.Create("result.out")
                    if err != nil { panic(err) }
                    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);
                • getGatewayStatisticsOptions := directLinkService.NewGetGatewayStatisticsOptions(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                    "macsec_mka_session",
                  )
                  
                  gatewayStatisticCollection, response, err := directLinkService.GetGatewayStatistics(getGatewayStatisticsOptions)
                  if err != nil {
                    panic(err)
                  }
                  b, _ := json.MarshalIndent(gatewayStatisticCollection, "", "  ")
                  fmt.Println(string(b))
                • 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: Optional[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);
                • getGatewayStatusOptions := directLinkService.NewGetGatewayStatusOptions(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                  )
                  
                  gatewayStatusCollection, response, err := directLinkService.GetGatewayStatus(getGatewayStatusOptions)
                  if err != nil {
                    panic(err)
                  }
                  b, _ := json.MarshalIndent(gatewayStatusCollection, "", "  ")
                  fmt.Println(string(b))
                • 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 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(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                  )
                  
                  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": "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 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: Optional[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: 0 ≤ 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: 0 ≤ 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(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                    "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"
                  }

                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: Optional[str] = None,
                        ge: Optional[int] = None,
                        le: Optional[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: Optional[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: Optional[str] = None,
                        ge: Optional[int] = None,
                        le: Optional[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: Optional[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"
                  }

                Unset MACsec configuration

                Removes the MACsec configuration from a direct link, disabling the features.

                Removes the MACsec configuration from a direct link, disabling the features.

                Removes the MACsec configuration from a direct link, disabling the features.

                Removes the MACsec configuration from a direct link, disabling the features.

                Removes the MACsec configuration from a direct link, disabling the features.

                DELETE /gateways/{id}/macsec
                ServiceCall<Void> unsetGatewayMacsec(UnsetGatewayMacsecOptions unsetGatewayMacsecOptions)
                unsetGatewayMacsec(params)
                unset_gateway_macsec(
                        self,
                        id: str,
                        **kwargs,
                    ) -> DetailedResponse
                (directLink *DirectLinkV1) UnsetGatewayMacsec(unsetGatewayMacsecOptions *UnsetGatewayMacsecOptions) (response *core.DetailedResponse, err error)
                (directLink *DirectLinkV1) UnsetGatewayMacsecWithContext(ctx context.Context, unsetGatewayMacsecOptions *UnsetGatewayMacsecOptions) (response *core.DetailedResponse, err error)

                Request

                Use the UnsetGatewayMacsecOptions.Builder to create a UnsetGatewayMacsecOptions object that contains the parameter values for the unsetGatewayMacsec method.

                Instantiate the UnsetGatewayMacsecOptions struct and set the fields to provide parameter values for the UnsetGatewayMacsec 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 unsetGatewayMacsec 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 UnsetGatewayMacsec options.

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

                Response

                Status Code

                • The MACsec configuration was unset successfully.

                • The direct link's macsec_capability does not allow deletion of MACsec.

                • No MACsec configuration set for the direct link.

                Example responses
                • {
                    "errors": [
                      {
                        "code": "invalid_request",
                        "message": "Invalid Request",
                        "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                      }
                    ],
                    "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                  }
                • {
                    "errors": [
                      {
                        "code": "invalid_request",
                        "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 MACsec configuration",
                        "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                      }
                    ],
                    "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                  }
                • {
                    "errors": [
                      {
                        "code": "not_found",
                        "message": "Cannot find MACsec configuration",
                        "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                      }
                    ],
                    "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                  }

                Get MACsec configuration

                Retrieve the MACsec configuration of a direct link.

                Retrieve the MACsec configuration of a direct link.

                Retrieve the MACsec configuration of a direct link.

                Retrieve the MACsec configuration of a direct link.

                Retrieve the MACsec configuration of a direct link.

                GET /gateways/{id}/macsec
                ServiceCall<GatewayMacsec> getGatewayMacsec(GetGatewayMacsecOptions getGatewayMacsecOptions)
                getGatewayMacsec(params)
                get_gateway_macsec(
                        self,
                        id: str,
                        **kwargs,
                    ) -> DetailedResponse
                (directLink *DirectLinkV1) GetGatewayMacsec(getGatewayMacsecOptions *GetGatewayMacsecOptions) (result *GatewayMacsec, response *core.DetailedResponse, err error)
                (directLink *DirectLinkV1) GetGatewayMacsecWithContext(ctx context.Context, getGatewayMacsecOptions *GetGatewayMacsecOptions) (result *GatewayMacsec, response *core.DetailedResponse, err error)

                Request

                Use the GetGatewayMacsecOptions.Builder to create a GetGatewayMacsecOptions object that contains the parameter values for the getGatewayMacsec method.

                Instantiate the GetGatewayMacsecOptions struct and set the fields to provide parameter values for the GetGatewayMacsec 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 getGatewayMacsec 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 GetGatewayMacsec options.

                • const params = {
                    id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                  };
                  
                  let res;
                  try {
                    res = await directLinkService.getGatewayMacsec(params);
                    console.log(JSON.stringify(res.result, null, 2));
                  } catch (err) {
                    console.warn(err);
                  }
                • GetGatewayMacsecOptions getGatewayMacsecOptions = new GetGatewayMacsecOptions.Builder()
                    .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                    .build();
                  
                  Response<GatewayMacsec> response = directLinkService.getGatewayMacsec(getGatewayMacsecOptions).execute();
                  GatewayMacsec gatewayMacsec = response.getResult();
                  
                  System.out.println(gatewayMacsec);
                • getGatewayMacsecOptions := directLinkService.NewGetGatewayMacsecOptions(
                    "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                  )
                  
                  gatewayMacsec, response, err := directLinkService.GetGatewayMacsec(getGatewayMacsecOptions)
                  if err != nil {
                    panic(err)
                  }
                  b, _ := json.MarshalIndent(gatewayMacsec, "", "  ")
                  fmt.Println(string(b))
                • response = direct_link_service.get_gateway_macsec(
                    id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                  )
                  gateway_macsec = response.get_result()
                  
                  print(json.dumps(gateway_macsec, indent=2))

                Response

                MACsec configuration information of a Direct Link gateway.

                MACsec configuration information of a Direct Link gateway.

                MACsec configuration information of a Direct Link gateway.

                MACsec configuration information of a Direct Link gateway.

                MACsec configuration information of a Direct Link gateway.

                Status Code

                • The MACsec configuration of the direct link was retrieved successfully.

                • A direct link with the specified identifier could not be found or no MACsec configuration set for the direct link.

                Example responses
                • {
                    "active": true,
                    "cipher_suite": "gcm_aes_xpn_256",
                    "confidentiality_offset": 0,
                    "created_at": "2020-11-02T20:40:29.622Z",
                    "key_server_priority": 255,
                    "sak_rekey": {
                      "interval": 3600,
                      "mode": "timer"
                    },
                    "security_policy": "must_secure",
                    "status": "secured",
                    "status_reasons": [],
                    "updated_at": "2020-11-02T20:40:29.622Z",
                    "window_size": 512
                  }
                • {
                    "active": true,
                    "cipher_suite": "gcm_aes_xpn_256",
                    "confidentiality_offset": 0,
                    "created_at": "2020-11-02T20:40:29.622Z",
                    "key_server_priority": 255,
                    "sak_rekey": {
                      "interval": 3600,
                      "mode": "timer"
                    },
                    "security_policy": "must_secure",
                    "status": "secured",
                    "status_reasons": [],
                    "updated_at": "2020-11-02T20:40:29.622Z",
                    "window_size": 512
                  }
                • {
                    "errors": [
                      {
                        "code": "not_found",
                        "message": "Cannot find MACsec",
                        "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                      }
                    ],
                    "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                  }
                • {
                    "errors": [
                      {
                        "code": "not_found",
                        "message": "Cannot find MACsec",
                        "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                      }
                    ],
                    "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                  }

                Update MACsec configuration

                Updates the MACsec configuration on a direct link.

                Updates the MACsec configuration on a direct link.

                Updates the MACsec configuration on a direct link.

                Updates the MACsec configuration on a direct link.

                Updates the MACsec configuration on a direct link.

                PATCH /gateways/{id}/macsec
                ServiceCall<GatewayMacsec> updateGatewayMacsec(UpdateGatewayMacsecOptions updateGatewayMacsecOptions)
                updateGatewayMacsec(params)
                update_gateway_macsec(
                        self,
                        id: str,
                        gateway_macsec_patch: 'GatewayMacsecPatch',
                        **kwargs,
                    ) -> DetailedResponse
                (directLink *DirectLinkV1) UpdateGatewayMacsec(updateGatewayMacsecOptions *UpdateGatewayMacsecOptions) (result *GatewayMacsec, response *core.DetailedResponse, err error)
                (directLink *DirectLinkV1) UpdateGatewayMacsecWithContext(ctx context.Context, updateGatewayMacsecOptions *UpdateGatewayMacsecOptions) (result *GatewayMacsec, response *core.DetailedResponse, err error)

                Request

                Use the UpdateGatewayMacsecOptions.Builder to create a UpdateGatewayMacsecOptions object that contains the parameter values for the updateGatewayMacsec method.

                Instantiate the UpdateGatewayMacsecOptions struct and set the fields to provide parameter values for the UpdateGatewayMacsec 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 MACsec configuration patch.

                The updateGatewayMacsec 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:
                • Sets the MACsec feature to be active (true) or inactive (false) for a gateway.

                  Examples:
                • SAK rekey mode based on length of time since last rekey.

                  • Determines how packets without MACsec headers are handled.

                    must_secure - Packets without MACsec headers are dropped. This policy should be used to prefer security over network availability. should_secure - Packets without MACsec headers are allowed. This policy should be used to prefer network availability over security.

                    Allowable values: [must_secure,should_secure]

                    Examples:
                  • The window size determines the number of frames in a window for replay protection.

                    Replay protection is used to counter replay attacks. Frames within a window size can be out of order and are not replay protected.

                    Possible values: 0 ≤ value ≤ 65535

                    Default: 512

                    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 fields for MACsec configuration of a Direct Link gateway.

                  WithContext method only

                  The UpdateGatewayMacsec options.

                  • const params = {
                      id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                    };
                    
                    let res;
                    try {
                      res = await directLinkService.updateGatewayMacsec(params);
                      console.log(JSON.stringify(res.result, null, 2));
                    } catch (err) {
                      console.warn(err);
                    }
                  • GatewayMacsecPatch gatewayMacsecPatchModel = new GatewayMacsecPatch.Builder()
                      .build();
                    Map<String, Object> gatewayMacsecPatchModelAsPatch = gatewayMacsecPatchModel.asPatch();
                    UpdateGatewayMacsecOptions updateGatewayMacsecOptions = new UpdateGatewayMacsecOptions.Builder()
                      .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                      .gatewayMacsecPatch(gatewayMacsecPatchModelAsPatch)
                      .build();
                    
                    Response<GatewayMacsec> response = directLinkService.updateGatewayMacsec(updateGatewayMacsecOptions).execute();
                    GatewayMacsec gatewayMacsec = response.getResult();
                    
                    System.out.println(gatewayMacsec);
                  • gatewayMacsecPatchModel := &directlinkv1.GatewayMacsecPatch{
                    }
                    gatewayMacsecPatchModelAsPatch, asPatchErr := gatewayMacsecPatchModel.AsPatch()
                    Expect(asPatchErr).To(BeNil())
                    
                    updateGatewayMacsecOptions := directLinkService.NewUpdateGatewayMacsecOptions(
                      "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                      gatewayMacsecPatchModelAsPatch,
                    )
                    
                    gatewayMacsec, response, err := directLinkService.UpdateGatewayMacsec(updateGatewayMacsecOptions)
                    if err != nil {
                      panic(err)
                    }
                    b, _ := json.MarshalIndent(gatewayMacsec, "", "  ")
                    fmt.Println(string(b))
                  • gateway_macsec_patch_model = {
                    }
                    
                    response = direct_link_service.update_gateway_macsec(
                      id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                      gateway_macsec_patch=gateway_macsec_patch_model,
                    )
                    gateway_macsec = response.get_result()
                    
                    print(json.dumps(gateway_macsec, indent=2))

                  Response

                  MACsec configuration information of a Direct Link gateway.

                  MACsec configuration information of a Direct Link gateway.

                  MACsec configuration information of a Direct Link gateway.

                  MACsec configuration information of a Direct Link gateway.

                  MACsec configuration information of a Direct Link gateway.

                  Status Code

                  • The MACsec configuration of the direct link was updated successfully.

                  • The request was invalid.

                  • A direct link with the specified identifier could not be found or no MACsec configuration set for the direct link.

                  Example responses
                  • {
                      "active": true,
                      "cipher_suite": "gcm_aes_xpn_256",
                      "confidentiality_offset": 0,
                      "created_at": "2020-11-02T20:40:29.622Z",
                      "key_server_priority": 255,
                      "sak_rekey": {
                        "interval": 3600,
                        "mode": "timer"
                      },
                      "security_policy": "must_secure",
                      "status": "secured",
                      "status_reasons": [],
                      "updated_at": "2020-11-02T20:40:29.622Z",
                      "window_size": 512
                    }
                  • {
                      "active": true,
                      "cipher_suite": "gcm_aes_xpn_256",
                      "confidentiality_offset": 0,
                      "created_at": "2020-11-02T20:40:29.622Z",
                      "key_server_priority": 255,
                      "sak_rekey": {
                        "interval": 3600,
                        "mode": "timer"
                      },
                      "security_policy": "must_secure",
                      "status": "secured",
                      "status_reasons": [],
                      "updated_at": "2020-11-02T20:40:29.622Z",
                      "window_size": 512
                    }
                  • {
                      "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 MACsec",
                          "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                        }
                      ],
                      "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                    }
                  • {
                      "errors": [
                        {
                          "code": "not_found",
                          "message": "Cannot find MACsec",
                          "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                        }
                      ],
                      "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                    }

                  Set MACsec configuration

                  Sets the MACsec configuration on a direct link, enabling the feature.

                  Sets the MACsec configuration on a direct link, enabling the feature.

                  Sets the MACsec configuration on a direct link, enabling the feature.

                  Sets the MACsec configuration on a direct link, enabling the feature.

                  Sets the MACsec configuration on a direct link, enabling the feature.

                  PUT /gateways/{id}/macsec
                  ServiceCall<GatewayMacsec> setGatewayMacsec(SetGatewayMacsecOptions setGatewayMacsecOptions)
                  setGatewayMacsec(params)
                  set_gateway_macsec(
                          self,
                          id: str,
                          active: bool,
                          caks: List['GatewayMacsecCakPrototype'],
                          sak_rekey: 'SakRekeyPrototype',
                          security_policy: str,
                          *,
                          window_size: Optional[int] = None,
                          if_match: Optional[str] = None,
                          **kwargs,
                      ) -> DetailedResponse
                  (directLink *DirectLinkV1) SetGatewayMacsec(setGatewayMacsecOptions *SetGatewayMacsecOptions) (result *GatewayMacsec, response *core.DetailedResponse, err error)
                  (directLink *DirectLinkV1) SetGatewayMacsecWithContext(ctx context.Context, setGatewayMacsecOptions *SetGatewayMacsecOptions) (result *GatewayMacsec, response *core.DetailedResponse, err error)

                  Request

                  Use the SetGatewayMacsecOptions.Builder to create a SetGatewayMacsecOptions object that contains the parameter values for the setGatewayMacsec method.

                  Instantiate the SetGatewayMacsecOptions struct and set the fields to provide parameter values for the SetGatewayMacsec method.

                  Custom Headers

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

                    If-Match is required when the resource exists and has an 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 MACsec configuration prototype.

                  The setGatewayMacsec 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 if the MACsec feature should initially be active (true) or inactive (false) for a gateway.

                    Examples:
                  • List of all connectivity association keys (CAKs) to be associated associated with the MACsec feature on a direct link.

                    There must be at least one CAK with session: primary. There can be at most one CAK with session: fallback

                    All CAKs must reference a unique key.

                    Possible values: 1 ≤ number of items ≤ 4

                  • SAK rekey mode based on length of time since last rekey.

                    • Determines how packets without MACsec headers are handled.

                      must_secure - Packets without MACsec headers are dropped. This policy should be used to prefer security over network availability. should_secure - Packets without MACsec headers are allowed. This policy should be used to prefer network availability over security.

                      Allowable values: [must_secure,should_secure]

                      Examples:
                    • The window size determines the number of frames in a window for replay protection.

                      Replay protection is used to counter replay attacks. Frames within a window size can be out of order and are not replay protected.

                      Possible values: 0 ≤ value ≤ 65535

                      Default: 512

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

                      If-Match is required when the resource exists and has an ETag value.

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

                      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 if the MACsec feature should initially be active (true) or inactive (false) for a gateway.

                      Examples:
                    • List of all connectivity association keys (CAKs) to be associated associated with the MACsec feature on a direct link.

                      There must be at least one CAK with session: primary. There can be at most one CAK with session: fallback

                      All CAKs must reference a unique key.

                      Possible values: 1 ≤ number of items ≤ 4

                    • SAK rekey mode based on length of time since last rekey.

                      • Determines how packets without MACsec headers are handled.

                        must_secure - Packets without MACsec headers are dropped. This policy should be used to prefer security over network availability. should_secure - Packets without MACsec headers are allowed. This policy should be used to prefer network availability over security.

                        Allowable values: [must_secure,should_secure]

                        Examples:
                      • The window size determines the number of frames in a window for replay protection.

                        Replay protection is used to counter replay attacks. Frames within a window size can be out of order and are not replay protected.

                        Possible values: 0 ≤ value ≤ 65535

                        Default: 512

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

                        If-Match is required when the resource exists and has an ETag value.

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

                        Examples:

                      WithContext method only

                      The SetGatewayMacsec options.

                      • // Request models needed by this operation.
                        
                        // HpcsKeyIdentity
                        const hpcsKeyIdentityModel = {
                          crn: 'crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222',
                        };
                        
                        // GatewayMacsecCakPrototype
                        const gatewayMacsecCakPrototypeModel = {
                          key: hpcsKeyIdentityModel,
                          name: '1000',
                          session: 'primary',
                        };
                        
                        // SakRekeyPrototypeSakRekeyTimerModePrototype
                        const sakRekeyPrototypeModel = {
                          interval: 3600,
                          mode: 'timer',
                        };
                        
                        const params = {
                          id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          active: true,
                          caks: [gatewayMacsecCakPrototypeModel],
                          sakRekey: sakRekeyPrototypeModel,
                          securityPolicy: 'must_secure',
                          ifMatch: 'W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"',
                        };
                        
                        let res;
                        try {
                          res = await directLinkService.setGatewayMacsec(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • HpcsKeyIdentity hpcsKeyIdentityModel = new HpcsKeyIdentity.Builder()
                          .crn("crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222")
                          .build();
                        GatewayMacsecCakPrototype gatewayMacsecCakPrototypeModel = new GatewayMacsecCakPrototype.Builder()
                          .key(hpcsKeyIdentityModel)
                          .name("1000")
                          .session("primary")
                          .build();
                        SakRekeyPrototypeSakRekeyTimerModePrototype sakRekeyPrototypeModel = new SakRekeyPrototypeSakRekeyTimerModePrototype.Builder()
                          .interval(Long.valueOf("3600"))
                          .mode("timer")
                          .build();
                        SetGatewayMacsecOptions setGatewayMacsecOptions = new SetGatewayMacsecOptions.Builder()
                          .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                          .active(true)
                          .caks(java.util.Arrays.asList(gatewayMacsecCakPrototypeModel))
                          .sakRekey(sakRekeyPrototypeModel)
                          .securityPolicy("must_secure")
                          .ifMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"")
                          .build();
                        
                        Response<GatewayMacsec> response = directLinkService.setGatewayMacsec(setGatewayMacsecOptions).execute();
                        GatewayMacsec gatewayMacsec = response.getResult();
                        
                        System.out.println(gatewayMacsec);
                      • hpcsKeyIdentityModel := &directlinkv1.HpcsKeyIdentity{
                          Crn: core.StringPtr("crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"),
                        }
                        
                        gatewayMacsecCakPrototypeModel := &directlinkv1.GatewayMacsecCakPrototype{
                          Key: hpcsKeyIdentityModel,
                          Name: core.StringPtr("1000"),
                          Session: core.StringPtr("primary"),
                        }
                        
                        sakRekeyPrototypeModel := &directlinkv1.SakRekeyPrototypeSakRekeyTimerModePrototype{
                          Interval: core.Int64Ptr(int64(3600)),
                          Mode: core.StringPtr("timer"),
                        }
                        
                        setGatewayMacsecOptions := directLinkService.NewSetGatewayMacsecOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          true,
                          []directlinkv1.GatewayMacsecCakPrototype{*gatewayMacsecCakPrototypeModel},
                          sakRekeyPrototypeModel,
                          "must_secure",
                        )
                        setGatewayMacsecOptions.SetIfMatch("W/\"96d225c4-56bd-43d9-98fc-d7148e5c5028\"")
                        
                        gatewayMacsec, response, err := directLinkService.SetGatewayMacsec(setGatewayMacsecOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayMacsec, "", "  ")
                        fmt.Println(string(b))
                      • hpcs_key_identity_model = {
                          'crn': 'crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222',
                        }
                        
                        gateway_macsec_cak_prototype_model = {
                          'key': hpcs_key_identity_model,
                          'name': '1000',
                          'session': 'primary',
                        }
                        
                        sak_rekey_prototype_model = {
                          'interval': 3600,
                          'mode': 'timer',
                        }
                        
                        response = direct_link_service.set_gateway_macsec(
                          id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          active=True,
                          caks=[gateway_macsec_cak_prototype_model],
                          sak_rekey=sak_rekey_prototype_model,
                          security_policy='must_secure',
                          if_match='W/"96d225c4-56bd-43d9-98fc-d7148e5c5028"',
                        )
                        gateway_macsec = response.get_result()
                        
                        print(json.dumps(gateway_macsec, indent=2))

                      Response

                      MACsec configuration information of a Direct Link gateway.

                      MACsec configuration information of a Direct Link gateway.

                      MACsec configuration information of a Direct Link gateway.

                      MACsec configuration information of a Direct Link gateway.

                      MACsec configuration information of a Direct Link gateway.

                      Status Code

                      • The MACsec configuration of the direct link was already set.

                      • The MACsec configuration of the direct link was set successfully.

                      • The request was invalid.

                      • A direct link with the specified identifier could not be found.

                      Example responses
                      • {
                          "active": true,
                          "cipher_suite": "gcm_aes_xpn_256",
                          "confidentiality_offset": 0,
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "key_server_priority": 255,
                          "sak_rekey": {
                            "interval": 3600,
                            "mode": "timer"
                          },
                          "security_policy": "must_secure",
                          "status": "secured",
                          "status_reasons": [],
                          "updated_at": "2020-11-02T20:40:29.622Z",
                          "window_size": 512
                        }
                      • {
                          "active": true,
                          "cipher_suite": "gcm_aes_xpn_256",
                          "confidentiality_offset": 0,
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "key_server_priority": 255,
                          "sak_rekey": {
                            "interval": 3600,
                            "mode": "timer"
                          },
                          "security_policy": "must_secure",
                          "status": "secured",
                          "status_reasons": [],
                          "updated_at": "2020-11-02T20:40:29.622Z",
                          "window_size": 512
                        }
                      • {
                          "active": true,
                          "cipher_suite": "gcm_aes_xpn_256",
                          "confidentiality_offset": 0,
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "key_server_priority": 255,
                          "sak_rekey": {
                            "interval": 3600,
                            "mode": "timer"
                          },
                          "security_policy": "must_secure",
                          "status": "secured",
                          "status_reasons": [],
                          "updated_at": "2020-11-02T20:40:29.622Z",
                          "window_size": 512
                        }
                      • {
                          "active": true,
                          "cipher_suite": "gcm_aes_xpn_256",
                          "confidentiality_offset": 0,
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "key_server_priority": 255,
                          "sak_rekey": {
                            "interval": 3600,
                            "mode": "timer"
                          },
                          "security_policy": "must_secure",
                          "status": "secured",
                          "status_reasons": [],
                          "updated_at": "2020-11-02T20:40:29.622Z",
                          "window_size": 512
                        }
                      • {
                          "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 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"
                        }

                      List MACsec CAKs

                      List the CAKs associated with the MACsec configuration of a direct link.

                      List the CAKs associated with the MACsec configuration of a direct link.

                      List the CAKs associated with the MACsec configuration of a direct link.

                      List the CAKs associated with the MACsec configuration of a direct link.

                      List the CAKs associated with the MACsec configuration of a direct link.

                      GET /gateways/{id}/macsec/caks
                      ServiceCall<GatewayMacsecCakCollection> listGatewayMacsecCaks(ListGatewayMacsecCaksOptions listGatewayMacsecCaksOptions)
                      listGatewayMacsecCaks(params)
                      list_gateway_macsec_caks(
                              self,
                              id: str,
                              **kwargs,
                          ) -> DetailedResponse
                      (directLink *DirectLinkV1) ListGatewayMacsecCaks(listGatewayMacsecCaksOptions *ListGatewayMacsecCaksOptions) (result *GatewayMacsecCakCollection, response *core.DetailedResponse, err error)
                      (directLink *DirectLinkV1) ListGatewayMacsecCaksWithContext(ctx context.Context, listGatewayMacsecCaksOptions *ListGatewayMacsecCaksOptions) (result *GatewayMacsecCakCollection, response *core.DetailedResponse, err error)

                      Request

                      Use the ListGatewayMacsecCaksOptions.Builder to create a ListGatewayMacsecCaksOptions object that contains the parameter values for the listGatewayMacsecCaks method.

                      Instantiate the ListGatewayMacsecCaksOptions struct and set the fields to provide parameter values for the ListGatewayMacsecCaks 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 listGatewayMacsecCaks 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 ListGatewayMacsecCaks options.

                      • const params = {
                          id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                        };
                        
                        let res;
                        try {
                          res = await directLinkService.listGatewayMacsecCaks(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • ListGatewayMacsecCaksOptions listGatewayMacsecCaksOptions = new ListGatewayMacsecCaksOptions.Builder()
                          .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                          .build();
                        
                        Response<GatewayMacsecCakCollection> response = directLinkService.listGatewayMacsecCaks(listGatewayMacsecCaksOptions).execute();
                        GatewayMacsecCakCollection gatewayMacsecCakCollection = response.getResult();
                        
                        System.out.println(gatewayMacsecCakCollection);
                      • listGatewayMacsecCaksOptions := directLinkService.NewListGatewayMacsecCaksOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        gatewayMacsecCakCollection, response, err := directLinkService.ListGatewayMacsecCaks(listGatewayMacsecCaksOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayMacsecCakCollection, "", "  ")
                        fmt.Println(string(b))
                      • response = direct_link_service.list_gateway_macsec_caks(
                          id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                        )
                        gateway_macsec_cak_collection = response.get_result()
                        
                        print(json.dumps(gateway_macsec_cak_collection, indent=2))

                      Response

                      List of all connectivity association keys (CAKs) associated with the MACsec feature on a direct link.

                      List of all connectivity association keys (CAKs) associated with the MACsec feature on a direct link.

                      List of all connectivity association keys (CAKs) associated with the MACsec feature on a direct link.

                      List of all connectivity association keys (CAKs) associated with the MACsec feature on a direct link.

                      List of all connectivity association keys (CAKs) associated with the MACsec feature on a direct link.

                      Status Code

                      • The list of CAKs was retrieved successfully.

                      • A direct link with the specified identifier could not be found or no MACsec configuration set for the direct link.

                      Example responses
                      • {
                          "caks": [
                            {
                              "created_at": "2020-11-02T20:40:29.622Z",
                              "id": "00000000-fee4-41c7-9e11-aaaaaaaaaaaa",
                              "key": {
                                "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                              },
                              "name": "1000",
                              "session": "primary",
                              "status": "operational",
                              "updated_at": "2020-11-02T20:40:29.622Z"
                            },
                            {
                              "created_at": "2020-11-02T20:40:29.622Z",
                              "id": "11111111-fee4-41c7-9e11-cccccccccccc",
                              "key": {
                                "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                              },
                              "name": "AF00",
                              "session": "fallback",
                              "status": "failed",
                              "updated_at": "2020-11-02T20:40:29.622Z"
                            }
                          ]
                        }
                      • {
                          "caks": [
                            {
                              "created_at": "2020-11-02T20:40:29.622Z",
                              "id": "00000000-fee4-41c7-9e11-aaaaaaaaaaaa",
                              "key": {
                                "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                              },
                              "name": "1000",
                              "session": "primary",
                              "status": "operational",
                              "updated_at": "2020-11-02T20:40:29.622Z"
                            },
                            {
                              "created_at": "2020-11-02T20:40:29.622Z",
                              "id": "11111111-fee4-41c7-9e11-cccccccccccc",
                              "key": {
                                "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                              },
                              "name": "AF00",
                              "session": "fallback",
                              "status": "failed",
                              "updated_at": "2020-11-02T20:40:29.622Z"
                            }
                          ]
                        }
                      • {
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "Cannot find MACsec",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }
                      • {
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "Cannot find MACsec",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }

                      Create MACsec CAK

                      Creates a CAK associated with the MACsec configuration of a direct link.

                      Creates a CAK associated with the MACsec configuration of a direct link.

                      Creates a CAK associated with the MACsec configuration of a direct link.

                      Creates a CAK associated with the MACsec configuration of a direct link.

                      Creates a CAK associated with the MACsec configuration of a direct link.

                      POST /gateways/{id}/macsec/caks
                      ServiceCall<GatewayMacsecCak> createGatewayMacsecCak(CreateGatewayMacsecCakOptions createGatewayMacsecCakOptions)
                      createGatewayMacsecCak(params)
                      create_gateway_macsec_cak(
                              self,
                              id: str,
                              key: 'HpcsKeyIdentity',
                              name: str,
                              session: str,
                              **kwargs,
                          ) -> DetailedResponse
                      (directLink *DirectLinkV1) CreateGatewayMacsecCak(createGatewayMacsecCakOptions *CreateGatewayMacsecCakOptions) (result *GatewayMacsecCak, response *core.DetailedResponse, err error)
                      (directLink *DirectLinkV1) CreateGatewayMacsecCakWithContext(ctx context.Context, createGatewayMacsecCakOptions *CreateGatewayMacsecCakOptions) (result *GatewayMacsecCak, response *core.DetailedResponse, err error)

                      Request

                      Use the CreateGatewayMacsecCakOptions.Builder to create a CreateGatewayMacsecCakOptions object that contains the parameter values for the createGatewayMacsecCak method.

                      Instantiate the CreateGatewayMacsecCakOptions struct and set the fields to provide parameter values for the CreateGatewayMacsecCak 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 MACsec CAK prototype.

                      The createGatewayMacsecCak 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 name identifies the connectivity association key (CAK) within the MACsec key chain.

                        The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive.

                        This value, along with the material of the key, must match on the MACsec peers.

                        Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^([0-9a-fA-F]{2}){1,32}$/

                        Examples:
                      • The intended session the key will be used to secure.

                        If the primary MACsec session fails due to a key/key name mismatch on the peers, the fallback session can take over.

                        There must be a primary session CAK. A fallback CAK is optional.

                        Allowable values: [primary,fallback]

                      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 name identifies the connectivity association key (CAK) within the MACsec key chain.

                        The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive.

                        This value, along with the material of the key, must match on the MACsec peers.

                        Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^([0-9a-fA-F]{2}){1,32}$/

                        Examples:
                      • The intended session the key will be used to secure.

                        If the primary MACsec session fails due to a key/key name mismatch on the peers, the fallback session can take over.

                        There must be a primary session CAK. A fallback CAK is optional.

                        Allowable values: [primary,fallback]

                      WithContext method only

                      The CreateGatewayMacsecCak options.

                      • // Request models needed by this operation.
                        
                        // HpcsKeyIdentity
                        const hpcsKeyIdentityModel = {
                          crn: 'crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222',
                        };
                        
                        const params = {
                          id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          key: hpcsKeyIdentityModel,
                          name: '1000',
                          session: 'primary',
                        };
                        
                        let res;
                        try {
                          res = await directLinkService.createGatewayMacsecCak(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • HpcsKeyIdentity hpcsKeyIdentityModel = new HpcsKeyIdentity.Builder()
                          .crn("crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222")
                          .build();
                        CreateGatewayMacsecCakOptions createGatewayMacsecCakOptions = new CreateGatewayMacsecCakOptions.Builder()
                          .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                          .key(hpcsKeyIdentityModel)
                          .name("1000")
                          .session("primary")
                          .build();
                        
                        Response<GatewayMacsecCak> response = directLinkService.createGatewayMacsecCak(createGatewayMacsecCakOptions).execute();
                        GatewayMacsecCak gatewayMacsecCak = response.getResult();
                        
                        System.out.println(gatewayMacsecCak);
                      • hpcsKeyIdentityModel := &directlinkv1.HpcsKeyIdentity{
                          Crn: core.StringPtr("crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"),
                        }
                        
                        createGatewayMacsecCakOptions := directLinkService.NewCreateGatewayMacsecCakOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          hpcsKeyIdentityModel,
                          "1000",
                          "primary",
                        )
                        
                        gatewayMacsecCak, response, err := directLinkService.CreateGatewayMacsecCak(createGatewayMacsecCakOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayMacsecCak, "", "  ")
                        fmt.Println(string(b))
                      • hpcs_key_identity_model = {
                          'crn': 'crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222',
                        }
                        
                        response = direct_link_service.create_gateway_macsec_cak(
                          id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          key=hpcs_key_identity_model,
                          name='1000',
                          session='primary',
                        )
                        gateway_macsec_cak = response.get_result()
                        
                        print(json.dumps(gateway_macsec_cak, indent=2))

                      Response

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      Status Code

                      • MACsec CAK successfully created.

                      • The request was invalid.

                      • A direct link with the specified identifier could not be found or no MACsec configuration set for the direct link.

                      Example responses
                      • {
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "id": "00000000-fee4-41c7-9e11-aaaaaaaaaaaa",
                          "key": {
                            "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                          },
                          "name": "1000",
                          "session": "primary",
                          "status": "operational",
                          "updated_at": "2020-11-02T20:40:29.622Z"
                        }
                      • {
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "id": "00000000-fee4-41c7-9e11-aaaaaaaaaaaa",
                          "key": {
                            "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                          },
                          "name": "1000",
                          "session": "primary",
                          "status": "operational",
                          "updated_at": "2020-11-02T20:40:29.622Z"
                        }
                      • {
                          "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 MACsec",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }
                      • {
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "Cannot find MACsec",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }

                      Delete MACsec CAK

                      Deletes the CAK from the MACsec configuration of a direct link.

                      Deletes the CAK from the MACsec configuration of a direct link.

                      Deletes the CAK from the MACsec configuration of a direct link.

                      Deletes the CAK from the MACsec configuration of a direct link.

                      Deletes the CAK from the MACsec configuration of a direct link.

                      DELETE /gateways/{id}/macsec/caks/{cak_id}
                      ServiceCall<Void> deleteGatewayMacsecCak(DeleteGatewayMacsecCakOptions deleteGatewayMacsecCakOptions)
                      deleteGatewayMacsecCak(params)
                      delete_gateway_macsec_cak(
                              self,
                              id: str,
                              cak_id: str,
                              **kwargs,
                          ) -> DetailedResponse
                      (directLink *DirectLinkV1) DeleteGatewayMacsecCak(deleteGatewayMacsecCakOptions *DeleteGatewayMacsecCakOptions) (response *core.DetailedResponse, err error)
                      (directLink *DirectLinkV1) DeleteGatewayMacsecCakWithContext(ctx context.Context, deleteGatewayMacsecCakOptions *DeleteGatewayMacsecCakOptions) (response *core.DetailedResponse, err error)

                      Request

                      Use the DeleteGatewayMacsecCakOptions.Builder to create a DeleteGatewayMacsecCakOptions object that contains the parameter values for the deleteGatewayMacsecCak method.

                      Instantiate the DeleteGatewayMacsecCakOptions struct and set the fields to provide parameter values for the DeleteGatewayMacsecCak 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

                      • MACsec CAK identifier

                        Possible values: length ≤ 128, Value must match regular expression ^[-0-9a-z]+$

                        Example: ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4

                      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 deleteGatewayMacsecCak 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:
                      • MACsec CAK identifier.

                        Possible values: length ≤ 128, Value must match regular expression /^[-0-9a-z]+$/

                        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:
                      • MACsec CAK identifier.

                        Possible values: length ≤ 128, Value must match regular expression /^[-0-9a-z]+$/

                        Examples:

                      WithContext method only

                      The DeleteGatewayMacsecCak options.

                      • const params = {
                          id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          cakId: 'ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4',
                        };
                        
                        try {
                          await directLinkService.deleteGatewayMacsecCak(params);
                        } catch (err) {
                          console.warn(err);
                        }
                      • DeleteGatewayMacsecCakOptions deleteGatewayMacsecCakOptions = new DeleteGatewayMacsecCakOptions.Builder()
                          .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                          .cakId("ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4")
                          .build();
                        
                        Response<Void> response = directLinkService.deleteGatewayMacsecCak(deleteGatewayMacsecCakOptions).execute();
                      • deleteGatewayMacsecCakOptions := directLinkService.NewDeleteGatewayMacsecCakOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                        )
                        
                        response, err := directLinkService.DeleteGatewayMacsecCak(deleteGatewayMacsecCakOptions)
                        if err != nil {
                          panic(err)
                        }
                        if response.StatusCode != 204 {
                          fmt.Printf("\nUnexpected response status code received from DeleteGatewayMacsecCak(): %d\n", response.StatusCode)
                        }
                      • response = direct_link_service.delete_gateway_macsec_cak(
                          id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          cak_id='ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4',
                        )

                      Response

                      Status Code

                      • The MACsec CAK was deleted successfully.

                      • Cannot delete primary CAK, MACsec configuration must have a valid primary CAK

                      • A direct link with the specified identifier could not be found or no MACsec configuration set for the direct link or a MACsec CAK with the specified identifier could not be found.

                      Example responses
                      • {
                          "errors": [
                            {
                              "code": "invalid_request",
                              "message": "Cannot delete primary CAK, MACsec configuration must have a valid primary CAK",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }
                      • {
                          "errors": [
                            {
                              "code": "invalid_request",
                              "message": "Cannot delete primary CAK, MACsec configuration must have a valid primary CAK",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }
                      • {
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "Cannot find MACsec CAK",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }
                      • {
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "Cannot find MACsec CAK",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }

                      Get MACsec CAK

                      Get a MACsec CAK by its identifier.

                      Get a MACsec CAK by its identifier.

                      Get a MACsec CAK by its identifier.

                      Get a MACsec CAK by its identifier.

                      Get a MACsec CAK by its identifier.

                      GET /gateways/{id}/macsec/caks/{cak_id}
                      ServiceCall<GatewayMacsecCak> getGatewayMacsecCak(GetGatewayMacsecCakOptions getGatewayMacsecCakOptions)
                      getGatewayMacsecCak(params)
                      get_gateway_macsec_cak(
                              self,
                              id: str,
                              cak_id: str,
                              **kwargs,
                          ) -> DetailedResponse
                      (directLink *DirectLinkV1) GetGatewayMacsecCak(getGatewayMacsecCakOptions *GetGatewayMacsecCakOptions) (result *GatewayMacsecCak, response *core.DetailedResponse, err error)
                      (directLink *DirectLinkV1) GetGatewayMacsecCakWithContext(ctx context.Context, getGatewayMacsecCakOptions *GetGatewayMacsecCakOptions) (result *GatewayMacsecCak, response *core.DetailedResponse, err error)

                      Request

                      Use the GetGatewayMacsecCakOptions.Builder to create a GetGatewayMacsecCakOptions object that contains the parameter values for the getGatewayMacsecCak method.

                      Instantiate the GetGatewayMacsecCakOptions struct and set the fields to provide parameter values for the GetGatewayMacsecCak 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

                      • MACsec CAK identifier

                        Possible values: length ≤ 128, Value must match regular expression ^[-0-9a-z]+$

                        Example: ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4

                      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 getGatewayMacsecCak 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:
                      • MACsec CAK identifier.

                        Possible values: length ≤ 128, Value must match regular expression /^[-0-9a-z]+$/

                        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:
                      • MACsec CAK identifier.

                        Possible values: length ≤ 128, Value must match regular expression /^[-0-9a-z]+$/

                        Examples:

                      WithContext method only

                      The GetGatewayMacsecCak options.

                      • const params = {
                          id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          cakId: 'ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4',
                        };
                        
                        let res;
                        try {
                          res = await directLinkService.getGatewayMacsecCak(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • GetGatewayMacsecCakOptions getGatewayMacsecCakOptions = new GetGatewayMacsecCakOptions.Builder()
                          .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                          .cakId("ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4")
                          .build();
                        
                        Response<GatewayMacsecCak> response = directLinkService.getGatewayMacsecCak(getGatewayMacsecCakOptions).execute();
                        GatewayMacsecCak gatewayMacsecCak = response.getResult();
                        
                        System.out.println(gatewayMacsecCak);
                      • getGatewayMacsecCakOptions := directLinkService.NewGetGatewayMacsecCakOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                        )
                        
                        gatewayMacsecCak, response, err := directLinkService.GetGatewayMacsecCak(getGatewayMacsecCakOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayMacsecCak, "", "  ")
                        fmt.Println(string(b))
                      • response = direct_link_service.get_gateway_macsec_cak(
                          id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          cak_id='ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4',
                        )
                        gateway_macsec_cak = response.get_result()
                        
                        print(json.dumps(gateway_macsec_cak, indent=2))

                      Response

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      Status Code

                      • The MACsec CAK was retrieved successfully.

                      • A direct link with the specified identifier could not be found or no MACsec configuration set for the direct link or a MACsec CAK with the specified identifier could not be found.

                      Example responses
                      • {
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "id": "00000000-fee4-41c7-9e11-aaaaaaaaaaaa",
                          "key": {
                            "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                          },
                          "name": "1000",
                          "session": "primary",
                          "status": "operational",
                          "updated_at": "2020-11-02T20:40:29.622Z"
                        }
                      • {
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "id": "00000000-fee4-41c7-9e11-aaaaaaaaaaaa",
                          "key": {
                            "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                          },
                          "name": "1000",
                          "session": "primary",
                          "status": "operational",
                          "updated_at": "2020-11-02T20:40:29.622Z"
                        }
                      • {
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "Cannot find MACsec CAK",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }
                      • {
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "Cannot find MACsec CAK",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }

                      Update MACsec CAK

                      Updates the CAK on the MACsec configuration of a direct link.

                      Updates the CAK on the MACsec configuration of a direct link.

                      Updates the CAK on the MACsec configuration of a direct link.

                      Updates the CAK on the MACsec configuration of a direct link.

                      Updates the CAK on the MACsec configuration of a direct link.

                      PATCH /gateways/{id}/macsec/caks/{cak_id}
                      ServiceCall<GatewayMacsecCak> updateGatewayMacsecCak(UpdateGatewayMacsecCakOptions updateGatewayMacsecCakOptions)
                      updateGatewayMacsecCak(params)
                      update_gateway_macsec_cak(
                              self,
                              id: str,
                              cak_id: str,
                              gateway_macsec_cak_patch: 'GatewayMacsecCakPatch',
                              **kwargs,
                          ) -> DetailedResponse
                      (directLink *DirectLinkV1) UpdateGatewayMacsecCak(updateGatewayMacsecCakOptions *UpdateGatewayMacsecCakOptions) (result *GatewayMacsecCak, response *core.DetailedResponse, err error)
                      (directLink *DirectLinkV1) UpdateGatewayMacsecCakWithContext(ctx context.Context, updateGatewayMacsecCakOptions *UpdateGatewayMacsecCakOptions) (result *GatewayMacsecCak, response *core.DetailedResponse, err error)

                      Request

                      Use the UpdateGatewayMacsecCakOptions.Builder to create a UpdateGatewayMacsecCakOptions object that contains the parameter values for the updateGatewayMacsecCak method.

                      Instantiate the UpdateGatewayMacsecCakOptions struct and set the fields to provide parameter values for the UpdateGatewayMacsecCak 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

                      • MACsec CAK identifier

                        Possible values: length ≤ 128, Value must match regular expression ^[-0-9a-z]+$

                        Example: ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4

                      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 MACsec CAK patch.

                      The updateGatewayMacsecCak 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:
                      • MACsec CAK identifier.

                        Possible values: length ≤ 128, Value must match regular expression /^[-0-9a-z]+$/

                        Examples:
                      • The name identifies the connectivity association key (CAK) within the MACsec key chain.

                        The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive.

                        This value, along with the material of the key, must match on the MACsec peers.

                        Possible values: 2 ≤ length ≤ 64, Value must match regular expression /^([0-9a-fA-F]{2}){1,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:
                      • MACsec CAK identifier.

                        Possible values: length ≤ 128, Value must match regular expression /^[-0-9a-z]+$/

                        Examples:
                      • Patch fields for CAK of MACsec configuration on a direct link.

                        When rotating a CAK, patch both the name and key fields simultaneously. Both must have new values and cannot match with another CAK. Neither name nor key is allowed to be patched on its own.

                      WithContext method only

                      The UpdateGatewayMacsecCak options.

                      • const params = {
                          id: '0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          cakId: 'ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4',
                        };
                        
                        let res;
                        try {
                          res = await directLinkService.updateGatewayMacsecCak(params);
                          console.log(JSON.stringify(res.result, null, 2));
                        } catch (err) {
                          console.warn(err);
                        }
                      • GatewayMacsecCakPatch gatewayMacsecCakPatchModel = new GatewayMacsecCakPatch.Builder()
                          .build();
                        Map<String, Object> gatewayMacsecCakPatchModelAsPatch = gatewayMacsecCakPatchModel.asPatch();
                        UpdateGatewayMacsecCakOptions updateGatewayMacsecCakOptions = new UpdateGatewayMacsecCakOptions.Builder()
                          .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                          .cakId("ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4")
                          .gatewayMacsecCakPatch(gatewayMacsecCakPatchModelAsPatch)
                          .build();
                        
                        Response<GatewayMacsecCak> response = directLinkService.updateGatewayMacsecCak(updateGatewayMacsecCakOptions).execute();
                        GatewayMacsecCak gatewayMacsecCak = response.getResult();
                        
                        System.out.println(gatewayMacsecCak);
                      • gatewayMacsecCakPatchModel := &directlinkv1.GatewayMacsecCakPatch{
                        }
                        gatewayMacsecCakPatchModelAsPatch, asPatchErr := gatewayMacsecCakPatchModel.AsPatch()
                        Expect(asPatchErr).To(BeNil())
                        
                        updateGatewayMacsecCakOptions := directLinkService.NewUpdateGatewayMacsecCakOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4",
                          gatewayMacsecCakPatchModelAsPatch,
                        )
                        
                        gatewayMacsecCak, response, err := directLinkService.UpdateGatewayMacsecCak(updateGatewayMacsecCakOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayMacsecCak, "", "  ")
                        fmt.Println(string(b))
                      • gateway_macsec_cak_patch_model = {
                        }
                        
                        response = direct_link_service.update_gateway_macsec_cak(
                          id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          cak_id='ef4dcb1a-fee4-41c7-9e11-9cd99e65c1f4',
                          gateway_macsec_cak_patch=gateway_macsec_cak_patch_model,
                        )
                        gateway_macsec_cak = response.get_result()
                        
                        print(json.dumps(gateway_macsec_cak, indent=2))

                      Response

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      A connectivity association key (CAK) used in the MACsec Key Agreement (MKA) protocol.

                      MACsec CAKs consist of both a name and key. The CAK's name must be a hexadecimal string of even lengths between 2 to 64 inclusive. The CAK's key must be a Hyper Protect Crypto Service Standard Key type=standard with key material a hexadecimal string exactly 64 characters in length.

                      Status Code

                      • The MACsec CAK was updated successfully.

                      • The request was invalid.

                      • A direct link with the specified identifier could not be found or no MACsec configuration set for the direct link or a MACsec CAK with the specified identifier could not be found.

                      Example responses
                      • {
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "id": "00000000-fee4-41c7-9e11-aaaaaaaaaaaa",
                          "key": {
                            "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                          },
                          "name": "1000",
                          "session": "primary",
                          "status": "operational",
                          "updated_at": "2020-11-02T20:40:29.622Z"
                        }
                      • {
                          "created_at": "2020-11-02T20:40:29.622Z",
                          "id": "00000000-fee4-41c7-9e11-aaaaaaaaaaaa",
                          "key": {
                            "crn": "crn:v1:bluemix:public:hs-crypto:us-south:a/4111d05f36894e3cb9b46a43556d9000:abc111b8-37aa-4034-9def-f2607c87aaaa:key:bbb222bc-430a-4de9-9aad-84e5bb022222"
                          },
                          "name": "1000",
                          "session": "primary",
                          "status": "operational",
                          "updated_at": "2020-11-02T20:40:29.622Z"
                        }
                      • {
                          "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 MACsec CAK",
                              "more_info": "https://cloud.ibm.com/apidocs/direct_link#error-handling"
                            }
                          ],
                          "trace": "03391bce-b650-475a-96b8-e47e70d93e54"
                        }
                      • {
                          "errors": [
                            {
                              "code": "not_found",
                              "message": "Cannot find MACsec CAK",
                              "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)

                      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);
                      • listGatewayRouteReportsOptions := directLinkService.NewListGatewayRouteReportsOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        routeReportCollection, response, err := directLinkService.ListGatewayRouteReports(listGatewayRouteReportsOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(routeReportCollection, "", "  ")
                        fmt.Println(string(b))
                      • 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)

                      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);
                      • createGatewayRouteReportOptions := directLinkService.NewCreateGatewayRouteReportOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        routeReport, response, err := directLinkService.CreateGatewayRouteReport(createGatewayRouteReportOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(routeReport, "", "  ")
                        fmt.Println(string(b))
                      • 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)

                      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();
                      • deleteGatewayRouteReportOptions := directLinkService.NewDeleteGatewayRouteReportOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        response, err := directLinkService.DeleteGatewayRouteReport(deleteGatewayRouteReportOptions)
                        if err != nil {
                          panic(err)
                        }
                        if response.StatusCode != 204 {
                          fmt.Printf("\nUnexpected response status code received from DeleteGatewayRouteReport(): %d\n", response.StatusCode)
                        }
                      • 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)

                      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);
                      • getGatewayRouteReportOptions := directLinkService.NewGetGatewayRouteReportOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        routeReport, response, err := directLinkService.GetGatewayRouteReport(getGatewayRouteReportOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(routeReport, "", "  ")
                        fmt.Println(string(b))
                      • 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)

                      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);
                      • listGatewayVirtualConnectionsOptions := directLinkService.NewListGatewayVirtualConnectionsOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        gatewayVirtualConnectionCollection, response, err := directLinkService.ListGatewayVirtualConnections(listGatewayVirtualConnectionsOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayVirtualConnectionCollection, "", "  ")
                        fmt.Println(string(b))
                      • 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: Optional[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)

                      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);
                      • createGatewayVirtualConnectionOptions := directLinkService.NewCreateGatewayVirtualConnectionOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "newVC",
                          "vpc",
                        )
                        
                        gatewayVirtualConnection, response, err := directLinkService.CreateGatewayVirtualConnection(createGatewayVirtualConnectionOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayVirtualConnection, "", "  ")
                        fmt.Println(string(b))
                      • 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)

                      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();
                      • deleteGatewayVirtualConnectionOptions := directLinkService.NewDeleteGatewayVirtualConnectionOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        response, err := directLinkService.DeleteGatewayVirtualConnection(deleteGatewayVirtualConnectionOptions)
                        if err != nil {
                          panic(err)
                        }
                        if response.StatusCode != 204 {
                          fmt.Printf("\nUnexpected response status code received from DeleteGatewayVirtualConnection(): %d\n", response.StatusCode)
                        }
                      • 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)

                      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);
                      • getGatewayVirtualConnectionOptions := directLinkService.NewGetGatewayVirtualConnectionOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        gatewayVirtualConnection, response, err := directLinkService.GetGatewayVirtualConnection(getGatewayVirtualConnectionOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayVirtualConnection, "", "  ")
                        fmt.Println(string(b))
                      • 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,
                              gateway_virtual_connection_patch_template: 'GatewayVirtualConnectionPatchTemplate',
                              **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)

                      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:
                      • Patch virtual connection template.

                      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);
                        }
                      • GatewayVirtualConnectionPatchTemplate gatewayVirtualConnectionPatchTemplateModel = new GatewayVirtualConnectionPatchTemplate.Builder()
                          .build();
                        Map<String, Object> gatewayVirtualConnectionPatchTemplateModelAsPatch = gatewayVirtualConnectionPatchTemplateModel.asPatch();
                        UpdateGatewayVirtualConnectionOptions updateGatewayVirtualConnectionOptions = new UpdateGatewayVirtualConnectionOptions.Builder()
                          .gatewayId("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                          .id("0a06fb9b-820f-4c44-8a31-77f1f0806d28")
                          .gatewayVirtualConnectionPatchTemplatePatch(gatewayVirtualConnectionPatchTemplateModelAsPatch)
                          .build();
                        
                        Response<GatewayVirtualConnection> response = directLinkService.updateGatewayVirtualConnection(updateGatewayVirtualConnectionOptions).execute();
                        GatewayVirtualConnection gatewayVirtualConnection = response.getResult();
                        
                        System.out.println(gatewayVirtualConnection);
                      • gatewayVirtualConnectionPatchTemplateModel := &directlinkv1.GatewayVirtualConnectionPatchTemplate{
                        }
                        gatewayVirtualConnectionPatchTemplateModelAsPatch, asPatchErr := gatewayVirtualConnectionPatchTemplateModel.AsPatch()
                        Expect(asPatchErr).To(BeNil())
                        
                        updateGatewayVirtualConnectionOptions := directLinkService.NewUpdateGatewayVirtualConnectionOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                          gatewayVirtualConnectionPatchTemplateModelAsPatch,
                        )
                        
                        gatewayVirtualConnection, response, err := directLinkService.UpdateGatewayVirtualConnection(updateGatewayVirtualConnectionOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(gatewayVirtualConnection, "", "  ")
                        fmt.Println(string(b))
                      • gateway_virtual_connection_patch_template_model = {
                        }
                        
                        response = direct_link_service.update_gateway_virtual_connection(
                          gateway_id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          id='0a06fb9b-820f-4c44-8a31-77f1f0806d28',
                          gateway_virtual_connection_patch_template=gateway_virtual_connection_patch_template_model,
                        )
                        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);
                      • listOfferingTypeLocationsOptions := directLinkService.NewListOfferingTypeLocationsOptions(
                          "dedicated",
                        )
                        
                        locationCollection, response, err := directLinkService.ListOfferingTypeLocations(listOfferingTypeLocationsOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(locationCollection, "", "  ")
                        fmt.Println(string(b))
                      • 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);
                      • listOfferingTypeLocationCrossConnectRoutersOptions := directLinkService.NewListOfferingTypeLocationCrossConnectRoutersOptions(
                          "dedicated",
                          "testString",
                        )
                        
                        locationCrossConnectRouterCollection, response, err := directLinkService.ListOfferingTypeLocationCrossConnectRouters(listOfferingTypeLocationCrossConnectRoutersOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(locationCrossConnectRouterCollection, "", "  ")
                        fmt.Println(string(b))
                      • 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);
                      • listOfferingTypeSpeedsOptions := directLinkService.NewListOfferingTypeSpeedsOptions(
                          "dedicated",
                        )
                        
                        offeringSpeedCollection, response, err := directLinkService.ListOfferingTypeSpeeds(listOfferingTypeSpeedsOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(offeringSpeedCollection, "", "  ")
                        fmt.Println(string(b))
                      • 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": [
                            {
                              "capabilities": [
                                "metered",
                                "non-metered"
                              ],
                              "link_speed": 2000,
                              "macsec_enabled": false
                            }
                          ]
                        }
                      • {
                          "speeds": [
                            {
                              "capabilities": [
                                "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: Optional[str] = None,
                              limit: Optional[int] = None,
                              location_name: Optional[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

                        Possible values: 1 ≤ length ≤ 512, Value must match regular expression ^[ -~]+$

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

                        Possible values: 1 ≤ length ≤ 512, Value must match regular expression /^[ -~]+$/

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

                        Possible values: 1 ≤ length ≤ 512, Value must match regular expression /^[ -~]+$/

                      • 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));
                      • listPortsOptions := &directlinkv1.ListPortsOptions{
                          Limit: core.Int64Ptr(int64(10)),
                          LocationName: core.StringPtr("testString"),
                        }
                        
                        pager, err := directLinkService.NewPortsPager(listPortsOptions)
                        if err != nil {
                          panic(err)
                        }
                        
                        var allResults []directlinkv1.Port
                        for pager.HasNext() {
                          nextPage, err := pager.GetNext()
                          if err != nil {
                            panic(err)
                          }
                          allResults = append(allResults, nextPage...)
                        }
                        b, _ := json.MarshalIndent(allResults, "", "  ")
                        fmt.Println(string(b))
                      • 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
                      • {
                          "first": {
                            "href": "https://directlink.cloud.ibm.com/v1/ports?limit=100"
                          },
                          "limit": 100,
                          "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
                              ]
                            }
                          ],
                          "total_count": 1
                        }
                      • {
                          "first": {
                            "href": "https://directlink.cloud.ibm.com/v1/ports?limit=100"
                          },
                          "limit": 100,
                          "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
                              ]
                            }
                          ],
                          "total_count": 1
                        }
                      • {
                          "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);
                      • getPortOptions := directLinkService.NewGetPortOptions(
                          "0a06fb9b-820f-4c44-8a31-77f1f0806d28",
                        )
                        
                        port, response, err := directLinkService.GetPort(getPortOptions)
                        if err != nil {
                          panic(err)
                        }
                        b, _ := json.MarshalIndent(port, "", "  ")
                        fmt.Println(string(b))
                      • 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"
                        }
                      id=goclassName=tab-item-selected