I also tried with the pin name for constraint but I always get this error:
ERROR: [Constraints 18-851] Could not find an automatically derived clock matching the supplied criteria for renaming.
Resolution: Review the create_generated_clock renaming specification. Use the report_clocks command to obtain the details of currently defined clocks and ensure that the create_generated_clock rename constraint specifies appropriate data to select one generated clock for renaming. Verify that you are attempting to rename a tool derived generated clock, and not a user defined generated clock.
Even though the pin (or net) exist.