Cloud Storage allows world-wide storage and retrieval of any amount of data at any time. You can use Cloud Storage for a range of scenarios including serving website content, storing data for archival and disaster recovery, or distributing large data objects to users via direct download.
This directory contains the implementation of the Google Cloud Storage C++ client.
This library support Google Cloud Storage at the GA quality level. Please note that, as is often the case with C++ libraries, we do not follow semantic versioning in the Cloud C++ client libraries. We make every effort to document backwards-incompatible API changes in the release notes below.
- The client library reference contains full documentation for the Cloud Storage C++ client library, and includes code samples for all APIs.
- A quick start is part of the client library reference.
- Please consult the Cloud Storage website for general documentation on Cloud Storage features, APIs, other client libraries, etc.
See CONTRIBUTING.md for details on how to
contribute to this project, including how to build and test your changes as well
as how to properly format your code.
Apache 2.0; see LICENSE for details.
- Declared GA and updated major number.
- Support signed policy documents.
- Support service account key files in PKCS#12 format (aka
.p12). - Support signing URLs and policy documents using the SignBlob API, this is useful when using the default service account in GCE to sign URLs and policy documents.
- Added initial support for HMAC key-related functions.
- Added support for V4 signed URLs.
- Improved install instructions, which are now tested with our CI builds.
- CMake-config files now work without
pkg-config. - No longer throw exceptions from
ClientOptions. - Handle object names with slashes.
- Added
ObjectMetadata::set_storage_class - Added support for policy documents.
- Properly handle subresources in V2 signed URLs.
- Allow specifying non-default
ServiceAccountCredentialsscope and subject. - Add
make installinstructions. - Change the storage examples to throw a
std::runtime_erroron failure. - Add Bucket Policy Only samples.
- Breaking change: Removed almost all exception throwing in favor of
StatusOr<T>return values. - Lots of cleanup to documentation and example code.
- Avoids use of
StatusOr::value()when the validity was already checked. Client::ListBuckets()now directly returnsListBucketsReader, because it cannot fail soStatusOrwas not needed.- Removed support for
StatusOr<void>; changed usages to returnStatusinstead. - 502s are now retryable errors from GCS.
- Breaking change:
LockBucketRetentionPolicyreturns aBucketMetadatanow instead ofvoid. - Cleaned up documentation and example code.
- Disabled
make installfor external projects. - Moved repo organization from GoogleCloudPlatform -> googleapis.
- Moved some internal-only APIs out of public interfaces.
- Fixed resuming uploads when the server responds with a 308.
- Try to use the exception mask in the IOStream classes
(
storage::ObjectReadStreamandstorage::ObjectWriteStream). This allows applications to check errors locally viardstate(). Note that applications that disable exceptions altogether must check thestatus()member function for these IOStream classes. It is impossible to set therdstate()for all failures when exceptions are disabled. - Support reading only a portion of a Blob.
- Support building with gcc-4.8.
- Many internal changes to better support applications that disable exceptions. A future release will include APIs that do not raise exceptions for error conditions.
- @remyabel contributed changes to disable the unit and integration tests. This can be useful for package maintainers.
- Implement a function to create signed URLs (
Client::CreateV2SignedUrl). - Support resumable uploads in any upload operation.
- Use resumable uploads for large files in
Client::UploadFile(). - Implement support for the
userIpoptional query parameter. - BREAKING CHANGE
Client::RewriteObject(),Client::CopyObject(), andClient::ComposeObjectno longer require theObjectMetadataargument. Instead useWithObjectMetadata(), which can be omitted if you do not need to set any metadata attributes in the new object. - When using OpenSSL-1.0.2 the client library needs to configure the locking callbacks for OpenSSL. However, the application may disable this behavior if the application developer is going to use their own locking callbacks.
- When refreshing OAuth2 access tokens the client library uses the same retry and backoff policies as used for the request itself.
- Applications can set object metadata attributes via the
WithObjectMetadataoptional argument toClient::InsertObjectMedia(). - Applications can configure the library to only retry idempotent operations.
- The client library can use Google Compute Engine credentials to access the service.
- Automatically compute MD5 hashes and CRC32C checksums when objects are uploaded and downloaded. Any hash or checksum mismatched results in an exception. Applications can MD5 hashes, CRC32C checksums or both on any request.
- Parse Bucket lock and retention policy attributes in object and bucket metadata.
- Add APIs to upload and download files with a single function call.
- Improved the error messages generated when the credentials file is missing or has invalid contents.
- Jason Zaman contributed improvements and fixes to support soversion numbers with CMake.
- The library implements all the APIs in the service, including:
- Create, list, and delete buckets and objects.
- Read and modify metadata attributes of buckets and objects, including patch semantics.
- Compose multiple objects into a single object.
- Rewrite objects to a different bucket or with with different encrytion keys.
- Read object contents as a stream of data.
- Create objects using a stream of data.
- Create objects from a
std::string. - Control Object lifecycle policies in buckets.
- Control versioning in buckets.
- Read, modify and test IAM policies in buckets.
- Read, modify, list, and set ACLs for buckets and objects.
- Control Pub/Sub configuration of a bucket.
- Use pre-conditions for object and bucket operations.
- Customer-Supplied Encryption keys.
- Customer-Managed Encryption keys.
- The library does not (yet) have a GitHub release, it is only available from the default branch on GitHub