Namespace google::cloud (2.46.0-rc) Stay organized with collections Save and categorize content based on your preferences.
Contains all the Google Cloud C++ Library APIs.
Classes
AsyncOperation
Represents a pending asynchronous operation.
AsyncStreamingReadWriteRpc<Request, Response>
A streaming read-write RPC.
BackgroundThreads
A object representing the background threads available to a Client.
CompletionQueue
Call the functor associated with asynchronous operations when they complete.
ConnectionOptions<ConnectionTraits>
The configuration parameters for client connections.
Credentials
An opaque representation of the authentication configuration.
ErrorInfo
Describes the cause of the error with structured details.
future<T>
Implement ISO/IEC TS 19571:2016future<T>.
future< void >
Specialize ISO/IEC TS 19571:2016 future for void.
GenericPollingPolicy<Retry, Backoff>
Construct a polling policy from existing Retry and Backoff policies.
KmsKeyName
This class identifies a Google Cloud KMS Key.
Location
A representation of a CloudLocation.
LogBackend
The logging backend interface.
Logger<bool>
Define the class to capture a log message.
Logger< false >
Define the logger for a disabled log level.
LogSink
A sink to receive log records.
Options
A class that holds option structs indexed by their type.
PollingPolicy
Control the Cloud C++ client library behavior with respect to polling on long running operations.
Project
This class identifies a CloudProject.
promise<T>
Implement ISO/IEC TS 19571:2016promise<T>.
promise< void >
Specialize ISO/IEC TS 19571:2016 promise for void.
ProxyConfig
The configuration for a HTTP Proxy.
RetryPolicy
Define the interface for retry policies.
RuntimeStatusError
A runtime error that wraps agoogle::cloud::Status.
Status
Represents success or an error with info about the error.
StatusOr<T>
Holds a value or aStatus indicating why there is no value.
StreamRange<T>
AStreamRange<T> is a range ofStatusOr<T> where the end-of-stream is indicated by a non-OKStatus.
TracingOptions
The configuration parameters for RPC/protobuf tracing.
Structs
AccessToken
Represents an access token with a known expiration time.
AccessTokenLifetimeOption
Configure the access token lifetime.
AsyncTimerResult
The result of an async timer operation.
AuthorityOption
Configure the "authority" attribute.
CARootsFilePathOption
Configures a custom CA (Certificates Authority) certificates file.
CustomHeadersOption
An option to inject custom headers into the request.
DelegatesOption
Configure the delegates forMakeImpersonateServiceAccountCredentials()
EnableServerRetriesOption
Let the server make retry decisions, when applicable.
EndpointOption
Change the endpoint.
ExperimentalTag
An argument type to indicate experimental functions.
FieldMaskOption
Configure server-side filtering.
GrpcBackgroundThreadPoolSizeOption
The size of the background thread pool.
GrpcBackgroundThreadsFactoryOption
Changes theBackgroundThreadsFactory.
GrpcChannelArgumentsNativeOption
The nativegrpc::ChannelArguments object.
GrpcChannelArgumentsOption
A string-string map of arguments forgrpc::ChannelArguments::SetString.
GrpcCompletionQueueOption
TheCompletionQueue to use for background gRPC work.
GrpcCompressionAlgorithmOption
The gRPC compression algorithm used by clients/operations configured with this object.
GrpcCredentialOption
The gRPC credentials used by clients configured with this object.
GrpcNumChannelsOption
The number of transport channels to create.
GrpcTracingOptionsOption
TheTracingOptions to use when printing grpc protocol buffer messages.
Interface
Sets the interface name to use as outgoing network interface.
LoggingComponentsOption
Enable logging for a set of components.
LogRecord
Represents a single log message.
NoAwaitTag
NullStream
Implements operator<< for all types, without any effect.
OpenTelemetryTracingOption
Enables tracing withOpenTelemetry
ProxyOption
Configure the HTTP Proxy.
QuotaUserOption
Configure the QuotaUsersystem parameter.
RestTracingOptionsOption
TheTracingOptions to use when printing REST transport http messages.
RpcMetadata
RPC request metadata.
ScopesOption
Configure the scopes forMakeImpersonateServiceAccountCredentials()
ServerTimeoutOption
Timeout for the server to finish processing the request.
UnifiedCredentialsOption
A wrapper to store credentials into an options.
UserAgentProductsOption
User-agent products to include with each request.
UserIpOption
Configure the UserIpsystem parameter.
UserProjectOption
Specifies a project for quota and billing purposes.
Enums
Idempotency
Whether a request isidempotent.
Severity
Define the severity levels for Google Cloud Platform C++ Libraries logging.
StatusCode
Well-known status codes withgrpc::StatusCode-compatible values.
Functions
make_ready_future(T &&)
Create afuture that is immediately ready.
| Parameters | |
|---|---|
| Name | Description |
t | T && |
typename T | |
| Returns | |
|---|---|
| Type | Description |
auto | |
make_ready_future()
Create afuture that is immediately ready.
| Returns | |
|---|---|
| Type | Description |
future< void > | |
MakeStatusFromRpcError(grpc::Status const &)
Creates agoogle::cloud::Status from a grpc::Status.
| Parameter | |
|---|---|
| Name | Description |
status | grpc::Status const & |
| Returns | |
|---|---|
| Type | Description |
google::cloud::Status | |
MakeStatusFromRpcError(grpc::StatusCode, std::string)
Creates agoogle::cloud::Status from a grpc::StatusCode and description.
| Parameters | |
|---|---|
| Name | Description |
code | grpc::StatusCode |
what | std::string |
| Returns | |
|---|---|
| Type | Description |
google::cloud::Status | |
MakeStatusFromRpcError(google::rpc::Status const &)
Creates agoogle::cloud::Status from agoogle:rpc::Status proto.
Some gRPC services return thegoogle::rpc::Status proto for errors. The libraries ingoogle-cloud-cpp represent these errors using agoogle::cloud::Status.
| Parameter | |
|---|---|
| Name | Description |
proto | google::rpc::Status const & |
| Returns | |
|---|---|
| Type | Description |
google::cloud::Status | |
MakeKmsKeyName(std::string const &)
Constructs aKmsKeyName from the givenfull_name.
Returns a non-OKStatus iffull_name is improperly formed.
| Parameter | |
|---|---|
| Name | Description |
full_name | std::string const & |
| Returns | |
|---|---|
| Type | Description |
StatusOr< KmsKeyName > | |
MakeLocation(std::string const &)
Constructs aLocation from the givenfull_name.
Returns a non-OKStatus iffull_name is improperly formed.
| Parameter | |
|---|---|
| Name | Description |
full_name | std::string const & |
| Returns | |
|---|---|
| Type | Description |
StatusOr< Location > | |
ParseSeverity(std::string const &)
Convert a human-readable representation to a Severity.
| Parameter | |
|---|---|
| Name | Description |
name | std::string const & |
| Returns | |
|---|---|
| Type | Description |
absl::optional< Severity > | |
MakeProject(std::string const &)
Constructs aProject from the givenfull_name.
Returns a non-OKStatus iffull_name is improperly formed.
| Parameter | |
|---|---|
| Name | Description |
full_name | std::string const & |
| Returns | |
|---|---|
| Type | Description |
StatusOr< Project > | |
StatusCodeToString(StatusCode)
Convertcode to a human readable string.
| Parameter | |
|---|---|
| Name | Description |
code | StatusCode |
| Returns | |
|---|---|
| Type | Description |
std::string | |
make_status_or(T)
| Parameters | |
|---|---|
| Name | Description |
rhs | T |
typename T | |
| Returns | |
|---|---|
| Type | Description |
StatusOr< T > | |
AddUniverseDomainOption(Options)
Creates anOptions containing theUnifiedCredentialsOption and its correspondingUniverseDomainOption.
Uses theUnifiedCredentialsOption inoptions or ApplicationDefaultCredentials ifUnifiedCredentialsOption is not found, and retrieves the universe_domain from thoseCredentials and sets theUniverseDomainOption to the result.
If the Metadata Server needs to be called, this function checks the options for theUniverseDomainRetryPolicyOption andUniverseDomainBackoffPolicyOption. If either policy option is not present a default policy is used for the corresponding policy option.
If everything succeeds, theOptions returned contain both theUnifiedCredentialsOption and theUniverseDomainOption. If theRetryPolicy becomes exhausted or other errors are encountered, thatStatus is returned.
| Parameter | |
|---|---|
| Name | Description |
options | Options |
| Returns | |
|---|---|
| Type | Description |
StatusOr< Options > | |
GetUniverseDomain(Credentials const &, Options const &)
Interrogates the provided credentials for the universe_domain.
If the Metadata Server needs to be called, this function checks the options for theUniverseDomainRetryPolicyOption andUniverseDomainBackoffPolicyOption. If either policy option is not present a default policy is used for the corresponding policy option.
If successful the universe_domain value is returned, otherwise aStatus indicating the error encountered is returned.
| Parameters | |
|---|---|
| Name | Description |
credentials | Credentials const & |
options | Options const & |
| Returns | |
|---|---|
| Type | Description |
StatusOr< std::string > | |
version_major()
The Google Cloud C++ Client major version.
See Also
https://semver.org/spec/v2.0.0.html for details.
| Returns | |
|---|---|
| Type | Description |
int constexpr | |
version_minor()
The Google Cloud C++ Client minor version.
See Also
https://semver.org/spec/v2.0.0.html for details.
| Returns | |
|---|---|
| Type | Description |
int constexpr | |
version_patch()
The Google Cloud C++ Client patch version.
See Also
https://semver.org/spec/v2.0.0.html for details.
| Returns | |
|---|---|
| Type | Description |
int constexpr | |
version_pre_release()
The Google Cloud C++ Client pre-release version.
See Also
https://semver.org/spec/v2.0.0.html for details.
| Returns | |
|---|---|
| Type | Description |
char const * | |
version()
A single integer representing the Major/Minor/Patch version.
| Returns | |
|---|---|
| Type | Description |
int constexpr | |
version_string()
The version as a string, in MAJOR.MINOR.PATCH[-PRE][+gitrev] format.
| Returns | |
|---|---|
| Type | Description |
std::string | |
Type Aliases
CommonOptionList
OptionList< EndpointOption, UserAgentProductsOption, LoggingComponentsOption, UserProjectOption, AuthorityOption, CustomHeadersOption >A list of all the common options.
BackoffPolicy
::google::cloud::internal::BackoffPolicyThe base class for backoff policies.
ExponentialBackoffPolicy
google::cloud::internal::ExponentialBackoffPolicyA truncated exponential backoff policy with randomized periods.
UnifiedCredentialsOptionList
OptionList< AccessTokenLifetimeOption, CARootsFilePathOption, DelegatesOption, ScopesOption, LoggingComponentsOption, UnifiedCredentialsOption, experimental::ClientSslCertificateOption, experimental::CAInMemoryOption >A list of options related to authentication.
BackgroundThreadsFactory
std::function< std::unique_ptr< BackgroundThreads >()>GrpcOptionList
OptionList< GrpcCredentialOption, GrpcCompressionAlgorithmOption, GrpcNumChannelsOption, GrpcChannelArgumentsOption, GrpcChannelArgumentsNativeOption, GrpcTracingOptionsOption, GrpcBackgroundThreadPoolSizeOption, GrpcCompletionQueueOption, GrpcBackgroundThreadsFactoryOption >A list of all the gRPC options.
IamUpdater
std::function< absl::optional< google::iam::v1::Policy >( google::iam::v1::Policy)>Used in theSetIamPolicy() read-modify-write cycles where anetag helps prevent simultaneous updates of a policy from overwriting each other.
The updater is called with a recently fetched policy, and should either return an empty optional if no changes are required, or return a new policy to be set. In the latter case the updater should either (1) set theetag of the returned policy to that of the recently fetched policy (strongly suggested), or (2) not set theetag at all.
In case (1) if theetag does not match the existing policy (i.e., there has been an intermediate update), this update is dropped and a new cycle is initiated. In case (2) the existing policy is overwritten blindly.
optional
absl::optional< T >Alias template forgoogle::cloud::optional.
OptionList
internal::TypeList< T... >A template to hold a list of "option" types.
This can be a useful way to create meaningful lists of options. For example, there could be a list containing all the gRPC options. Or a list of all ProductX options. This gives us a way to link to lists of options with doxygen, and to do some checking about what options a function may expect.
RestOptionList
::google::cloud::OptionList< QuotaUserOption, RestTracingOptionsOption, ServerTimeoutOption, UserIpOption, Interface, experimental::SslCtxCallbackOption >The complete list of options accepted byCurlRestClient
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.