- Print
- DarkLight
Bucket Update Command
- Print
- DarkLight
V4.0.2
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --default-server-side-encryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --default-server-side-encryption-algorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, use --default-server-side-encryption=none
.
If you do not provide --default-server-side-encryption
, default server-side encryption is determined by the server.
Use the --lifecycle-rule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option. All bucket Lifecycle Rules are set at the same time. If you want to add a new rule, provide all of the existing rules as shown in the following example:
--lifecycle-rule '{"daysFromHidingToDeleting": 1, "daysFromUploadingToHiding": null, "fileNamePrefix": "documents/"}' --lifecycle-rule '{"daysFromHidingToDeleting": 1, "daysFromUploadingToHiding": 7, "fileNamePrefix": "temporary/"}'
--default-retention-mode
and --default-retention-period
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --file-lock-enabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not allowed. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 bucket update [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
[--default-retention-mode {compliance,governance,none}]
[--default-retention-period period]
[--replication REPLICATION] [--file-lock-enabled]
[--default-server-side-encryption {SSE-B2,none}]
[--default-server-side-encryption-algorithm {AES256}]
[--lifecycle-rule LIFECYCLE_RULES | --lifecycle-rules LIFECYCLE_RULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucket-info
- --cors-rules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --default-retention-mode
Possible values: compliance, governance, none - --default-retention-period
- --replication
- --file-lock-enabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --default-server-side-encryption
Possible values: SSE-B2, none - --default-server-side-encryption-algorithm
Possible values: AES256
Default: “AES256” - --lifecycle-rule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycle-rules
(deprecated; use –-lifecycle-rule instead)
V4.0.1
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --default-server-side-encryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --default-server-side-encryption-algorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, use --default-server-side-encryption=none
.
If you do not provide --default-server-side-encryption
, default server-side encryption is determined by the server.
Use the --lifecycle-rule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycle-rules
parameter is deprecated, and it cannot be used together with –-lifecycle-rule
.
--default-retention-mode
and --default-retention-period
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --file-lock-enabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not allowed. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 bucket update [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
[--default-retention-mode {compliance,governance,none}]
[--default-retention-period period]
[--replication REPLICATION] [--file-lock-enabled]
[--default-server-side-encryption {SSE-B2,none}]
[--default-server-side-encryption-algorithm {AES256}]
[--lifecycle-rule LIFECYCLE_RULES | --lifecycle-rules LIFECYCLE_RULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucket-info
- --cors-rules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --default-retention-mode
Possible values: compliance, governance, none - --default-retention-period
- --replication
- --file-lock-enabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --default-server-side-encryption
Possible values: SSE-B2, none - --default-server-side-encryption-algorithm
Possible values: AES256
Default: “AES256” - --lifecycle-rule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycle-rules
(deprecated; use –-lifecycle-rule instead)
V4.0.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --default-server-side-encryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --default-server-side-encryption-algorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, use --default-server-side-encryption=none
.
If you do not provide --default-server-side-encryption
, default server-side encryption is determined by the server.
Use the --lifecycle-rule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycle-rules
parameter is deprecated, and it cannot be used together with –-lifecycle-rule
.
--default-retention-mode
and --default-retention-period
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --file-lock-enabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not allowed. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 bucket update [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
[--default-retention-mode {compliance,governance,none}]
[--default-retention-period period]
[--replication REPLICATION] [--file-lock-enabled]
[--default-server-side-encryption {SSE-B2,none}]
[--default-server-side-encryption-algorithm {AES256}]
[--lifecycle-rule LIFECYCLE_RULES | --lifecycle-rules LIFECYCLE_RULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucket-info
- --cors-rules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --default-retention-mode
Possible values: compliance, governance, none - --default-retention-period
- --replication
- --file-lock-enabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --default-server-side-encryption
Possible values: SSE-B2, none - --default-server-side-encryption-algorithm
Possible values: AES256
Default: “AES256” - --lifecycle-rule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycle-rules
(deprecated; use –-lifecycle-rule instead)
V3.19.1
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --default-server-side-encryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --default-server-side-encryption
parameter to none
.
If you do not provide the --default-server-side-encryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycle-rule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycle-rules
parameter is deprecated, and it cannot be used together with –-lifecycle-rule
.
--default-retention-mode
and --default-retention-period
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --file-lock-enabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
[--default-retention-mode {compliance,governance,none}]
[--default-retention-period period]
[--replication REPLICATION] [--file-lock-enabled]
[--default-server-side-encryption {SSE-B2,none}]
[--default-server-side-encryption-algorithm {AES256}]
[--lifecycle-rule LIFECYCLE_RULES | --lifecycle-rules LIFECYCLE_RULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucket-info
- --cors-rules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --default-retention-mode
Possible values: compliance, governance, none - --default-retention-period
- --replication
- --file-lock-enabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --default-server-side-encryption
Possible values: SSE-B2, none - --default-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --lifecycle-rule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycle-rules
(deprecated; use –-lifecycle-rule instead)
V3.19.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --default-server-side-encryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --default-server-side-encryption
parameter to none
.
If you do not provide the --default-server-side-encryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycle-rule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycle-rules
parameter is deprecated, and it cannot be used together with –-lifecycle-rule
.
--default-retention-mode
and --default-retention-period
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --file-lock-enabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
[--default-retention-mode {compliance,governance,none}]
[--default-retention-period period]
[--replication REPLICATION] [--file-lock-enabled]
[--default-server-side-encryption {SSE-B2,none}]
[--default-server-side-encryption-algorithm {AES256}]
[--lifecycle-rule LIFECYCLE_RULES | --lifecycle-rules LIFECYCLE_RULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucket-info
- --cors-rules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --default-retention-mode
Possible values: compliance, governance, none - --default-retention-period
- --replication
- --file-lock-enabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --default-server-side-encryption
Possible values: SSE-B2, none - --default-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --lifecycle-rule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycle-rules
(deprecated; use –-lifecycle-rule instead)
V3.18.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --default-server-side-encryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --default-server-side-encryption
parameter to none
.
If you do not provide the --default-server-side-encryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycle-rule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycle-rules
parameter is deprecated, and it cannot be used together with –-lifecycle-rule
.
--default-retention-mode
and --default-retention-period
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --file-lock-enabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
[--default-retention-mode {compliance,governance,none}]
[--default-retention-period period]
[--replication REPLICATION] [--file-lock-enabled]
[--default-server-side-encryption {SSE-B2,none}]
[--default-server-side-encryption-algorithm {AES256}]
[--lifecycle-rule LIFECYCLE_RULES | --lifecycle-rules LIFECYCLE_RULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucket-info
- --cors-rules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --default-retention-mode
Possible values: compliance, governance, none - --default-retention-period
- --replication
- --file-lock-enabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --default-server-side-encryption
Possible values: SSE-B2, none - --default-server-side-encryption-algorithm
Possible value: AES256
Default: “AES256” - --lifecycle-rule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycle-rules
(deprecated; use –-lifecycle-rule instead)
V3.17.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycleRule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycleRules
parameter is deprecated, and it cannot be used together with –-lifecycleRule
.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
[--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucketInfo
- --corsRules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --lifecycleRule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycleRules
(deprecated; use –-lifecycleRule instead)
V3.16.1
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycleRule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycleRules
parameter is deprecated, and it cannot be used together with –lifecycleRule
.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
[--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucketInfo
- --corsRules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --lifecycleRule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycleRules
(deprecated; use –-lifecycleRule instead)
V3.16.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycleRule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycleRules
parameter is deprecated, and it cannot be used together with –lifecycleRule
.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
[--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucketInfo
- --corsRules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --lifecycleRule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycleRules
(deprecated; use –-lifecycleRule instead)
V3.15.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycleRule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycleRules
parameter is deprecated, and it cannot be used together with –lifecycleRule
.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
[--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucketInfo
- --corsRules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --lifecycleRule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycleRules
(deprecated; use –-lifecycleRule instead)
V3.14.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycleRule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycleRules
parameter is deprecated, and it cannot be used together with –lifecycleRule
.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
[--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucketInfo
- --corsRules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --lifecycleRule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycleRules
(deprecated; use –-lifecycleRule instead)
V3.13.1
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycleRule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycleRules
parameter is deprecated, and it cannot be used together with –lifecycleRule
.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
[--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucketInfo
- --corsRules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --lifecycleRule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycleRules
(deprecated; use –-lifecycleRule instead)
V3.13.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycleRule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycleRules
parameter is deprecated, and it cannot be used together with –lifecycleRule
.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
[--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucketInfo
- --corsRules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --lifecycleRule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycleRules
(deprecated; use –-lifecycleRule instead)
V3.12.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
Use the --lifecycleRule
parameter to set lifecycle rules for the bucket. You can specify multiple rules by repeating the option.
The -–lifecycleRules
parameter is deprecated, and it cannot be used together with –lifecycleRule
.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
[--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --bucketInfo
- --corsRules
If provided, the bucket has ‘custom’ CORS configuration.
Accepts a JSON string. - --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256” - --lifecycleRule
The Lifecycle Rule in JSON format. You can supply this parameter multiple times. - --lifecycleRules
(deprecated; use –-lifecycleRule instead)
V3.9.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
[--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --profile
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.8.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
[--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName [{allPublic,allPrivate}]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Possible values: allPublic, allPrivate
Named Arguments
- --profile
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.7.1
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
[--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName [bucketType]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --profile
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.7.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
[--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName [bucketType]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --profile
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.6.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.This command also sets the bucket’s fileLockEnabled
flag to true
using the --fileLockEnabled
option. This can be done only if the bucket is not set up as a replication source.
fileLockEnabled
, you cannot revert it back to false
.Replication from an Object Lock-enabled bucket to an Object Lock-disabled bucket is not supported. Therefore, if Object Lock is enabled on a bucket, it can never again be the replication source bucket for an Object Lock-disabled destination.
Additionally, in an Object Lock-enabled bucket, the file metadata limit decreases from 7000 bytes to 2048 bytes for new file versions. For more information, see the b2_update_bucket
documentation.
b2 update-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
[--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--fileLockEnabled]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName [bucketType]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --profile
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --fileLockEnabled
If provided, the bucket is Object Lock-enabled. You cannot change this parameter after it is set. - --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.5.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
[--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName [bucketType]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --profile
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.4.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
[--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period] [--replication REPLICATION]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName [bucketType]
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --profile
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --replication
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.3.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
[--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --profile
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.2.1
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.2.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.1.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.0.3
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.0.2
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.0.1
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V3.0.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.5.1
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.5.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
--defaultRetentionMode
and --defaultRetentionPeriod
. The latter parameter is in the format “X days|years”.compliance
is irreversible. You can delete such files only after their retention period passes, regardless of the application keys (master or not) that you used. This is especially risky when you set bucket default retention because it may lead to high storage costs.b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultRetentionMode {compliance,governance,none}]
[--defaultRetentionPeriod period]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketRetentions (for some operations)
- writeBucketEncryption (for some operations)
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultRetentionMode
Possible values: compliance, governance, none - --defaultRetentionPeriod
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.4.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketEncryption
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.3.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
You can enable server-side encryption for all of the files that are uploaded to a bucket. Enable SSE-B2 encryption as a default setting for the bucket. Pass the --defaultServerSideEncryption=SSE-B2
parameter. The default algorithm is set to AES256 which you can change with the --defaultServerSideEncryptionAlgorithm
parameter. All uploads to that bucket, from the time default encryption is enabled onward, are them encrypted with SSE-B2 by default.
To disable default bucket encryption, set the --defaultServerSideEncryption
parameter to none
.
If you do not provide the --defaultServerSideEncryption
parameter, then the default server-side encryption is determined by the server.
Existing files in the bucket are not affected by default bucket encryption settings.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
[--defaultServerSideEncryption {SSE-B2,none}]
[--defaultServerSideEncryptionAlgorithm {AES256}]
bucketName bucketType
Required Capabilities
- writeBuckets
- readBucketEncryption
- writeBucketEncryption
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
- --defaultServerSideEncryption
Possible values: SSE-B2, none - --defaultServerSideEncryptionAlgorithm
Possible value: AES256
Default: “AES256”
V2.2.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
bucketName bucketType
Required Capabilities
- writeBuckets
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
V2.1.0
This command updates the bucketType
of an existing bucket, and it prints the ID of the updated bucket.
Optionally, this command stores bucket info, CORS rules, and Lifecycle Rules with the bucket. These can be given as JSON on the command line.
b2 update-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
[--lifecycleRules LIFECYCLERULES]
bucketName bucketType
Required Capabilities
- writeBuckets
Positional Arguments
- bucketName
The target bucket name. - bucketType
Named Arguments
- --bucketInfo
- --corsRules
- --lifecycleRules
Versions