code: func (s *CA) UpsertCertAuthority(ca services.CertAuthority) error {
  	if err := ca.Check(); err != nil {
  		return trace.Wrap(err)
  	}
  	value, err := services.GetCertAuthorityMarshaler().MarshalCertAuthority(ca)
  	if err != nil {
  		return trace.Wrap(err)
  	}
  	item := backend.Item{
  		Key:     backend.Key(authoritiesPrefix, string(ca.GetType()), ca.GetName()),
  		Value:   value,
  		Expires: ca.Expiry(),
  		ID:      ca.GetResourceID(),
  	}
  
  	_, err = s.Put(context.TODO(), item)
  	if err != nil {
  		return trace.Wrap(err)
  	}
  	return nil
  }
docs: // UpsertCertAuthority updates or inserts a new certificate authority