keys
Creates, updates, deletes, gets or lists a keys resource.
Overview
| Name | keys |
| Type | Resource |
| Id | linode.object_storage.keys |
Fields
The following fields are returned by SELECT queries:
- get
- list
The key pair.
| Name | Datatype | Description |
|---|---|---|
id | integer | This Object Storage key's unique ID. |
access_key | string | A 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_access | array | Settings that limit access to specific buckets, each with a specific permission level. See Create a limited access key for more information. |
label | string | The label given to this key. For display purposes only. (example: my-key) |
limited | boolean | Whether 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. |
regions | array | The key can be used in these regions to manage buckets. |
secret_key | string | This 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. |
A paginated list of Object Storage Keys.
| Name | Datatype | Description |
|---|---|---|
id | integer | This Object Storage key's unique ID. |
access_key | string | A 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_access | array | Settings that limit access to specific buckets, each with a specific permission level. See Create a limited access key for more information. |
label | string | The label given to this key. For display purposes only. (example: my-key) |
limited | boolean | Whether 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. |
regions | array | The key can be used in these regions to manage buckets. |
secret_key | string | This 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | keyId | Returns a single Object Storage access key. Learn more... Learn more... | |
list | select | Returns a paginated list of Object Storage access keys for authentication. Learn more... Learn more... | ||
create | insert | 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... | ||
update | replace | keyId | 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... | |
delete | delete | keyId | 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... |
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.
| Name | Datatype | Description |
|---|---|---|
keyId | string | The key to look up. |
SELECT examples
- get
- list
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
;
Returns a paginated list of Object Storage access keys for authentication.
Learn more...
Learn more...
SELECT
id,
access_key,
bucket_access,
label,
limited,
regions,
secret_key
FROM linode.object_storage.keys
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: keys
props:
- name: bucket_access
value: "{{ bucket_access }}"
description: |
Settings that limit access to specific buckets, each with a specific permission level. See [Create a limited access key](https://techdocs.akamai.com/linode-api/reference/post-object-storage-keys) for more information.
- name: label
value: "{{ label }}"
description: |
The name for the key. For display purposes only.
- name: regions
value:
- "{{ regions }}"
description: |
The key can be used in these regions to manage all buckets. See [Create an unlimited access key](https://techdocs.akamai.com/linode-api/reference/post-object-storage-keys) for more information.
REPLACE examples
- update
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
- delete
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
;