Send feedback
Class Sink (9.5.7)
Stay organized with collections
Save and categorize content based on your preferences.
Version 9.5.7keyboard_arrow_down
A sink is an object that lets you to specify a set of log entries to export to a particular destination. Cloud Logging lets you export log entries to destinations including Cloud Storage buckets (for long term log storage), Google BigQuery datasets (for log analysis), Google Pub/Sub (for streaming to other applications).
[Introduction to Sinks]https://cloud.google.com/logging/docs/basic-concepts#sinks
Package
@google-cloud/logging!
Constructors
(constructor)(logging, name)
constructor ( logging : Logging , name : string );
Constructs a new instance of the Sink
class
Parameters
Name
Description
logging
Logging
name
string
Properties
Property Value
logging
Property Value
Property Value
name
Property Value
Methods
create(config)
create ( config : CreateSinkRequest ) : Promise <[ Sink , LogSink ]>;
Parameter
Returns
Type
Description
Promise <[Sink , LogSink ]>
create(config, callback)
create ( config : CreateSinkRequest , callback : CreateSinkCallback ) : void ;
Parameters
Returns
delete(gaxOptions)
delete ( gaxOptions ?: CallOptions ) : Promise<DeleteResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
Returns
Type
Description
Promise <DeleteResponse >
delete(callback)
delete ( callback : DeleteCallback ) : void ;
Parameter
Returns
delete(gaxOptions, callback)
delete ( gaxOptions : CallOptions , callback : DeleteCallback ) : void ;
Parameters
Returns
getMetadata ( gaxOptions ?: CallOptions ) : Promise<SinkMetadataResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
Returns
Type
Description
Promise <SinkMetadataResponse >
getMetadata ( callback : SinkMetadataCallback ) : void ;
Parameter
Name
Description
callback
SinkMetadataCallback
Returns
getMetadata ( gaxOptions : CallOptions , callback : SinkMetadataCallback ) : void ;
Parameters
Name
Description
gaxOptions
CallOptions
callback
SinkMetadataCallback
Returns
setFilter(filter)
setFilter ( filter : string ) : Promise<SinkMetadataResponse> ;
Parameter
Name
Description
filter
string
Returns
Type
Description
Promise <SinkMetadataResponse >
setFilter(filter, callback)
setFilter ( filter : string , callback : SinkMetadataCallback ) : void ;
Parameters
Name
Description
filter
string
callback
SinkMetadataCallback
Returns
setMetadata ( metadata : SetSinkMetadata ) : Promise<SinkMetadataResponse> ;
Parameter
Name
Description
metadata
SetSinkMetadata
Returns
Type
Description
Promise <SinkMetadataResponse >
setMetadata ( metadata : SetSinkMetadata , callback : SinkMetadataCallback ) : void ;
Parameters
Name
Description
metadata
SetSinkMetadata
callback
SinkMetadataCallback
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-02 UTC.
Need to tell us more?
[[["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-07-02 UTC."],[],[]]