Skip to main content

keys

Creates, updates, deletes, gets or lists a keys resource.

Overview

Namekeys
TypeResource
Idlinode.object_storage.keys

Fields

The following fields are returned by SELECT queries:

The key pair.

NameDatatypeDescription
idintegerThis Object Storage key's unique ID.
access_keystringA unique string chosen by the API to identify this key. Used as a username to identify this key when making requests to an S3 API, such as the Amazon S3 API or Ceph Object Gateway S3 API. (example: ABCDEFGHI1JKL2MNOP34)
bucket_accessarraySettings that limit access to specific buckets, each with a specific permission level. See Create a limited access key for more information.
labelstringThe label given to this key. For display purposes only. (example: my-key)
limitedbooleanWhether this Object Storage key limits access to specific buckets and permissions. Returns false if this key grants full access. Specific limitations are set in bucket_access.
regionsarrayThe key can be used in these regions to manage buckets.
secret_keystringThis Object Storage key's secret key. Used as a password to validate this key when making requests to an S3 API, such as the Amazon S3 API or Ceph Object Gateway S3 API. > 📘 > > This value is listed as [REDACTED] for this operation, to protect it. It's only revealed in a response after creating a key.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectkeyIdReturns a single Object Storage access key.

Learn more...

Learn more...
listselectReturns a paginated list of Object Storage access keys for authentication.

Learn more...

Learn more...
createinsertGenerates a new Object Storage access key and an associated secret key. The secret key is only displayed when the access key is generated and cannot be viewed again. A successful request triggers an obj_access_key_create event.

> 📘
>
> - Accounts with negative balances can't access this operation.
>
> - This operation has specific rate limits.

Unlimited vs. limited access keys

An unlimited access key grants full access to all of your buckets in each region you name, using the regions array. A limited access key lets you name specific buckets where you need to manage content, using the bucket_access array.

> 👍 There's a tutorial
>
> We offer workflows for both an unlimited access key and a limited access key.

Learn more...

Learn more...
updatereplacekeyIdUpdates an Object Storage access key on your account. A successful request triggers an obj_access_key_update event.

> 📘
>
> This operation has specific rate limits.

Learn more...

Learn more...
deletedeletekeyIdRevokes an Object Storage access key. Once revoked, the access key can no longer be used by third-party clients. A successful request triggers an obj_access_key_delete event.

> 📘
>
> This operation has specific rate limits.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
keyIdstringThe key to look up.

SELECT examples

Returns a single Object Storage access key.

Learn more...

Learn more...

SELECT
id,
access_key,
bucket_access,
label,
limited,
regions,
secret_key
FROM linode.object_storage.keys
WHERE keyId = '{{ keyId }}' -- required
;

INSERT examples

Generates a new Object Storage access key and an associated secret key. The secret key is only displayed when the access key is generated and cannot be viewed again. A successful request triggers an obj_access_key_create event.

> 📘
>
> - Accounts with negative balances can't access this operation.
>
> - This operation has specific rate limits.

Unlimited vs. limited access keys

An unlimited access key grants full access to all of your buckets in each region you name, using the regions array. A limited access key lets you name specific buckets where you need to manage content, using the bucket_access array.

> 👍 There's a tutorial
>
> We offer workflows for both an unlimited access key and a limited access key.

Learn more...

Learn more...

INSERT INTO linode.object_storage.keys (
bucket_access,
label,
regions
)
SELECT
'{{ bucket_access }}',
'{{ label }}',
'{{ regions }}'
RETURNING
id,
access_key,
bucket_access,
label,
limited,
regions,
secret_key
;

REPLACE examples

Updates an Object Storage access key on your account. A successful request triggers an obj_access_key_update event.

> 📘
>
> This operation has specific rate limits.

Learn more...

Learn more...

REPLACE linode.object_storage.keys
SET
label = '{{ label }}',
regions = '{{ regions }}'
WHERE
keyId = '{{ keyId }}' --required
RETURNING
id,
access_key,
label,
limited,
regions,
secret_key;

DELETE examples

Revokes an Object Storage access key. Once revoked, the access key can no longer be used by third-party clients. A successful request triggers an obj_access_key_delete event.

> 📘
>
> This operation has specific rate limits.

Learn more...

Learn more...

DELETE FROM linode.object_storage.keys
WHERE keyId = '{{ keyId }}' --required
;