@@ -165,19 +165,23 @@ def list_entries(self, projects=None, filter_=None, order_by=None,
165165 for resource in resources ]
166166 return entries , token
167167
168- def sink (self , name , filter_ , destination ):
168+ def sink (self , name , filter_ = None , destination = None ):
169169 """Creates a sink bound to the current client.
170170
171171 :type name: str
172172 :param name: the name of the sink to be constructed.
173173
174174 :type filter_: str
175- :param filter_: the advanced logs filter expression defining the
176- entries exported by the sink.
175+ :param filter_: (optional) the advanced logs filter expression
176+ defining the entries exported by the sink. If not
177+ passed, the instance should already exist, to be
178+ refreshed via :meth:`Sink.reload`.
177179
178180 :type destination: str
179181 :param destination: destination URI for the entries exported by
180- the sink.
182+ the sink. If not passed, the instance should
183+ already exist, to be refreshed via
184+ :meth:`Sink.reload`.
181185
182186 :rtype: :class:`gcloud.logging.sink.Sink`
183187 :returns: Sink created with the current client.
@@ -211,18 +215,22 @@ def list_sinks(self, page_size=None, page_token=None):
211215 for resource in resources ]
212216 return sinks , token
213217
214- def metric (self , name , filter_ , description = '' ):
218+ def metric (self , name , filter_ = None , description = '' ):
215219 """Creates a metric bound to the current client.
216220
217221 :type name: str
218222 :param name: the name of the metric to be constructed.
219223
220224 :type filter_: str
221225 :param filter_: the advanced logs filter expression defining the
222- entries tracked by the metric.
226+ entries tracked by the metric. If not
227+ passed, the instance should already exist, to be
228+ refreshed via :meth:`Metric.reload`.
223229
224230 :type description: str
225231 :param description: the description of the metric to be constructed.
232+ If not passed, the instance should already exist,
233+ to be refreshed via :meth:`Metric.reload`.
226234
227235 :rtype: :class:`gcloud.logging.metric.Metric`
228236 :returns: Metric created with the current client.
0 commit comments