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

    Interface UpdateBucketRequest

    Request parameters for the b2_update_bucket API call.

    interface UpdateBucketRequest {
        accountId: AccountId;
        bucketId: BucketId;
        bucketInfo?: Record<string, string>;
        bucketType?: BucketType;
        corsRules?: readonly CorsRule[];
        defaultRetention?: BucketRetentionPolicy;
        defaultServerSideEncryption?: BucketDefaultServerSideEncryptionSetting;
        fileLockEnabled?: boolean;
        ifRevisionIs?: number;
        lifecycleRules?: readonly LifecycleRule[];
        replicationConfiguration?: ReplicationConfiguration;
    }
    Index
    accountId: AccountId

    Account that owns the bucket.

    bucketId: BucketId

    ID of the bucket to update.

    bucketInfo?: Record<string, string>

    Updated user-defined key-value metadata. Replaces all existing metadata. Keys must be 1-50 UTF-8 bytes and must not start with b2-; the aggregate UTF-8 byte length of all values must be at most 10,000 bytes. Keys must match BUCKET_INFO_KEY_PATTERN. BucketInfo has no documented pair-count cap.

    bucketType?: BucketType

    New access level for the bucket.

    corsRules?: readonly CorsRule[]

    Updated CORS rules. Replaces all existing rules. A bucket may have at most 100 rules. Each rule name must be unique, 6-63 characters, match [A-Za-z0-9-], and not start with b2-. Each rule's name, origins, operations, allowed headers, and exposed headers must total less than 1,000 UTF-8 bytes. maxAgeSeconds must be at most 86,400.

    defaultRetention?: BucketRetentionPolicy

    Updated default Object Lock retention policy.

    defaultServerSideEncryption?: BucketDefaultServerSideEncryptionSetting

    Updated default server-side encryption setting.

    fileLockEnabled?: boolean

    Whether to enable Object Lock. Can only transition from disabled to enabled.

    ifRevisionIs?: number

    Optimistic locking: only update if the bucket's current revision matches this value.

    lifecycleRules?: readonly LifecycleRule[]

    Updated lifecycle rules. Replaces all existing rules.

    replicationConfiguration?: ReplicationConfiguration

    Updated replication configuration.