November 23, 2017


Edit Network_Gateway object.

Important manual pages:

Author: SoftLayer Technologies, Inc. <>
package main

import (

func main() {
	// SoftLayer API username and key
	username := "set me"
	apikey   := "set me"

	// The id of gateway you wish to get its information 61522
	gatewayId := 244163

	// Build Network_Gateway skeleton in order to pass it to editObject() method.
	// Currently, the only value that can be edited is the name.
	templateObject := datatypes.Network_Gateway{
		Name: sl.String("New gateway's name"),

	// Create SoftLayer API session
	sess := session.New(username, apikey)

	// Get SoftLayer_Network_Gateway service
	service := services.GetNetworkGatewayService(sess)

	// Call to editObject() method in order to change the Gateway's name
	result, err := service.Id(gatewayId).EditObject(&templateObject)
	if err != nil {
		fmt.Printf("\n Unable to edit gateway object:\n - %s\n", err)



If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue