dcloud s3 buckets create-access-key

An access key for this bucket: a service account, a policy limited to the bucket on that account, and a plain key

IAM iam:CreateAccessKeyChanges state

Permissions live on the account: the policy is attached to the service account, the key carries no limit. In one transaction; needs iam:CreateUser (for a new account), iam:CreatePolicy, iam:AttachUserPolicy, iam:CreateAccessKey, and the caller must be able to do every action the policy hands out on this bucket (403 otherwise, and nothing is made).

Synopsis

dcloud s3 buckets create-access-key name [flags]

Arguments

  • <name>Required

    string

    Also accepted as --name. Constraints: 3-63 chars, /^[a-z0-9][a-z0-9-]*[a-z0-9]$/

Flags

  • --service-account-idOptional

    string

    An existing service account to give the key to; omitted: a new one is made

    Constraints: uuid

  • --service-account-nameOptional

    string

    The new service account’s name; default <bucket>-access

    Constraints: 1-64 chars, /^[a-z0-9_-]+$/

  • --accessOptional

    enum

    read: list and download; readwrite (default): also upload and delete

    One of: read, readwrite

  • --prefixOptional

    string

    Only objects under this key prefix, e.g. uploads/

    Constraints: max 512 chars

  • --descriptionOptional

    string

    What uses the key

    Constraints: max 256 chars

  • --expires-in-daysOptional

    number

    Days until the key expires; default the organization’s default

    Constraints: integer, 1-3650

Example

dcloud s3 buckets create-access-key name

Generated from the API description, the same one the API checks requests against and the CLI is built from.