MCPcopy Index your code
hub / github.com/cloudfoundry/cli / UpdateServiceInstance

Method UpdateServiceInstance

cf/api/services.go:169–185  ·  view source on GitHub ↗
(instanceGUID, planGUID string, params map[string]interface{}, tags *[]string)

Source from the content-addressed store, hash-verified

167}
168
169func (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
187func (repo CloudControllerServiceRepository) RenameService(instance models.ServiceInstance, newName string) (apiErr error) {
188 body := fmt.Sprintf(`{"name":"%s"}`, newName)

Callers

nothing calls this directly

Calls 2

UpdateResourceMethod · 0.80
APIEndpointMethod · 0.65

Tested by

no test coverage detected