Skip to content

Latest commit

 

History

History
109 lines (91 loc) · 4.52 KB

object_keys.md

File metadata and controls

109 lines (91 loc) · 4.52 KB

object_keys

Manage Linode Object Storage Keys.

Minimum Required Fields

Field Type Required Description
api_token str Required The Linode account personal access token. It is necessary to run the module.
It can be exposed by the environment variable LINODE_API_TOKEN instead.
See details in Usage.

Examples

- name: Create an Object Storage key
  linode.cloud.object_keys:
    label: 'my-fullaccess-key'
    state: present
- name: Create an Object Storage key limited to specific regions
  linode.cloud.object_keys:
    label: 'my-region-limited-key'
    regions:
        - us-mia
        - us-ord
    state: present
- name: Create an Object Storage key limited to specific buckets
  linode.cloud.object_keys:
    label: 'my-limited-key'
    access:
      - cluster: us-mia
        bucket_name: my-bucket
        permissions: read_write
    state: present
- name: Remove an object storage key
  linode.cloud.object_keys:
    label: 'my-key'
    state: absent

Parameters

Field Type Required Description
state str Required The desired state of the target. (Choices: present, absent)
label str Optional The unique label to give this key.
access (sub-options) list Optional A list of access permissions to give the key.
regions list Optional A list of regions to scope this key to. (Updatable)

access

Field Type Required Description
bucket_name str Required The name of the bucket to set the key's permissions for.
permissions str Required The permissions to give the key. (Choices: read_only, write_only, read_write)
region str Optional The region of the cluster that the provided bucket exists under. (Conflicts With: cluster)
cluster str Optional The id of the cluster that the provided bucket exists under. NOTE: This field has been deprecated because it relies on deprecated API endpoints. Going forward, region will be the preferred way to designate where Object Storage resources should be created. (Conflicts With: region)

Return Values

  • key - The Object Storage key in JSON serialized form.

    • Sample Response:
      {
        "access_key": "redacted",
        "bucket_access": [
          {
            "bucket_name": "my-bucket",
            "cluster": "us-iad-1",
            "permissions": "read_write",
            "region": "us-iad"
          }
        ],
        "id": 12345,
        "label": "my-key",
        "limited": true,
        "regions": [
          {
            "id": "us-iad",
            "s3_endpoint": "us-iad-1.linodeobjects.com"
          },
          {
            "id": "us-ord",
            "s3_endpoint": "us-ord-1.linodeobjects.com"
          },
          {
            "id": "us-sea",
            "s3_endpoint": "us-sea-1.linodeobjects.com"
          }
        ],
        "secret_key": "[REDACTED]"
      }
    • See the Linode API response documentation for a list of returned fields