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

     1  package instances
     2  
     3  import (
     4  	golangsdk "github.com/opentelekomcloud/gophertelekomcloud"
     5  )
     6  
     7  func StopInstance(client *golangsdk.ServiceClient, instanceId string) (*string, error) {
     8  	// POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/action/shutdown
     9  	raw, err := client.Post(client.ServiceURL("instances", instanceId, "action", "shutdown"), struct{}{}, nil, &golangsdk.RequestOpts{
    10  		OkCodes: []int{200},
    11  	})
    12  	return extraJob(err, raw)
    13  }