github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/dds/v3/instances/ManageSSL.go (about) 1 package instances 2 3 import ( 4 golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 "github.com/opentelekomcloud/gophertelekomcloud/internal/build" 6 ) 7 8 type SSLOpt struct { 9 SSL string `json:"ssl_option" required:"true"` 10 InstanceId string `json:"-"` 11 } 12 13 func SwitchSSL(client *golangsdk.ServiceClient, opts SSLOpt) (*string, error) { 14 b, err := build.RequestBody(opts, "") 15 if err != nil { 16 return nil, err 17 } 18 19 raw, err := client.Post(client.ServiceURL("instances", opts.InstanceId, "switch-ssl"), b, nil, &golangsdk.RequestOpts{ 20 OkCodes: []int{200, 202}, 21 }) 22 return extractJob(err, raw) 23 }