Skip to content
DocsOpenAPI spec

    Buckets

    Create Bucket
    client.Storage.Buckets.New(ctx, body) (*Operation, error)
    POST/v1/storage/buckets
    Get Bucket Details
    client.Storage.Buckets.Get(ctx, bucketID) (*Bucket, error)
    GET/v1/storage/buckets/{bucket_id}
    Update Bucket
    client.Storage.Buckets.Update(ctx, bucketID, body) (*Bucket, error)
    PATCH/v1/storage/buckets/{bucket_id}
    Delete Bucket
    client.Storage.Buckets.Delete(ctx, bucketID, body) (*Operation, error)
    DELETE/v1/storage/buckets/{bucket_id}
    List Buckets
    client.Storage.Buckets.List(ctx, query) (*Cursor[Bucket], error)
    GET/v1/storage/buckets
    ModelsExpand Collapse
    type Bucket struct{…}

    Bucket details.

    ID string

    Unique identifier for the Bucket.

    CreatedAt Time

    When the Bucket was created.

    formatdate-time
    Endpoint string

    S3 endpoint of the Bucket’s region. Point S3 clients at it, with an Object Storage Key of the same project and region.

    Name string

    Name of the Bucket, used to address it over S3.

    ObjectCount int64

    Number of objects in the Bucket. Updated periodically, so it can lag behind recent writes.

    ProjectID string

    Project ID the Bucket belongs to.

    Region RegionName

    Region the resource is in.

    One of the following:
    const RegionNameUsSva2 RegionName = "us-sva-2"
    const RegionNameUsWdc1 RegionName = "us-wdc-1"
    SigningRegion string

    Region S3 clients must sign their requests for (the SigV4 region). Configure it as the region of any S3 client or SDK used with the Bucket.

    SizeBytes int64

    Total size of the objects in the Bucket, in bytes. Updated periodically, so it can lag behind recent writes.

    Status of the resource.

    One of the following:
    const ResourceStatusPending ResourceStatus = "pending"
    const ResourceStatusCreating ResourceStatus = "creating"
    const ResourceStatusUpdating ResourceStatus = "updating"
    const ResourceStatusReady ResourceStatus = "ready"
    const ResourceStatusDeleting ResourceStatus = "deleting"
    const ResourceStatusDeleted ResourceStatus = "deleted"
    const ResourceStatusError ResourceStatus = "error"
    const ResourceStatusSuspended ResourceStatus = "suspended"
    Tags []string

    Tags attached to the Bucket.

    UpdatedAt Time

    When the Bucket was updated.

    formatdate-time
    URL string

    Path-style URL of the Bucket.

    type BucketList struct{…}
    Items []Bucket
    ID string

    Unique identifier for the Bucket.

    CreatedAt Time

    When the Bucket was created.

    formatdate-time
    Endpoint string

    S3 endpoint of the Bucket’s region. Point S3 clients at it, with an Object Storage Key of the same project and region.

    Name string

    Name of the Bucket, used to address it over S3.

    ObjectCount int64

    Number of objects in the Bucket. Updated periodically, so it can lag behind recent writes.

    ProjectID string

    Project ID the Bucket belongs to.

    Region RegionName

    Region the resource is in.

    One of the following:
    const RegionNameUsSva2 RegionName = "us-sva-2"
    const RegionNameUsWdc1 RegionName = "us-wdc-1"
    SigningRegion string

    Region S3 clients must sign their requests for (the SigV4 region). Configure it as the region of any S3 client or SDK used with the Bucket.

    SizeBytes int64

    Total size of the objects in the Bucket, in bytes. Updated periodically, so it can lag behind recent writes.

    Status of the resource.

    One of the following:
    const ResourceStatusPending ResourceStatus = "pending"
    const ResourceStatusCreating ResourceStatus = "creating"
    const ResourceStatusUpdating ResourceStatus = "updating"
    const ResourceStatusReady ResourceStatus = "ready"
    const ResourceStatusDeleting ResourceStatus = "deleting"
    const ResourceStatusDeleted ResourceStatus = "deleted"
    const ResourceStatusError ResourceStatus = "error"
    const ResourceStatusSuspended ResourceStatus = "suspended"
    Tags []string

    Tags attached to the Bucket.

    UpdatedAt Time

    When the Bucket was updated.

    formatdate-time
    URL string

    Path-style URL of the Bucket.

    BucketsAvailability

    Check Create Bucket Availability
    client.Storage.Buckets.Availability.New(ctx, body) error
    POST/v1/storage/buckets/availability

    BucketsCost

    Estimate Bucket Create Cost
    client.Storage.Buckets.Cost.New(ctx, body) (*CostQuote, error)
    POST/v1/storage/buckets/cost