github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/rds/v3/configurations/Get.go (about)

     1  package configurations
     2  
     3  import (
     4  	"github.com/opentelekomcloud/gophertelekomcloud"
     5  	"github.com/opentelekomcloud/gophertelekomcloud/internal/extract"
     6  	"github.com/opentelekomcloud/gophertelekomcloud/openstack"
     7  )
     8  
     9  // Get retrieves a particular Configuration based on its unique ID.
    10  func Get(client *golangsdk.ServiceClient, id string) (*Configuration, error) {
    11  	// GET https://{Endpoint}/v3/{project_id}/configurations/{config_id}
    12  	raw, err := client.Get(client.ServiceURL("configurations", id), nil, openstack.StdRequestOpts())
    13  	if err != nil {
    14  		return nil, err
    15  	}
    16  
    17  	var res Configuration
    18  	err = extract.Into(raw.Body, &res)
    19  	return &res, err
    20  }