2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-15 17:47:21 +00:00
restic/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go

28 lines
643 B
Go
Raw Normal View History

2017-09-13 12:09:48 +00:00
// +build go1.7
2017-08-05 18:30:20 +00:00
package virtualmachine
import (
"encoding/xml"
)
const (
azureResourceExtensionsURL = "services/resourceextensions"
)
// GetResourceExtensions lists the resource extensions that are available to add
// to a virtual machine.
//
// See https://msdn.microsoft.com/en-us/library/azure/dn495441.aspx
func (c VirtualMachineClient) GetResourceExtensions() (extensions []ResourceExtension, err error) {
data, err := c.client.SendAzureGetRequest(azureResourceExtensionsURL)
if err != nil {
return extensions, err
}
var response ResourceExtensions
err = xml.Unmarshal(data, &response)
extensions = response.List
return
}