github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/css/v1/snapshots/UpdateConfiguration.go (about) 1 package snapshots 2 3 import "github.com/opentelekomcloud/gophertelekomcloud" 4 5 type UpdateConfigurationOpts struct { 6 // OBS bucket used for index data backup. 7 // If there is snapshot data in an OBS bucket, only the OBS bucket is used and cannot be changed. 8 Bucket string `json:"bucket" required:"true"` 9 // IAM agency used to access OBS. 10 Agency string `json:"agency" required:"true"` 11 // Key ID used for snapshot encryption. 12 SnapshotCmkID string `json:"snapshotCmkId,omitempty"` 13 } 14 15 func UpdateConfiguration(client *golangsdk.ServiceClient, clusterID string, opts UpdateConfigurationOpts) (err error) { 16 b, err := golangsdk.BuildRequestBody(opts, "") 17 if err != nil { 18 return 19 } 20 21 _, err = client.Post(client.ServiceURL("clusters", clusterID, "index_snapshot", "setting"), b, nil, &golangsdk.RequestOpts{ 22 OkCodes: []int{200}, 23 }) 24 return 25 }