pub struct CreateBucketBuilder { /* private fields */ }
Expand description

A builder for a CreateBucket.

After creating the request, pass it to create_bucket.

See https://www.backblaze.com/b2/docs/b2_create_bucket.html for further information.

Implementations

Create the bucket with the specified name.

Bucket names:

  • must be globally unique
  • cmust be ontain only ASCII alphanumeric text and -
  • must be between 6 and 50 characters inclusive
  • must not begin with b2-

Create the bucket with the given BucketType.

Use the provided information with the bucket.

This can contain arbitrary metadata for your own use. You can also set cache-control settings from here (but see cache_control). If Cache-Control is set here and via the cache-control method, the latter will override this value.

Set the default Cache-Control header value for files downloaded from the bucket.

Use the provided CORS rules for the bucket.

See https://www.backblaze.com/b2/docs/cors_rules.html for further information.

Enable the file lock on the bucket.

See https://www.backblaze.com/b2/docs/file_lock.html for further information.

Disable the file lock on the bucket.

This is the default.

Use the provided list of LifecycleRules for the bucket.

No file within a bucket can be subject to multiple lifecycle rules. If any of the rules provided apply to multiple files or folders, we return a LifecycleRuleValidationError::ConflictingRules with a list of the conflicts.

The empty string ("") matches all paths, so if provided it must be the only lifecycle rule. If it is provided along with other rules, all of those rules will be listed as a conflict.

Examples

For the following input:

[
    "Docs/Photos/",
    "Legal/",
    "Legal/Taxes/",
    "Archive/",
    "Archive/Temporary/",
]

You will receive the error output:

{
    "Legal/": [ "Legal/Taxes/" ],
    "Archive/": [ "Archive/Temporary/" ],
}

For the following input:

[
    "Docs/Photos/",
    "Docs/",
    "Docs/Documents/",
    "Legal/Taxes/",
    "Docs/Photos/Vacations/",
    "Archive/",
]

You will receive the error output (note the redundant listing):

{
    "Docs/": [
        "Docs/Documents/",
        "Docs/Photos/",
        "Docs/Photos/Vacations/",
    ],
    "Docs/Photos/": [ "Docs/Photos/Vacations/" ],
}

Use the provided encryption settings on the bucket.

Create a CreateBucket.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.