bucket_access_keys
Creates, updates, deletes, gets or lists a bucket_access_keys resource.
Overview
| Name | bucket_access_keys |
| Type | Resource |
| Id | aws.lightsail.bucket_access_keys |
Fields
The following fields are returned by SELECT queries:
- get_bucket_access_keys
| Name | Datatype | Description |
|---|---|---|
access_keys | array | An object that describes the access keys for the specified bucket. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_bucket_access_keys | select | region | Returns the existing access key IDs for the specified Amazon Lightsail bucket. This action does not return the secret access key value of an access key. You can get a secret access key only when you create it from the response of the CreateBucketAccessKey action. If you lose the secret access key, you must create a new access key. | |
create_bucket_access_key | insert | region, bucketName | Creates a new access key for the specified Amazon Lightsail bucket. Access keys consist of an access key ID and corresponding secret access key. Access keys grant full programmatic access to the specified bucket and its objects. You can have a maximum of two access keys per bucket. Use the GetBucketAccessKeys action to get a list of current access keys for a specific bucket. For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide. The secretAccessKey value is returned only in response to the CreateBucketAccessKey action. You can get a secret access key only when you first create an access key; you cannot get the secret access key later. If you lose the secret access key, you must create a new access key. | |
delete_bucket_access_key | delete | region | Deletes an access key for the specified Amazon Lightsail bucket. We recommend that you delete an access key if the secret access key is compromised. For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_bucket_access_keys
Returns the existing access key IDs for the specified Amazon Lightsail bucket. This action does not return the secret access key value of an access key. You can get a secret access key only when you create it from the response of the CreateBucketAccessKey action. If you lose the secret access key, you must create a new access key.
SELECT
access_keys
FROM aws.lightsail.bucket_access_keys
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_bucket_access_key
- Manifest
Creates a new access key for the specified Amazon Lightsail bucket. Access keys consist of an access key ID and corresponding secret access key. Access keys grant full programmatic access to the specified bucket and its objects. You can have a maximum of two access keys per bucket. Use the GetBucketAccessKeys action to get a list of current access keys for a specific bucket. For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide. The secretAccessKey value is returned only in response to the CreateBucketAccessKey action. You can get a secret access key only when you first create an access key; you cannot get the secret access key later. If you lose the secret access key, you must create a new access key.
INSERT INTO aws.lightsail.bucket_access_keys (
bucketName,
region
)
SELECT
'{{ bucketName }}' /* required */,
'{{ region }}'
RETURNING
access_key,
operations
;
# Description fields are for documentation purposes
- name: bucket_access_keys
props:
- name: region
value: "{{ region }}"
description: Required parameter for the bucket_access_keys resource.
- name: bucketName
value: "{{ bucketName }}"
description: |
The name of the bucket that the new access key will belong to, and grant access to.
DELETE examples
- delete_bucket_access_key
Deletes an access key for the specified Amazon Lightsail bucket. We recommend that you delete an access key if the secret access key is compromised. For more information about access keys, see Creating access keys for a bucket in Amazon Lightsail in the Amazon Lightsail Developer Guide.
DELETE FROM aws.lightsail.bucket_access_keys
WHERE region = '{{ region }}' --required
;