File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
src/content/partials/workers/wrangler-commands Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,47 @@ Deleting namespace 15137f8edf6c09742227e99b08aaf273
144
144
Deleted namespace 15137f8edf6c09742227e99b08aaf273
145
145
` ` `
146
146
147
+ < AnchorHeading title=" ` rename` " slug=" kv-namespace-rename" depth={3} />
148
+
149
+ Rename a KV namespace.
150
+
151
+ ` ` ` txt
152
+ wrangler kv namespace rename {< NAME> | --namespace-id=< NAMESPACE_ID> } --new-name=< NEW_NAME> [OPTIONS]
153
+ ` ` `
154
+
155
+ - ` NAME` < Type text=" string" /> < MetaInfo text=" optional" />
156
+ - The current name (title) of the namespace to rename.
157
+ - ` --namespace-id` < Type text=" string" />
158
+ - The ID of the namespace to rename.
159
+ - ` --new-name` < Type text=" string" /> < MetaInfo text=" required" />
160
+ - The new name for the namespace.
161
+ - ` --env` < Type text=" string" /> < MetaInfo text=" optional" />
162
+ - Perform on a specific environment.
163
+
164
+ < Render file=" wrangler-commands/global-flags" product=" workers" />
165
+
166
+ The following is an example of renaming a KV namespace called ` MY_KV` to ` MY_RENAMED_KV` using the current name.
167
+
168
+ ` ` ` sh
169
+ npx wrangler kv namespace rename " MY_KV" --new-name=" MY_RENAMED_KV"
170
+ ` ` `
171
+
172
+ ` ` ` sh output
173
+ Renaming KV namespace f7b02e7fc70443149ac906dd81ec1791 to " MY_RENAMED_KV" .
174
+ ✨ Successfully renamed namespace to " MY_RENAMED_KV"
175
+ ` ` `
176
+
177
+ The following is an example of renaming a KV namespace using the namespace ID.
178
+
179
+ ` ` ` sh
180
+ npx wrangler kv namespace rename --namespace-id=f7b02e7fc70443149ac906dd81ec1791 --new-name=" MY_RENAMED_KV"
181
+ ` ` `
182
+
183
+ ` ` ` sh output
184
+ Renaming KV namespace f7b02e7fc70443149ac906dd81ec1791 to " MY_RENAMED_KV" .
185
+ ✨ Successfully renamed namespace to " MY_RENAMED_KV"
186
+ ` ` `
187
+
147
188
# # `kv key`
148
189
149
190
Manage key-value pairs within a Workers KV namespace.
You can’t perform that action at this time.
0 commit comments