The returned connection object should not be used directly; instead it should be passed as an argument to the constructor ofApiKeysClient.
The optionaloptionsargument may be used to configure aspects of the returnedApiKeysConnection. Expected options are any of the types in the following option lists:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page provides documentation for the Google Cloud C++ client library's API Keys service, covering versions from 2.11.0 to 2.37.0-rc, with the latest stable version being 2.36.0.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation includes details on the \u003ccode\u003eApiKeysClient\u003c/code\u003e class, which is used to manage API keys within Google Cloud projects.\u003c/p\u003e\n"],["\u003cp\u003eSeveral classes are defined on this page that relate to the \u003ccode\u003eApiKeysConnection\u003c/code\u003e object, including classes for retry policies and idempotency policies that modify the connection.\u003c/p\u003e\n"],["\u003cp\u003eThe page details the \u003ccode\u003eMakeApiKeysConnection\u003c/code\u003e function, which is used to create an \u003ccode\u003eApiKeysConnection\u003c/code\u003e object that is used when constructing \u003ccode\u003eApiKeysClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation provided on this page includes information about various structs and functions that are used to configure and work with the ApiKeys service within the Google Cloud C++ client.\u003c/p\u003e\n"]]],[],null,["# Namespace google::cloud::apikeys_v2 (2.24.0)\n\nVersion 2.24.0keyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/apikeys/latest/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.41.0](/cpp/docs/reference/apikeys/2.41.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.40.0](/cpp/docs/reference/apikeys/2.40.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.39.0](/cpp/docs/reference/apikeys/2.39.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.38.0](/cpp/docs/reference/apikeys/2.38.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.37.0](/cpp/docs/reference/apikeys/2.37.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.36.0](/cpp/docs/reference/apikeys/2.36.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.35.0](/cpp/docs/reference/apikeys/2.35.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.34.0](/cpp/docs/reference/apikeys/2.34.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.33.0](/cpp/docs/reference/apikeys/2.33.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.32.0](/cpp/docs/reference/apikeys/2.32.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.31.0](/cpp/docs/reference/apikeys/2.31.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.30.0](/cpp/docs/reference/apikeys/2.30.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.29.0](/cpp/docs/reference/apikeys/2.29.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.28.0](/cpp/docs/reference/apikeys/2.28.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.27.0](/cpp/docs/reference/apikeys/2.27.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.26.0](/cpp/docs/reference/apikeys/2.26.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.25.1](/cpp/docs/reference/apikeys/2.25.1/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.24.0](/cpp/docs/reference/apikeys/2.24.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.23.0](/cpp/docs/reference/apikeys/2.23.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.22.1](/cpp/docs/reference/apikeys/2.22.1/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.21.0](/cpp/docs/reference/apikeys/2.21.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.20.0](/cpp/docs/reference/apikeys/2.20.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.19.0](/cpp/docs/reference/apikeys/2.19.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.18.0](/cpp/docs/reference/apikeys/2.18.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.17.0](/cpp/docs/reference/apikeys/2.17.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.16.0](/cpp/docs/reference/apikeys/2.16.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.15.1](/cpp/docs/reference/apikeys/2.15.1/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.14.0](/cpp/docs/reference/apikeys/2.14.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.13.0](/cpp/docs/reference/apikeys/2.13.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.12.0](/cpp/docs/reference/apikeys/2.12.0/namespacegoogle_1_1cloud_1_1apikeys__v2)\n- [2.11.0](/cpp/docs/reference/apikeys/2.11.0/namespacegoogle_1_1cloud_1_1apikeys__v2) \n\nClasses\n-------\n\n### [ApiKeysClient](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysClient)\n\nManages the API keys associated with projects.\n\n### [ApiKeysConnection](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnection)\n\nThe [`ApiKeysConnection`](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnection) object for [`ApiKeysClient`](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysClient).\n\n### [ApiKeysConnectionIdempotencyPolicy](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnectionIdempotencyPolicy)\n\n### [ApiKeysLimitedErrorCountRetryPolicy](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysLimitedErrorCountRetryPolicy)\n\nA retry policy for [`ApiKeysConnection`](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnection) based on counting errors.\n\n### [ApiKeysLimitedTimeRetryPolicy](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysLimitedTimeRetryPolicy)\n\nA retry policy for [`ApiKeysConnection`](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnection) based on elapsed time.\n\n### [ApiKeysRetryPolicy](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysRetryPolicy)\n\nThe retry policy for [`ApiKeysConnection`](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnection).\n\nStructs\n-------\n\n### [ApiKeysBackoffPolicyOption](/cpp/docs/reference/apikeys/2.24.0/structgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysBackoffPolicyOption)\n\nUse with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the backoff policy.\n\n### [ApiKeysConnectionIdempotencyPolicyOption](/cpp/docs/reference/apikeys/2.24.0/structgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnectionIdempotencyPolicyOption)\n\nUse with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure which operations are retried.\n\n### [ApiKeysPollingPolicyOption](/cpp/docs/reference/apikeys/2.24.0/structgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysPollingPolicyOption)\n\nUse with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the long-running operations polling policy.\n\n### [ApiKeysRetryPolicyOption](/cpp/docs/reference/apikeys/2.24.0/structgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysRetryPolicyOption)\n\nUse with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the retry policy.\n\nFunctions\n---------\n\n### MakeApiKeysConnection(Options)\n\nA factory function to construct an object of type [`ApiKeysConnection`](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnection). \nThe returned connection object should not be used directly; instead it should be passed as an argument to the constructor of [ApiKeysClient](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysClient).\n\nThe optional `options` argument may be used to configure aspects of the returned [`ApiKeysConnection`](/cpp/docs/reference/apikeys/2.24.0/classgoogle_1_1cloud_1_1apikeys__v2_1_1ApiKeysConnection). Expected options are any of the types in the following option lists:\n\n- [`google::cloud::CommonOptionList`](about:invalid#zCSafez)\n- [`google::cloud::GrpcOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)\n- [`google::cloud::UnifiedCredentialsOptionList`](about:invalid#zCSafez)\n- [`google::cloud::apikeys_v2::ApiKeysPolicyOptionList`](about:invalid#zCSafez)\n\n| **Note:** Unexpected options will be ignored. To log unexpected options instead, set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.\n\n### MakeDefaultApiKeysConnectionIdempotencyPolicy()"]]