---
title: "rename(to:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdprim/spec/rename(to:)"
---

# rename(to:)

Sets the prim’s name.

## Declaration

```swift
func rename(to name: USDToken) throws
```

## Parameters

- `name`: The new name to assign.

## Discussion

Discussion note: An error if the new name is invalid or already used by a sibling.
