Class CreateBucketRequest
- Namespace
- Cloudflare.NET.Accounts.Models
- Assembly
- Cloudflare.NET.dll
Defines the request payload for creating an R2 bucket.
public record CreateBucketRequest : IEquatable<CreateBucketRequest>
- Inheritance
-
CreateBucketRequest
- Implements
- Inherited Members
Remarks
The jurisdiction parameter is not included in this request body because it must be passed
as an HTTP header (cf-r2-jurisdiction) according to the Cloudflare API specification.
Constructors
CreateBucketRequest(string, R2LocationHint?, R2StorageClass?)
Defines the request payload for creating an R2 bucket.
public CreateBucketRequest(string Name, R2LocationHint? LocationHint = null, R2StorageClass? StorageClass = null)
Parameters
NamestringThe name of the bucket to create.
LocationHintR2LocationHint?Optional location hint suggesting where the bucket's data should be stored. Cloudflare will attempt to honor this hint, but data may be placed in a nearby region if unavailable.
StorageClassR2StorageClass?Optional default storage class for new objects in the bucket. If not specified, defaults to Standard.
Remarks
The jurisdiction parameter is not included in this request body because it must be passed
as an HTTP header (cf-r2-jurisdiction) according to the Cloudflare API specification.
Properties
LocationHint
Optional location hint suggesting where the bucket's data should be stored. Cloudflare will attempt to honor this hint, but data may be placed in a nearby region if unavailable.
[JsonPropertyName("locationHint")]
public R2LocationHint? LocationHint { get; init; }
Property Value
Name
The name of the bucket to create.
[JsonPropertyName("name")]
public string Name { get; init; }
Property Value
StorageClass
Optional default storage class for new objects in the bucket. If not specified, defaults to Standard.
[JsonPropertyName("storageClass")]
public R2StorageClass? StorageClass { get; init; }