code: func (c *Client) UpdateRP(ctx context.Context, db string, rp string, upd *chronograf.RetentionPolicy) (*chronograf.RetentionPolicy, error) {
  	var buffer bytes.Buffer
  	buffer.WriteString(fmt.Sprintf(`ALTER RETENTION POLICY "%s" ON "%s"`, rp, db))
  	if len(upd.Duration) > 0 {
  		buffer.WriteString(" DURATION " + upd.Duration)
  	}
  	if upd.Replication > 0 {
  		buffer.WriteString(" REPLICATION " + fmt.Sprint(upd.Replication))
  	}
  	if len(upd.ShardDuration) > 0 {
  		buffer.WriteString(" SHARD DURATION " + upd.ShardDuration)
  	}
  	if upd.Default {
  		buffer.WriteString(" DEFAULT")
  	}
  	queryRes, err := c.Query(ctx, chronograf.Query{
  		Command: buffer.String(),
  		DB:      db,
  		RP:      rp,
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	// The ALTER RETENTION POLICIES statements puts the error within the results itself
  	// So, we have to crack open the results to see what happens
  	octets, err := queryRes.MarshalJSON()
  	if err != nil {
  		return nil, err
  	}
  
  	results := make([]struct{ Error string }, 0)
  	if err := json.Unmarshal(octets, &results); err != nil {
  		return nil, err
  	}
  
  	// At last, we can check if there are any error strings
  	for _, r := range results {
  		if r.Error != "" {
  			return nil, fmt.Errorf(r.Error)
  		}
  	}
  
  	res, err := c.getRP(ctx, db, upd.Name)
  	if err != nil {
  		return nil, err
  	}
  
  	return &res, nil
  }
docs: // UpdateRP updates a specific retention policy for a specific database