# Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[docs]class LogSink(object):
"""
Describes a sink used to export log entries outside Stackdriver Logging.
Attributes:
name (string): Required. The client-assigned sink identifier. Example:
``"my-severe-errors-to-pubsub"``.
Sink identifiers are limited to 1000 characters
and can include only the following characters: ``A-Z``, ``a-z``,
``0-9``, and the special characters ``_-.``.
destination (string): The export destination. See
`Exporting Logs With Sinks <https://cloud.google.com/logging/docs/api/tasks/exporting-logs>`_.
Examples: ``"storage.googleapis.com/a-bucket"``,
``"bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset"``.
filter (string): An `advanced logs filter <https://cloud.google.com/logging/docs/view/advanced_filters>`_. Only
log entries matching that filter are exported. The filter must be
consistent with the log entry format specified by the
``outputVersionFormat`` parameter, regardless of the format of the
log entry that was originally written to Stackdriver Logging.
Example (V2 format):
``"logName=projects/my-projectid/logs/syslog AND severity>=ERROR"``.
output_version_format (:class:`google.logging.v2.logging_config_pb2.LogSink.VersionFormat`): The log entry version to use for this sink's exported log entries.
This version does not have to correspond to the version of the log entry
when it was written to Stackdriver Logging.
"""
pass
[docs]class ListSinksRequest(object):
"""
The parameters to ``ListSinks``.
Attributes:
parent (string): Required. The resource name containing the sinks.
Example: ``"projects/my-logging-project"``.
page_token (string): Optional. If the ``pageToken`` parameter is supplied, then the next page of
results is retrieved. The ``pageToken`` parameter must be set to the value
of the ``nextPageToken`` from the previous response.
The value of ``parent`` must be the same as in the previous request.
page_size (int): Optional. The maximum number of results to return from this request.
You must check for presence of ``nextPageToken`` to determine if additional
results are available, which you can retrieve by passing the
``nextPageToken`` value as the ``pageToken`` parameter in the next request.
"""
pass
[docs]class ListSinksResponse(object):
"""
Result returned from ``ListSinks``.
Attributes:
sinks (list[:class:`google.logging.v2.logging_config_pb2.LogSink`]): A list of sinks.
next_page_token (string): If there are more results than were returned, then ``nextPageToken`` is
included in the response. To get the next set of results, call this
method again using the value of ``nextPageToken`` as ``pageToken``.
"""
pass
[docs]class GetSinkRequest(object):
"""
The parameters to ``GetSink``.
Attributes:
sink_name (string): The resource name of the sink to return.
Example: ``"projects/my-project-id/sinks/my-sink-id"``.
"""
pass
[docs]class CreateSinkRequest(object):
"""
The parameters to ``CreateSink``.
Attributes:
parent (string): The resource in which to create the sink.
Example: ``"projects/my-project-id"``.
The new sink must be provided in the request.
sink (:class:`google.logging.v2.logging_config_pb2.LogSink`): The new sink, which must not have an identifier that already
exists.
"""
pass
[docs]class UpdateSinkRequest(object):
"""
The parameters to ``UpdateSink``.
Attributes:
sink_name (string): The resource name of the sink to update.
Example: ``"projects/my-project-id/sinks/my-sink-id"``.
The updated sink must be provided in the request and have the
same name that is specified in ``sinkName``. If the sink does not
exist, it is created.
sink (:class:`google.logging.v2.logging_config_pb2.LogSink`): The updated sink, whose name must be the same as the sink
identifier in ``sinkName``. If ``sinkName`` does not exist, then
this method creates a new sink.
"""
pass
[docs]class DeleteSinkRequest(object):
"""
The parameters to ``DeleteSink``.
Attributes:
sink_name (string): The resource name of the sink to delete.
Example: ``"projects/my-project-id/sinks/my-sink-id"``.
"""
pass