@@ -38,19 +38,12 @@ class Sink(object):
3838 :type client: :class:`google.cloud.logging.client.Client`
3939 :param client: A client which holds credentials and project configuration
4040 for the sink (which requires a project).
41-
42- :type unique_writer_identity: bool
43- :param unique_writer_identity: (Optional) determines the kind of
44- IAM identity returned as
45- writer_identity in the new sink.
4641 """
47- def __init__ (self , name , filter_ = None , destination = None , client = None ,
48- unique_writer_identity = False ):
42+ def __init__ (self , name , filter_ = None , destination = None , client = None ):
4943 self .name = name
5044 self .filter_ = filter_
5145 self .destination = destination
5246 self ._client = client
53- self ._unique_writer_identity = unique_writer_identity
5447 self ._writer_identity = None
5548
5649 @property
@@ -117,7 +110,7 @@ def _require_client(self, client):
117110 client = self ._client
118111 return client
119112
120- def create (self , client = None ):
113+ def create (self , client = None , unique_writer_identity = False ):
121114 """API call: create the sink via a PUT request
122115
123116 See
@@ -127,11 +120,16 @@ def create(self, client=None):
127120 ``NoneType``
128121 :param client: the client to use. If not passed, falls back to the
129122 ``client`` stored on the current sink.
123+
124+ :type unique_writer_identity: bool
125+ :param unique_writer_identity: (Optional) determines the kind of
126+ IAM identity returned as
127+ writer_identity in the new sink.
130128 """
131129 client = self ._require_client (client )
132130 client .sinks_api .sink_create (
133131 self .project , self .name , self .filter_ , self .destination ,
134- unique_writer_identity = self . _unique_writer_identity ,
132+ unique_writer_identity = unique_writer_identity ,
135133 )
136134
137135 def exists (self , client = None ):
0 commit comments