Bucket Create Command
    • Dark
      Light

    Bucket Create Command

    • Dark
      Light

    Article summary

    V4.0.2

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --default-server-side-encryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --default-server-side-encryption-algorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are 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 --default-server-side-encryption, then default server-side encryption is determined by the server.

    Note
    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. 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/"}'
    b2 bucket create [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
                     [--file-lock-enabled] [--replication REPLICATION]
                     [--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
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic and allPrivate

    Named Arguments

    • --bucket-info
    • --cors-rules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --file-lock-enabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --default-server-side-encryption
      Possible values: SSE-B2 and none
    • --default-server-side-encryption-algorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycle-rule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycle-rules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycle-rule parameter instead.

    V4.0.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --default-server-side-encryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --default-server-side-encryption-algorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are 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 --default-server-side-encryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycle-rules parameter is deprecated, and it cannot be used together with -–lifecycle-rule.

    b2 bucket create [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
                     [--file-lock-enabled] [--replication REPLICATION]
                     [--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
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic and allPrivate

    Named Arguments

    • --bucket-info
    • --cors-rules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --file-lock-enabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --default-server-side-encryption
      Possible values: SSE-B2 and none
    • --default-server-side-encryption-algorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycle-rule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycle-rules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycle-rule parameter instead.

    V4.0.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --default-server-side-encryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --default-server-side-encryption-algorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are 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 --default-server-side-encryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycle-rules parameter is deprecated, and it cannot be used together with -–lifecycle-rule.

    b2 bucket create [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
                     [--file-lock-enabled] [--replication REPLICATION]
                     [--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
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic and allPrivate

    Named Arguments

    • --bucket-info
    • --cors-rules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --file-lock-enabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --default-server-side-encryption
      Possible values: SSE-B2 and none
    • --default-server-side-encryption-algorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycle-rule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycle-rules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycle-rule parameter instead.

    V3.19.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --default-server-side-encryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --default-server-side-encryption-algorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are 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 --default-server-side-encryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycle-rules parameter is deprecated, and it cannot be used together with -–lifecycle-rule.

    b2 create-bucket [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
                     [--file-lock-enabled] [--replication REPLICATION]
                     [--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
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucket-info
    • --cors-rules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --file-lock-enabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --default-server-side-encryption
      Possible values: SSE-B2, none
    • --default-server-side-encryption-algorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycle-rule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycle-rules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycle-rule parameter instead.

    V3.19.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --default-server-side-encryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --default-server-side-encryption-algorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are 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 --default-server-side-encryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycle-rules parameter is deprecated, and it cannot be used together with -–lifecycle-rule.

    b2 create-bucket [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
                     [--file-lock-enabled] [--replication REPLICATION]
                     [--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
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucket-info
    • --cors-rules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --file-lock-enabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --default-server-side-encryption
      Possible values: SSE-B2, none
    • --default-server-side-encryption-algorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycle-rule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycle-rules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycle-rule parameter instead.

    V3.18.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --default-server-side-encryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --default-server-side-encryption-algorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are 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 --default-server-side-encryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycle-rules parameter is deprecated, and it cannot be used together with -–lifecycle-rule.

    b2 create-bucket [-h] [--bucket-info BUCKET_INFO] [--cors-rules CORS_RULES]
                     [--file-lock-enabled] [--replication REPLICATION]
                     [--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
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucket-info
    • --cors-rules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --file-lock-enabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --default-server-side-encryption
      Possible values: SSE-B2, none
    • --default-server-side-encryption-algorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycle-rule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycle-rules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycle-rule parameter instead.

    V3.17.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.17.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.16.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.16.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.15.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.14.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.13.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.13.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.12.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    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. All bucket Lifecycle Rules are set at the same time.

    The -–lifecycleRules parameter is deprecated, and it cannot be used together with -–lifecycleRule.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     [--lifecycleRule LIFECYCLERULES | --lifecycleRules LIFECYCLERULES]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --bucketInfo
    • --corsRules
      If provided, the bucket has a ‘custom’ CORS configuration. This parameter accepts a JSON string.
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”
    • --lifecycleRule
      Supply the Lifecycle Rule in JSON format. You can provide this parameter multiple times.
    • --lifecycleRules
      Returns a list of Lifecycle Rules in JSON format.
      This parameter is deprecated; use the --lifecycleRule parameter instead.

    V3.9.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
                     [--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --profile
    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.8.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
                     [--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName {allPublic,allPrivate}

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType
      Possible values: allPublic, allPrivate

    Named Arguments

    • --profile
    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.7.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
                     [--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --profile
    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.7.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
                     [--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --profile
    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.6.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
                     [--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --profile
    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.5.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
                     [--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --profile
    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.4.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
                     [--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
                     [--fileLockEnabled] [--replication REPLICATION]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --profile
    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --replication
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.3.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--profile PROFILE] [--bucketInfo BUCKETINFO]
                     [--corsRules CORSRULES] [--lifecycleRules LIFECYCLERULES]
                     [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --profile
    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.2.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.2.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.1.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.0.3

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.0.2

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.0.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V3.0.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V2.5.1

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V2.5.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES] [--fileLockEnabled]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption
    • writeBucketRetentions

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules
    • --fileLockEnabled
      If provided, the bucket has Object Lock enabled. You cannot change this parameter after you create the bucket.
      Default: False
    • --defaultServerSideEncryption
      Possible values: SSE-B2, none
    • --defaultServerSideEncryptionAlgorithm
      Possible value: AES256
      Default: “AES256”

    V2.4.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption

    Positional Arguments

    • bucketName
      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 creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    To enable server-side encryption for all of the files that you upload to a bucket, add SSE-B2 encryption as a default setting for the bucket by passing --defaultServerSideEncryption=SSE-B2. The default algorithm is set to AES256 that you can change with the --defaultServerSideEncryptionAlgorithm parameter. All uploads to that bucket, from the time that default encryption is enabled onward, are encrypted with SSE-B2 by default.

    To disable default bucket encryption, set the --defaultServerSideEncryption parameter to none.

    If you do not provide --defaultServerSideEncryption, then default server-side encryption is determined by the server.

    Note
    Existing files in the bucket are not affected by default bucket encryption settings.
    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES]
                     [--defaultServerSideEncryption {SSE-B2,none}]
                     [--defaultServerSideEncryptionAlgorithm {AES256}]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets
    • readBucketEncryption
    • writeBucketEncryption

    Positional Arguments

    • bucketName
      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 creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules

    V2.1.0

    This command creates a new bucket and prints the ID of the created bucket.

    It optionally stores bucket info, CORS rules, and Lifecycle Rules with the bucket. You can provide these as JSON on the command-line.

    b2 create-bucket [-h] [--bucketInfo BUCKETINFO] [--corsRules CORSRULES]
                     [--lifecycleRules LIFECYCLERULES]
                     bucketName bucketType

    Required Capabilities

    • writeBuckets

    Positional Arguments

    • bucketName
      Target bucket name.
    • bucketType

    Named Arguments

    • --bucketInfo
    • --corsRules
    • --lifecycleRules

    Versions


    Was this article helpful?