Class StorageBucketApi
public class StorageBucketApi : IStorageBucketApi<Bucket>, IGettableHeaders
- Inheritance
-
StorageBucketApi
- Implements
-
IGettableHeaders
- Derived
- Inherited Members
Constructors
StorageBucketApi(string, ClientOptions?, Dictionary<string, string>?)
protected StorageBucketApi(string url, ClientOptions? options, Dictionary<string, string>? headers = null)
Parameters
url
stringoptions
ClientOptionsheaders
Dictionary<string, string>
StorageBucketApi(string, Dictionary<string, string>?)
protected StorageBucketApi(string url, Dictionary<string, string>? headers = null)
Parameters
url
stringheaders
Dictionary<string, string>
Properties
GetHeaders
Function that can be set to return dynamic headers.
Headers specified in the constructor will ALWAYS take precendece over headers returned by this function.
public Func<Dictionary<string, string>>? GetHeaders { get; set; }
Property Value
Headers
public Dictionary<string, string> Headers { get; set; }
Property Value
Options
public ClientOptions Options { get; protected set; }
Property Value
Url
protected string Url { get; set; }
Property Value
Methods
CreateBucket(string, BucketUpsertOptions?)
Creates a new Storage bucket
public Task<string> CreateBucket(string id, BucketUpsertOptions? options = null)
Parameters
id
stringoptions
BucketUpsertOptions
Returns
DeleteBucket(string)
Deletes an existing bucket. A bucket can't be deleted with existing objects inside it. You must first EmptyBucket(string)
public Task<GenericResponse?> DeleteBucket(string id)
Parameters
id
string
Returns
EmptyBucket(string)
Removes all objects inside a single bucket.
public Task<GenericResponse?> EmptyBucket(string id)
Parameters
id
string
Returns
GetBucket(string)
Retrieves the details of an existing Storage bucket.
public Task<Bucket?> GetBucket(string id)
Parameters
id
string
Returns
ListBuckets()
Retrieves the details of all Storage buckets within an existing product.
public Task<List<Bucket>?> ListBuckets()
Returns
UpdateBucket(string, BucketUpsertOptions?)
Updates a Storage bucket
public Task<Bucket?> UpdateBucket(string id, BucketUpsertOptions? options = null)
Parameters
id
stringoptions
BucketUpsertOptions