mirror of
https://github.com/status-im/consul.git
synced 2025-01-31 16:07:58 +00:00
654528ca60
* CD-556 rename partition partial that's only used in CLI Update CLI pages for partial rename API: Add partial for partition as body option API: Add partial for partition as query parameter Update API peering and members pages * acl/auth-methods.mdx Update partition partials to be generic * binding-rules.mdx, policies.mdx * roles.mdx, templated-policies.mdx * tokens.mdx, catalog.mdx, config.mdx, intentions.mdx * service.mdx, exported-services.mdx, kv.mdx, namespaces.mdx * Apply suggestions from code review Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> * Add partial to acl/auth-methods.mdx Fix headings indent in a few files. * Update website/content/api-docs/acl/auth-methods.mdx Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> --------- Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
66 lines
1.9 KiB
Plaintext
66 lines
1.9 KiB
Plaintext
---
|
|
layout: commands
|
|
page_title: 'Commands: ACL Token Clone'
|
|
description: |
|
|
The `consul acl token clone` command makes a copy of the ACL token of a specified ID.
|
|
---
|
|
|
|
# Consul ACL Token Clone
|
|
|
|
Command: `consul acl token clone`
|
|
|
|
Corresponding HTTP API Endpoint: [\[PUT\] /v1/acl/token/:AccessorID/clone](/consul/api-docs/acl/tokens#clone-a-token)
|
|
|
|
The `acl token clone` command clones an existing token.
|
|
|
|
The table below shows this command's [required ACLs](/consul/api-docs/api-structure#authentication). Configuration of
|
|
[blocking queries](/consul/api-docs/features/blocking) and [agent caching](/consul/api-docs/features/caching)
|
|
are not supported from commands, but may be from the corresponding HTTP endpoint.
|
|
|
|
| ACL Required |
|
|
| ------------ |
|
|
| `acl:write` |
|
|
|
|
## Usage
|
|
|
|
Usage: `consul acl token clone [options]`
|
|
|
|
#### Command Options
|
|
|
|
- `-description=<string>` - A description of the new cloned token.
|
|
|
|
- `-id=<string>` - The Accessor ID of the token to clone. It may be specified
|
|
as a unique ID prefix but will error if the prefix matches multiple token
|
|
Accessor IDs. The special value of 'anonymous' may be provided instead of
|
|
the anonymous tokens accessor ID
|
|
|
|
- `-format={pretty|json}` - Command output format. The default value is `pretty`.
|
|
|
|
#### Enterprise Options
|
|
|
|
@include 'cli-http-api-partition-options.mdx'
|
|
|
|
@include 'http_api_namespace_options.mdx'
|
|
|
|
#### API Options
|
|
|
|
@include 'http_api_options_client.mdx'
|
|
|
|
@include 'http_api_options_server.mdx'
|
|
|
|
## Examples
|
|
|
|
Clone a token:
|
|
|
|
```shell-session
|
|
$ consul acl token clone -id 59f8 -description "Clone of Super User"
|
|
Token cloned successfully.
|
|
AccessorID: dcfa52ed-9288-b3ff-056d-255ef69d2d88
|
|
SecretID: 0005d17e-5bb2-7e8b-7bfa-15f2eee9ad14
|
|
Description: Clone of Super User
|
|
Local: false
|
|
Create Time: 2018-10-22 16:26:02.909096 -0400 EDT
|
|
Policies:
|
|
00000000-0000-0000-0000-000000000001 - global-management
|
|
```
|