@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Interface CreateKeyRequest

    Request parameters for the b2_create_key API call. Creates a new application key.

    interface CreateKeyRequest {
        accountId: AccountId;
        bucketId?: BucketId;
        capabilities: readonly Capability[];
        keyName: string;
        namePrefix?: string;
        validDurationInSeconds?: number;
    }
    Index

    Properties

    accountId: AccountId

    Account to create the key for.

    bucketId?: BucketId

    Optional bucket restriction. When set, the key only grants access to this bucket.

    capabilities: readonly Capability[]

    Capabilities to grant to the new key.

    keyName: string

    Human-readable name for the key (must be unique within the account).

    namePrefix?: string

    Optional file name prefix restriction. When set, the key only grants access to files with this prefix.

    validDurationInSeconds?: number

    Optional duration in seconds before the key expires. Omit for a key that never expires.