github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/rds/v3/security/UpdateDataIp.go (about) 1 package security 2 3 import ( 4 golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 "github.com/opentelekomcloud/gophertelekomcloud/internal/build" 6 ) 7 8 type UpdateDataIpOpts struct { 9 InstanceId string `json:"-"` 10 // Indicates the private IP address. 11 NewIp string `json:"new_ip"` 12 } 13 14 func UpdateDataIp(c *golangsdk.ServiceClient, opts UpdateDataIpOpts) (*string, error) { 15 b, err := build.RequestBody(opts, "") 16 if err != nil { 17 return nil, err 18 } 19 20 // PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/ip 21 raw, err := c.Put(c.ServiceURL("instances", opts.InstanceId, "ip"), b, nil, 22 &golangsdk.RequestOpts{OkCodes: []int{200}}) 23 return extra(err, raw) 24 }