(instanceGUID, planGUID string, params map[string]interface{}, tags *[]string)
| 167 | } |
| 168 | |
| 169 | func (repo CloudControllerServiceRepository) UpdateServiceInstance(instanceGUID, planGUID string, params map[string]interface{}, tags *[]string) (err error) { |
| 170 | path := fmt.Sprintf("/v2/service_instances/%s?accepts_incomplete=true", instanceGUID) |
| 171 | request := models.ServiceInstanceUpdateRequest{ |
| 172 | PlanGUID: planGUID, |
| 173 | Params: params, |
| 174 | Tags: tags, |
| 175 | } |
| 176 | |
| 177 | jsonBytes, err := json.Marshal(request) |
| 178 | if err != nil { |
| 179 | return err |
| 180 | } |
| 181 | |
| 182 | err = repo.gateway.UpdateResource(repo.config.APIEndpoint(), path, bytes.NewReader(jsonBytes)) |
| 183 | |
| 184 | return |
| 185 | } |
| 186 | |
| 187 | func (repo CloudControllerServiceRepository) RenameService(instance models.ServiceInstance, newName string) (apiErr error) { |
| 188 | body := fmt.Sprintf(`{"name":"%s"}`, newName) |
nothing calls this directly
no test coverage detected