Returns metadata for the specified bucket

GET /b/{bucket}

Returns metadata for the specified bucket.

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action.

Allows reading of bucket metadata.

  • cloud-object-storage.bucket.list_bucket_crn
  • cloud-object-storage.bucket.get_firewall
  • cloud-object-storage.bucket.get_activity_tracking
  • cloud-object-storage.bucket.get_metrics_monitoring
  • cloud-object-storage.bucket.get_protection_management

Request

Response

200 - Success

name

string

The name of the bucket. Non-mutable.

crn

string

The service instance that holds the bucket. Non-mutable.

service_instance_id

string

The service instance that holds the bucket. Non-mutable.

service_instance_crn

string

The service instance that holds the bucket. Non-mutable.

time_created

string

The creation time of the bucket in RFC 3339 format. Non-mutable.

time_updated

string

The modification time of the bucket in RFC 3339 format. Non-mutable.

object_count

integer

Total number of objects in the bucket. Non-mutable.

bytes_used

integer

Total size of all objects in the bucket. Non-mutable.

noncurrent_object_count

integer

Number of non-current object versions in the bucket. Non-mutable.

noncurrent_bytes_used

integer

Total size of all non-current object versions in the bucket. Non-mutable.

delete_marker_count

integer

Total number of delete markers in the bucket. Non-mutable.

firewall

Firewall

An access control mechanism based on the network (IP address) where request originated. Requests not originating from IP addresses listed in the `allowed_ip` field will be denied regardless of any access policies (including public access) that might otherwise permit the request. Viewing or updating the `Firewall` element requires the requester to have the `manager` role.

activity_tracking

ActivityTracking

Enables sending log data to IBM Cloud Activity Tracker Event Routing to provide visibility into bucket management, object read and write events. (Recommended) When the `activity_tracker_crn` is not populated, then enabled events are sent to the Activity Tracker Event Routing instance at the container's location unless otherwise specified in the Activity Tracker Event Routing Event Routing service configuration. (Legacy) When the `activity_tracker_crn` is populated, then enabled events are sent to the Activity Tracker Event Routing instance specified.

metrics_monitoring

MetricsMonitoring

Enables sending metrics to IBM Cloud Monitoring. All metrics are opt-in. (Recommended) When the `metrics_monitoring_crn` is not populated, then enabled metrics are sent to the Monitoring instance at the container's location unless otherwise specified in the Metrics Router service configuration. (Legacy) When the `metrics_monitoring_crn` is populated, then enabled metrics are sent to the Monitoring instance defined in the `metrics_monitoring_crn` field.

hard_quota

integer

Maximum bytes for this bucket.

protection_management

ProtectionManagementResponse

Data structure holding protection management response.

400 - Bad Request

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

401 - Unauthorized

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

403 - Forbidden

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

404 - Not Found

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

500 - Internal Server Error

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

Make changes to a bucket's configuration

PATCH /b/{bucket}

Updates a bucket using JSON Merge Patch. This request is used to add functionality (like an IP access filter) or to update existing parameters. Primitives are overwritten and replaced in their entirety. It is not possible to append a new (or to delete a specific) value to an array. Arrays can be cleared by updating the parameter with an empty array `[]`. A `PATCH` operation only updates specified mutable fields. Please don't use `PATCH` trying to update the number of objects in a bucket, any timestamps, or other non-mutable fields.

Request

Request Body

An object containing new configuration metadata.

Path Parameters

Query Parameters

Response

200 - Success

400 - Bad Request

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

401 - Unauthorized

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

403 - Forbidden

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

404 - Not Found

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

412 - Precondition Failed

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.

500 - Internal Server Error

http_status_code

integer

HTTP status code for the response.

code

string

The category of the error.

message

string

A short description of the error.

resource

string

Target of the failed request.

ibm_cos_request_id

string

The UUID of the failed request.