COS Resource Configuration API

Introduction This is a new API for configuring IBM Cloud Object Storage buckets. This API will evolve to cover the full suite of bucket configuration options provided today by extensions made to the modified S3 API. The COS Resource Configuration API now supports: Viewing non-mutable bucket metadata CRNs, timestamps, and usage info Viewing and setting IP address access filters. Viewing and setting Activity Tracker events for object operations. The Configuration API supports two request methods. The Get bucket configuration method reads a bucket's metadata, and returns an entity tag ETag header that identifies the current configuration. The tag is updated when some piece of mutable configuration metadata changes. Use the ETag with an if-match header in the Update bucket configuration method to ensure that you are overwriting the correct configuration. PATCH operations can update multiple fields in the same request. What is mutable configuration metadata? There's a lot of useful but non-mutable metadata associated with a bucket: its name, location, class, the service instance it belongs to, the number of objects it holds, and so on. None of those values can be directly edited by a user but are important for intelligent data management and are necessary for integration with other IBM Cloud services. In contrast, mutable bucket metadata adds functionality or alters behavior. In this initial version of the Configuration API, the only such metadata is a bucket's firewall, Activity Tracker, and Metrics Monitoring configurations. In direct contrast to an S3 API, the Configuration API doesn't rely on separate methods to access different bucket parameters. For example, in an S3 API you might use these methods: 1. Read the configuration of a bucket firewall by sending GET {endpoint}/{bucket}?firewall. 2. Read the configuration location with GET {endpoint}/{bucket}?location. 3. Check whether the configuration has Key Protect enabled by sending HEAD {endpoint}/{bucket} and reviewing the response headers. Instead, the Configuration API uses a single JSON document to describe all aspects of a bucket's metadata and configuration with the Get the bucket configuration method. To update the configuration, the Configuration API uses JSON Merge Patchhttps://tools.ietf.org/html/rfc7396 semantics to make updates directly to the bucket's metadata. Although you can only update a bucket's IP address access filter right now, the API might be updated to support making other updates. For example, you might be able to add a lifecycle rule, remove a firewall, and update a default retention period in a single request. Some IDEs such as PyCharm may produce warnings about unused classes or methods. This is an artifact of the code generation tooling that allows for the passing of objects in named parameters, but generates a docstring that causes some linting tools to raise a warning. JavaScript developers can use this SDK to interact with the Object Storage Resource Configuration API. For more information, see the COS Resource Configuration SDK for Java API Referencehttps://ibm.github.io/ibm-cos-sdk-java-config/. The SDK is supported on Java versions 1.6 and later. The code examples on this tab use the Resource Configuration client library that is provided for Java. Maven xml

MethodPathSummary
POST/buckets/{bucket}/backup_policiesAdd a new backup policy to the COS Bucket
GET/buckets/{bucket}/backup_policiesList BackupPolicies
GET/buckets/{bucket}/backup_policies/{policy_id}Get BackupPolicy
DELETE/buckets/{bucket}/backup_policies/{policy_id}Delete a BackupPolicy
GET/backup_vaultslist BackupVaults
POST/backup_vaultscreate a BackupVault
GET/backup_vaults/{backup_vault_name}get the config for a Backup Vault
PATCH/backup_vaults/{backup_vault_name}Update the config on a Backup Vault
DELETE/backup_vaults/{backup_vault_name}Delete an empty Backup Vault
GET/backup_vaults/{backup_vault_name}/recovery_rangesList RecoveryRanges on a backup vault
GET/backup_vaults/{backup_vault_name}/recovery_ranges/{recovery_range_id}get RecoveryRange info
PATCH/backup_vaults/{backup_vault_name}/recovery_ranges/{recovery_range_id}patch RecoveryRange info
POST/backup_vaults/{backup_vault_name}/restoresInitiate a Restore
GET/backup_vaults/{backup_vault_name}/restoresList Restores
GET/backup_vaults/{backup_vault_name}/restores/{restore_id}Get Restore
GET/b/{bucket}Returns metadata for the specified bucket
PATCH/b/{bucket}Make changes to a bucket's configuration