A connection to Cloud Pub/Sub for subscription-related administrative operations.
This interface defines pure-virtual functions for each of the user-facing overload sets in SubscriptionAdminClient. That is, all of SubscriptionAdminClient overloads will forward to the one pure-virtual function declared in this interface. This allows users to inject custom behavior (e.g., with a Google Mock object) in a SubscriptionAdminClient object for use in their own tests.
Applications may define classes derived from SubscriptionAdminConnection, for example, because they want to mock the class. To avoid breaking all such derived classes when we change the number or type of the arguments to the member functions we define lightweight structures to pass the arguments.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[],null,["# Class SubscriptionAdminConnection (2.39.0)\n\nVersion 2.39.0keyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/pubsub/latest/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.41.0](/cpp/docs/reference/pubsub/2.41.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.40.0](/cpp/docs/reference/pubsub/2.40.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.39.0](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.38.0](/cpp/docs/reference/pubsub/2.38.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.37.0](/cpp/docs/reference/pubsub/2.37.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.36.0](/cpp/docs/reference/pubsub/2.36.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.35.0](/cpp/docs/reference/pubsub/2.35.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.34.0](/cpp/docs/reference/pubsub/2.34.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.33.0](/cpp/docs/reference/pubsub/2.33.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.32.0](/cpp/docs/reference/pubsub/2.32.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.31.0](/cpp/docs/reference/pubsub/2.31.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.30.0](/cpp/docs/reference/pubsub/2.30.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.29.0](/cpp/docs/reference/pubsub/2.29.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.28.0](/cpp/docs/reference/pubsub/2.28.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.27.0](/cpp/docs/reference/pubsub/2.27.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.26.0](/cpp/docs/reference/pubsub/2.26.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.25.1](/cpp/docs/reference/pubsub/2.25.1/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.24.0](/cpp/docs/reference/pubsub/2.24.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.23.0](/cpp/docs/reference/pubsub/2.23.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.22.1](/cpp/docs/reference/pubsub/2.22.1/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.21.0](/cpp/docs/reference/pubsub/2.21.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.20.0](/cpp/docs/reference/pubsub/2.20.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.19.0](/cpp/docs/reference/pubsub/2.19.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.18.0](/cpp/docs/reference/pubsub/2.18.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.17.0](/cpp/docs/reference/pubsub/2.17.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.16.0](/cpp/docs/reference/pubsub/2.16.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.15.1](/cpp/docs/reference/pubsub/2.15.1/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.14.0](/cpp/docs/reference/pubsub/2.14.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.13.0](/cpp/docs/reference/pubsub/2.13.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.12.0](/cpp/docs/reference/pubsub/2.12.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection)\n- [2.11.0](/cpp/docs/reference/pubsub/2.11.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection) \nA connection to Cloud Pub/Sub for subscription-related administrative operations. \n| **Deprecated:** Please use [`google::cloud::pubsub_admin::SubscriptionAdminClient`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub__admin_1_1SubscriptionAdminClient) and [`google::cloud::pubsub_admin::SubscriptionAdminClient`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub__admin_1_1SubscriptionAdminClient) instead.\n\nThis interface defines pure-virtual functions for each of the user-facing overload sets in [`SubscriptionAdminClient`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient). That is, all of [`SubscriptionAdminClient`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient) overloads will forward to the one pure-virtual function declared in this interface. This allows users to inject custom behavior (e.g., with a Google Mock object) in a [`SubscriptionAdminClient`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient) object for use in their own tests.\n\nTo create a concrete instance that connects you to the real Cloud Pub/Sub service, see [`MakeSubscriptionAdminConnection()`](/cpp/docs/reference/pubsub/2.39.0/namespacegoogle_1_1cloud_1_1pubsub).\n\n###### The \\*Params nested classes\n\nApplications may define classes derived from [`SubscriptionAdminConnection`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminConnection), for example, because they want to mock the class. To avoid breaking all such derived classes when we change the number or type of the arguments to the member functions we define lightweight structures to pass the arguments.\n\nFunctions\n---------\n\n### virtual CreateSubscription(CreateSubscriptionParams)\n\nDefines the interface for [`SubscriptionAdminClient::CreateSubscription()`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient#classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient_1a5de41b90ad90e9284d16f67d591026ce)\n\n### virtual GetSubscription(GetSubscriptionParams)\n\nDefines the interface for [`SubscriptionAdminClient::GetSubscription()`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient#classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient_1a5db46a8f2cea079581820d9c3f970ce4)\n\n### virtual UpdateSubscription(UpdateSubscriptionParams)\n\nDefines the interface for [`SubscriptionAdminClient::UpdateSubscription()`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient#classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient_1a08a1b5414e08b85b6b7b498db8db95c1)\n\n### virtual ListSubscriptions(ListSubscriptionsParams)\n\nDefines the interface for [`SubscriptionAdminClient::ListSubscriptions()`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient#classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient_1a5441694c664576d298ce33628e4f998a)\n\n### virtual DeleteSubscription(DeleteSubscriptionParams)\n\nDefines the interface for [`SubscriptionAdminClient::DeleteSubscription()`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient#classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient_1adbee4a577908d080f381cc7d82c915a5)\n\n### virtual ModifyPushConfig(ModifyPushConfigParams)\n\nDefines the interface for `SubscriptionAdminClient::ModifyPushConfig()`\n\n### virtual CreateSnapshot(CreateSnapshotParams)\n\nDefines the interface for `SnapshotAdminClient::CreateSnapshot()`\n\n### virtual GetSnapshot(GetSnapshotParams)\n\nDefines the interface for `SnapshotAdminClient::GetSnapshot()`\n\n### virtual UpdateSnapshot(UpdateSnapshotParams)\n\nDefines the interface for `SnapshotAdminClient::UpdateSnapshot()`\n\n### virtual ListSnapshots(ListSnapshotsParams)\n\nDefines the interface for [`SubscriptionAdminClient::ListSnapshots()`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient#classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient_1af509412c7e632328e10af4e1ac048a09)\n\n### virtual DeleteSnapshot(DeleteSnapshotParams)\n\nDefines the interface for `SnapshotAdminClient::DeleteSnapshot()`\n\n### virtual Seek(SeekParams)\n\nDefines the interface for [`SubscriptionAdminClient::Seek()`](/cpp/docs/reference/pubsub/2.39.0/classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient#classgoogle_1_1cloud_1_1pubsub_1_1SubscriptionAdminClient_1adf39ab4e4cd24b2447a97410f2d2252b)\n\n### virtual options() const\n\nReturn the options used to create the connection."]]