filter (Optional[str]) – The advanced logs filter expression defining
the entries exported by the sink.
destination (Optional[str]) – Destination URI for the entries exported by the sink.
If not passed, the instance should already exist, to
be refreshed via reload().
client (Optional[Client]) – A client which holds
credentials and project configuration for the sink (which requires a project).
[[["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-08-07 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [3.12.1 (latest)](/python/docs/reference/logging/latest/sink)\n- [3.12.0](/python/docs/reference/logging/3.12.0/sink)\n- [3.11.3](/python/docs/reference/logging/3.11.3/sink)\n- [3.10.0](/python/docs/reference/logging/3.10.0/sink)\n- [3.9.0](/python/docs/reference/logging/3.9.0/sink)\n- [3.8.0](/python/docs/reference/logging/3.8.0/sink)\n- [3.7.0](/python/docs/reference/logging/3.7.0/sink)\n- [3.6.0](/python/docs/reference/logging/3.6.0/sink)\n- [3.5.0](/python/docs/reference/logging/3.5.0/sink)\n- [3.4.0](/python/docs/reference/logging/3.4.0/sink)\n- [3.3.1](/python/docs/reference/logging/3.3.1/sink)\n- [3.2.5](/python/docs/reference/logging/3.2.5/sink)\n- [3.1.2](/python/docs/reference/logging/3.1.2/sink)\n- [3.0.0](/python/docs/reference/logging/3.0.0/sink)\n- [2.7.2](/python/docs/reference/logging/2.7.2/sink)\n- [2.6.0](/python/docs/reference/logging/2.6.0/sink)\n- [2.5.0](/python/docs/reference/logging/2.5.0/sink)\n- [2.4.0](/python/docs/reference/logging/2.4.0/sink)\n- [2.3.1](/python/docs/reference/logging/2.3.1/sink)\n- [2.2.0](/python/docs/reference/logging/2.2.0/sink)\n- [2.1.1](/python/docs/reference/logging/2.1.1/sink)\n- [2.0.2](/python/docs/reference/logging/2.0.2/sink)\n- [1.15.3](/python/docs/reference/logging/1.15.3/sink)\n- [1.14.0](/python/docs/reference/logging/1.14.0/sink)\n- [1.13.0](/python/docs/reference/logging/1.13.0/sink)\n- [1.12.1](/python/docs/reference/logging/1.12.1/sink) \n\nSinks\n=====\n\nDefine Cloud Logging API Sinks.\n\n### *class* google.cloud.logging_v2.sink.Sink(name, \\*, filter_=None, parent=None, destination=None, client=None)\n\nBases: [`object`](https://docs.python.org/3/library/functions.html#object)\n\nSinks represent filtered exports for log entries.\n\nSee \u003chttps://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks\u003e\n\n- **Parameters**\n\n - **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- The name of the sink.\n\n - **parent** (*Optional* *\\[* [*str*](https://docs.python.org/3/library/stdtypes.html#str)*\\]*) -- The resource in which to create the sink:\n\n \"projects/[PROJECT_ID]\"\n \"organizations/[ORGANIZATION_ID]\"\n \"billingAccounts/[BILLING_ACCOUNT_ID]\"\n \"folders/[FOLDER_ID]\".\n\n Defaults to the project stored on the client.\n - **filter** (*Optional* *\\[* [*str*](https://docs.python.org/3/library/stdtypes.html#str)*\\]*) -- The advanced logs filter expression defining\n the entries exported by the sink.\n\n - **destination** (*Optional* *\\[* [*str*](https://docs.python.org/3/library/stdtypes.html#str)*\\]* ) -- Destination URI for the entries exported by the sink.\n If not passed, the instance should already exist, to\n be refreshed via `reload()`.\n\n - **client** (*Optional* *\\[* [*Client*](/python/docs/reference/logging/latest/client#google.cloud.logging_v2.client.Client)*\\]*) -- A client which holds\n credentials and project configuration for the sink (which requires a project).\n\n#### *property* client()\n\nClient bound to the sink.\n\n#### create(\\*, client=None, unique_writer_identity=False)\n\nCreate the sink via a PUT request\n\nSee\n\u003chttps://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create\u003e\n\n- **Parameters**\n\n - **client** (*Optional* *\\[* [*Client*](/python/docs/reference/logging/latest/client#google.cloud.logging_v2.client.Client)*\\]* ) -- The client to use. If not passed, falls back to the\n `client` stored on the current sink.\n\n - **unique_writer_identity** (*Optional* *\\[* [*bool*](https://docs.python.org/3/library/functions.html#bool)*\\]*) -- Determines the kind of\n IAM identity returned as writer_identity in the new sink.\n\n#### delete(\\*, client=None)\n\nDelete a sink via a DELETE request\n\nSee\n\u003chttps://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete\u003e\n\n- **Parameters**\n\n **client** (*Optional* *\\[* [*Client*](/python/docs/reference/logging/latest/client#google.cloud.logging_v2.client.Client)*\\]* ) -- The client to use. If not passed, falls back to the\n `client` stored on the current sink.\n\n#### exists(\\*, client=None)\n\nTest for the existence of the sink via a GET request\n\nSee\n\u003chttps://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get\u003e\n\n- **Parameters**\n\n **client** (*Optional* *\\[* [*Client*](/python/docs/reference/logging/latest/client#google.cloud.logging_v2.client.Client)*\\]* ) -- The client to use. If not passed, falls back to the\n `client` stored on the current sink.\n- **Returns**\n\n Boolean indicating existence of the sink.\n- **Return type**\n\n [bool](https://docs.python.org/3/library/functions.html#bool)\n\n#### *classmethod* from_api_repr(resource, client, \\*, parent=None)\n\nConstruct a sink given its API representation\n\n- **Parameters**\n\n - **resource** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)) -- sink resource representation returned from the API\n\n - **client** ([*Client*](/python/docs/reference/logging/latest/client#google.cloud.logging_v2.client.Client)) -- Client which holds\n credentials and project configuration for the sink.\n\n - **parent** (*Optional* *\\[* [*str*](https://docs.python.org/3/library/stdtypes.html#str)*\\]*) -- The resource in which to create the sink:\n\n \"projects/[PROJECT_ID]\"\n \"organizations/[ORGANIZATION_ID]\"\n \"billingAccounts/[BILLING_ACCOUNT_ID]\"\n \"folders/[FOLDER_ID]\".\n\n Defaults to the project stored on the client.\n- **Returns**\n\n Sink parsed from `resource`.\n- **Return type**\n\n *Sink*\n- **Raises**\n\n [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) -- if `client` is not `None` and the\n project from the resource does not agree with the project\n from the client.\n\n#### *property* full_name()\n\nFully-qualified name used in sink APIs\n\n#### *property* parent()\n\nParent resource of the sink (project, organization, billingAccount, or folder).\n\n#### *property* path()\n\nURL path for the sink's APIs\n\n#### reload(\\*, client=None)\n\nSync local sink configuration via a GET request\n\nSee\n\u003chttps://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get\u003e\n\n- **Parameters**\n\n **client** (*Optional* *\\[* [*Client*](/python/docs/reference/logging/latest/client#google.cloud.logging_v2.client.Client)*\\]* ) -- The client to use. If not passed, falls back to the\n `client` stored on the current sink.\n\n#### update(\\*, client=None, unique_writer_identity=False)\n\nUpdate sink configuration via a PUT request\n\nSee\n\u003chttps://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update\u003e\n\n- **Parameters**\n\n - **client** (*Optional* *\\[* [*Client*](/python/docs/reference/logging/latest/client#google.cloud.logging_v2.client.Client)*\\]* ) -- The client to use. If not passed, falls back to the\n `client` stored on the current sink.\n\n - **unique_writer_identity** (*Optional* *\\[* [*bool*](https://docs.python.org/3/library/functions.html#bool)*\\]*) -- Determines the kind of\n IAM identity returned as writer_identity in the new sink.\n\n#### *property* writer_identity()\n\nIdentity used for exports via the sink"]]