Available in Classic and VPC
Create a temporary URL that provides access to the object.
Syntax
The tempurl syntax is as follows:
swift tempurl \
<method> \
<time> \
<path> \
<key> \
[--absolute] \
[--prefix-based] \
[--iso8601] \
[--ip-range <ip-range>] \
[--digest <sha1|sha256|sha512>]
Options
This section describes the options available when running tempurl.
Required options
The following options are required for tempurl.
| Options | Type | Required | Description |
|---|---|---|---|
<method> |
String | Required | HTTP method allowed for temporary URLs
|
<time> |
String | Required | Expiration time of the temporary URL
|
<path> |
String | Required | Full path to the object or storage URL
|
<key> |
String | Required | Temporary URL secret key configured in the cluster
|
Optional options
These are the optional options for tempurl. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--absolute |
Boolean | Optional | Interprets <time> as a Unix timestamp.
|
--prefix-based |
Boolean | Optional | Creates a prefix-based temporary URL. |
--iso8601 |
Boolean | Optional | Includes an ISO 8601 UTC timestamp in the temporary URL instead of a Unix timestamp. |
--ip-range |
String | Optional | IP addresses or IP ranges allowed to use the temporary URL |
--digest |
String | Optional | Digest algorithm to use
|
Common options
For information about the options common to all swift subcommands, see Archive Storage options.
Examples
When you create a temporary URL, a path containing the signature and expiration date/time is output. Prepend the storage URL verified using the auth command to the output path.
Command
The command example is as follows:
swift tempurl GET 3600 \
/v1/AUTH_a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d/test-container-01/sample.txt \
{key}
Output
The output example is as follows:
/v1/AUTH_a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d/test-container-01/sample.txt?temp_url_sig=<signature-redacted>&temp_url_expires=1787108031