Description: The ServiceClient Delete method is part of the gophercloud library and allows users to delete a resource, such as a server or a network, using the relevant API.
// Authenticate with your OpenStack Cloud serviceClient.Authenticate()
// Create a networkV2 Client networkClient, _ := openstack.NewNetworkV2(serviceClient, gophercloud.EndpointOpts{})
// Delete a network networkId := "abcd1234-efgh-5678-ijkl-9012mnop3456" networkClient.Delete(networkId)
In both examples, the ServiceClient Delete method is used to delete either a server or a network. The package library used is github.com.rackspace.gophercloud. The examples also show the authentication process using a service client and the creation of a client for the relevant API (computeV2 for servers and networkV2 for networks).
Golang ServiceClient.Delete - 28 examples found. These are the top rated real world Golang examples of github.com/rackspace/gophercloud.ServiceClient.Delete extracted from open source projects. You can rate examples to help us improve the quality of examples.