code: func (c *DeploymentsController) SetDeployment(ctx *app.SetDeploymentDeploymentsContext) error {
  
  	// we double check podcount here, because in the future we might have different query parameters
  	// (for setting different Pod switches) and PodCount might become optional
  	if ctx.PodCount == nil {
  		return errors.NewBadParameterError("podCount", "missing")
  	}
  
  	kc, err := c.GetKubeClient(ctx)
  	defer cleanup(kc)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  
  	kubeSpaceName, err := c.getSpaceNameFromSpaceID(ctx, ctx.SpaceID)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, errors.NewNotFoundError("osio space", ctx.SpaceID.String()))
  	}
  
  	_ /*oldCount*/, err = kc.ScaleDeployment(*kubeSpaceName, ctx.AppName, ctx.DeployName, *ctx.PodCount)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, errs.Wrapf(err, "error scaling deployment %s", ctx.DeployName))
  	}
  
  	return ctx.OK([]byte{})
  }
docs: // SetDeployment runs the setDeployment action.