text stringlengths 81 112k |
|---|
Sample ID: go/samples-tracker/1533
def update_model(client, model_id):
"""Sample ID: go/samples-tracker/1533"""
# [START bigquery_update_model_description]
from google.cloud import bigquery
# TODO(developer): Construct a BigQuery client object.
# client = bigquery.Client()
# TODO(developer):... |
Convert a Query instance to the corresponding protobuf.
:type query: :class:`Query`
:param query: The source query.
:rtype: :class:`.query_pb2.Query`
:returns: A protobuf that can be sent to the protobuf API. N.b. that
it does not contain "in-flight" fields for ongoing query
... |
Update the query's namespace.
:type value: str
def namespace(self, value):
"""Update the query's namespace.
:type value: str
"""
if not isinstance(value, str):
raise ValueError("Namespace must be a string")
self._namespace = value |
Update the Kind of the Query.
:type value: str
:param value: updated kind for the query.
.. note::
The protobuf specification allows for ``kind`` to be repeated,
but the current implementation returns an error if more than
one value is passed. If the back-end... |
Set the ancestor for the query
:type value: :class:`~google.cloud.datastore.key.Key`
:param value: the new ancestor key
def ancestor(self, value):
"""Set the ancestor for the query
:type value: :class:`~google.cloud.datastore.key.Key`
:param value: the new ancestor key
... |
Filter the query based on a property name, operator and a value.
Expressions take the form of::
.add_filter('<property>', '<operator>', <value>)
where property is a property stored on the entity in the datastore
and operator is one of ``OPERATORS``
(ie, ``=``, ``<``, ``<=``,... |
Set the fields returned the query.
:type projection: str or sequence of strings
:param projection: Each value is a string giving the name of a
property to be included in the projection query.
def projection(self, projection):
"""Set the fields returned the query.
... |
Set the fields used to sort query results.
Sort fields will be applied in the order specified.
:type value: str or sequence of strings
:param value: Each value is a string giving the name of the
property on which to sort, optionally preceded by a
hyp... |
Set fields used to group query results.
:type value: str or sequence of strings
:param value: Each value is a string giving the name of a
property to use to group results together.
def distinct_on(self, value):
"""Set fields used to group query results.
:type val... |
Execute the Query; return an iterator for the matching entities.
For example::
>>> from google.cloud import datastore
>>> client = datastore.Client()
>>> query = client.query(kind='Person')
>>> query.add_filter('name', '=', 'Sally')
>>> list(query.fetch())
... |
Build a query protobuf.
Relies on the current state of the iterator.
:rtype:
:class:`.query_pb2.Query`
:returns: The query protobuf object for the current
state of the iterator.
def _build_protobuf(self):
"""Build a query protobuf.
Relies on the ... |
Process the response from a datastore query.
:type response_pb: :class:`.datastore_pb2.RunQueryResponse`
:param response_pb: The protobuf response from a ``runQuery`` request.
:rtype: iterable
:returns: The next page of entity results.
:raises ValueError: If ``more_results`` is... |
Get the next page in the iterator.
:rtype: :class:`~google.cloud.iterator.Page`
:returns: The next page in the iterator (or :data:`None` if
there are no pages left).
def _next_page(self):
"""Get the next page in the iterator.
:rtype: :class:`~google.cloud.iterator.Pa... |
Helper for :meth:`Batch.insert` et aliae.
:type table: str
:param table: Name of the table to be modified.
:type columns: list of str
:param columns: Name of the table columns to be modified.
:type values: list of lists
:param values: Values to be modified.
:rtype: :class:`google.cloud.s... |
Update one or more existing table rows.
:type table: str
:param table: Name of the table to be modified.
:type columns: list of str
:param columns: Name of the table columns to be modified.
:type values: list of lists
:param values: Values to be modified.
def update(s... |
Delete one or more table rows.
:type table: str
:param table: Name of the table to be modified.
:type keyset: :class:`~google.cloud.spanner_v1.keyset.Keyset`
:param keyset: Keys/ranges identifying rows to delete.
def delete(self, table, keyset):
"""Delete one or more table row... |
Commit mutations to the database.
:rtype: datetime
:returns: timestamp of the committed changes.
def commit(self):
"""Commit mutations to the database.
:rtype: datetime
:returns: timestamp of the committed changes.
"""
self._check_state()
database = sel... |
Return if a dataset exists.
Args:
client (google.cloud.bigquery.client.Client):
A client to connect to the BigQuery API.
dataset_reference (google.cloud.bigquery.dataset.DatasetReference):
A reference to the dataset to look for.
Returns:
bool: ``True`` if the da... |
Return if a table exists.
Args:
client (google.cloud.bigquery.client.Client):
A client to connect to the BigQuery API.
table_reference (google.cloud.bigquery.table.TableReference):
A reference to the table to look for.
Returns:
bool: ``True`` if the table exists... |
Queries for entities.
Example:
>>> from google.cloud import datastore_v1
>>>
>>> client = datastore_v1.DatastoreClient()
>>>
>>> # TODO: Initialize `project_id`:
>>> project_id = ''
>>>
>>> # TODO: Initialize `parti... |
Commits a transaction, optionally creating, deleting or modifying some
entities.
Example:
>>> from google.cloud import datastore_v1
>>> from google.cloud.datastore_v1 import enums
>>>
>>> client = datastore_v1.DatastoreClient()
>>>
... |
Return the GAE resource using the environment variables.
:rtype: :class:`~google.cloud.logging.resource.Resource`
:returns: Monitored resource for GAE.
def get_gae_resource(self):
"""Return the GAE resource using the environment variables.
:rtype: :class:`~google.cloud.logging.resourc... |
Return the labels for GAE app.
If the trace ID can be detected, it will be included as a label.
Currently, no other labels are included.
:rtype: dict
:returns: Labels for GAE app.
def get_gae_labels(self):
"""Return the labels for GAE app.
If the trace ID can be detec... |
Actually log the specified logging record.
Overrides the default emit behavior of ``StreamHandler``.
See https://docs.python.org/2/library/logging.html#handler-objects
:type record: :class:`logging.LogRecord`
:param record: The record to be logged.
def emit(self, record):
"""... |
Return a fully-qualified service_account string.
def service_account_path(cls, project, service_account):
"""Return a fully-qualified service_account string."""
return google.api_core.path_template.expand(
"projects/{project}/serviceAccounts/{service_account}",
project=project,
... |
Generates an OAuth 2.0 access token for a service account.
Example:
>>> from google.cloud import iam_credentials_v1
>>>
>>> client = iam_credentials_v1.IAMCredentialsClient()
>>>
>>> name = client.service_account_path('[PROJECT]', '[SERVICE_ACCOUNT]')... |
Generates an OpenID Connect ID token for a service account.
Example:
>>> from google.cloud import iam_credentials_v1
>>>
>>> client = iam_credentials_v1.IAMCredentialsClient()
>>>
>>> name = client.service_account_path('[PROJECT]', '[SERVICE_ACCOUNT]'... |
Signs a blob using a service account's system-managed private key.
Example:
>>> from google.cloud import iam_credentials_v1
>>>
>>> client = iam_credentials_v1.IAMCredentialsClient()
>>>
>>> name = client.service_account_path('[PROJECT]', '[SERVICE_AC... |
Exchange a JWT signed by third party identity provider to an OAuth 2.0
access token
Example:
>>> from google.cloud import iam_credentials_v1
>>>
>>> client = iam_credentials_v1.IAMCredentialsClient()
>>>
>>> name = client.service_account_path(... |
Return a fully-qualified entry string.
def entry_path(cls, project, location, entry_group, entry):
"""Return a fully-qualified entry string."""
return google.api_core.path_template.expand(
"projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}",
proje... |
Get an entry by target resource name. This method allows clients to use
the resource name from the source Google Cloud Platform service to get the
Cloud Data Catalog Entry.
Example:
>>> from google.cloud import datacatalog_v1beta1
>>>
>>> client = datacatalog... |
Convert a path tuple into a full path string.
Of the form:
``projects/{project_id}/databases/{database_id}/...
documents/{document_path}``
Args:
client (~.firestore_v1beta1.client.Client): The client that holds
configuration details and a GAPIC client object.
... |
Consume a gRPC stream that should contain a single response.
The stream will correspond to a ``BatchGetDocuments`` request made
for a single document.
Args:
response_iterator (~google.cloud.exceptions.GrpcRendezvous): A
streaming iterator returned from a ``BatchGetDocuments``
... |
Create and cache the full path for this document.
Of the form:
``projects/{project_id}/databases/{database_id}/...
documents/{document_path}``
Returns:
str: The full document path.
Raises:
ValueError: If the current document reference has... |
Create a sub-collection underneath the current document.
Args:
collection_id (str): The sub-collection identifier (sometimes
referred to as the "kind").
Returns:
~.firestore_v1beta1.collection.CollectionReference: The
child collection.
def collectio... |
Create the current document in the Firestore database.
Args:
document_data (dict): Property names and values to use for
creating a document.
Returns:
google.cloud.firestore_v1beta1.types.WriteResult: The
write result corresponding to the committed do... |
Replace the current document in the Firestore database.
A write ``option`` can be specified to indicate preconditions of
the "set" operation. If no ``option`` is specified and this document
doesn't exist yet, this method will create it.
Overwrites all content for the document with the ... |
Update an existing document in the Firestore database.
By default, this method verifies that the document exists on the
server before making updates. A write ``option`` can be specified to
override these preconditions.
Each key in ``field_updates`` can either be a field name or a
... |
Delete the current document in the Firestore database.
Args:
option (Optional[~.firestore_v1beta1.client.WriteOption]): A
write option to make assertions / preconditions on the server
state of the document before applying changes.
Returns:
google.p... |
Retrieve a snapshot of the current document.
See :meth:`~.firestore_v1beta1.client.Client.field_path` for
more information on **field paths**.
If a ``transaction`` is used and it already has write operations
added, this method cannot be used (i.e. read-after-write is not
allowe... |
List subcollections of the current document.
Args:
page_size (Optional[int]]): The maximum number of collections
in each page of results from this request. Non-positive values
are ignored. Defaults to a sensible value set by the API.
Returns:
Sequence[~.... |
Get a value from the snapshot data.
If the data is nested, for example:
.. code-block:: python
>>> snapshot.to_dict()
{
'top1': {
'middle2': {
'bottom3': 20,
'bottom4': 22,
},
... |
Helper for :meth:`Session.run_in_transaction`.
Detect retryable abort, and impose server-supplied delay.
:type exc: :class:`google.api_core.exceptions.Aborted`
:param exc: exception for aborted transaction
:type deadline: float
:param deadline: maximum timestamp to continue retrying the transacti... |
Helper for :func:`_delay_until_retry`.
:type exc: :class:`grpc.Call`
:param exc: exception for aborted transaction
:rtype: float
:returns: seconds to wait before retrying the transaction.
def _get_retry_delay(cause):
"""Helper for :func:`_delay_until_retry`.
:type exc: :class:`grpc.Call`
... |
Return a fully-qualified database string.
def database_path(cls, project, instance, database):
"""Return a fully-qualified database string."""
return google.api_core.path_template.expand(
"projects/{project}/instances/{instance}/databases/{database}",
project=project,
... |
Creates a new Cloud Spanner database and starts to prepare it for
serving. The returned ``long-running operation`` will have a name of the
format ``<database_name>/operations/<operation_id>`` and can be used to
track preparation of the database. The ``metadata`` field type is
``CreateDat... |
Updates the schema of a Cloud Spanner database by
creating/altering/dropping tables, columns, indexes, etc. The returned
``long-running operation`` will have a name of the format
``<database_name>/operations/<operation_id>`` and can be used to track
execution of the schema change(s). The... |
Get the scopes corresponding to admin / read-only state.
Returns:
Tuple[str, ...]: The tuple of scopes.
def _get_scopes(self):
"""Get the scopes corresponding to admin / read-only state.
Returns:
Tuple[str, ...]: The tuple of scopes.
"""
if self._read_o... |
Getter for the gRPC stub used for the Table Admin API.
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_table_data_client]
:end-before: [END bigtable_table_data_client]
:rtype: :class:`.bigtable_v2.BigtableClient`
:returns: A BigtableC... |
Getter for the gRPC stub used for the Table Admin API.
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_table_admin_client]
:end-before: [END bigtable_table_admin_client]
:rtype: :class:`.bigtable_admin_pb2.BigtableTableAdmin`
:returns... |
Getter for the gRPC stub used for the Table Admin API.
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_instance_admin_client]
:end-before: [END bigtable_instance_admin_client]
:rtype: :class:`.bigtable_admin_pb2.BigtableInstanceAdmin`
... |
Factory to create a instance associated with this client.
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_create_prod_instance]
:end-before: [END bigtable_create_prod_instance]
:type instance_id: str
:param instance_id: The ID of the ... |
List instances owned by the project.
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_list_instances]
:end-before: [END bigtable_list_instances]
:rtype: tuple
:returns:
(instances, failed_locations), where 'instances' is li... |
List the clusters in the project.
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_list_clusters_in_project]
:end-before: [END bigtable_list_clusters_in_project]
:rtype: tuple
:returns:
(clusters, failed_locations), where '... |
Deletes a metric descriptor. Only user-created
[custom metrics](/monitoring/custom-metrics) can be deleted.
def DeleteMetricDescriptor(self, request, context):
"""Deletes a metric descriptor. Only user-created
[custom metrics](/monitoring/custom-metrics) can be deleted.
"""
context.set_code... |
Lists all clusters owned by a project in either the specified zone or all
zones.
Example:
>>> from google.cloud import container_v1
>>>
>>> client = container_v1.ClusterManagerClient()
>>>
>>> # TODO: Initialize `project_id`:
>>> p... |
Gets the details of a specific cluster.
Example:
>>> from google.cloud import container_v1
>>>
>>> client = container_v1.ClusterManagerClient()
>>>
>>> # TODO: Initialize `project_id`:
>>> project_id = ''
>>>
>>> # ... |
Sets labels on a cluster.
Example:
>>> from google.cloud import container_v1
>>>
>>> client = container_v1.ClusterManagerClient()
>>>
>>> # TODO: Initialize `project_id`:
>>> project_id = ''
>>>
>>> # TODO: Initiali... |
Return a fully-qualified metric string.
def metric_path(cls, project, metric):
"""Return a fully-qualified metric string."""
return google.api_core.path_template.expand(
"projects/{project}/metrics/{metric}", project=project, metric=metric
) |
Gets a logs-based metric.
Example:
>>> from google.cloud import logging_v2
>>>
>>> client = logging_v2.MetricsServiceV2Client()
>>>
>>> metric_name = client.metric_path('[PROJECT]', '[METRIC]')
>>>
>>> response = client.get_log... |
Return a fully-qualified metric_descriptor string.
def metric_descriptor_path(cls, project, metric_descriptor):
"""Return a fully-qualified metric_descriptor string."""
return google.api_core.path_template.expand(
"projects/{project}/metricDescriptors/{metric_descriptor=**}",
pr... |
Return a fully-qualified monitored_resource_descriptor string.
def monitored_resource_descriptor_path(cls, project, monitored_resource_descriptor):
"""Return a fully-qualified monitored_resource_descriptor string."""
return google.api_core.path_template.expand(
"projects/{project}/monitored... |
Construct a KeyRange protobuf.
:rtype: :class:`~google.cloud.spanner_v1.proto.keys_pb2.KeyRange`
:returns: protobuf corresponding to this instance.
def _to_pb(self):
"""Construct a KeyRange protobuf.
:rtype: :class:`~google.cloud.spanner_v1.proto.keys_pb2.KeyRange`
:returns: p... |
Return keyrange's state as a dict.
:rtype: dict
:returns: state of this instance.
def _to_dict(self):
"""Return keyrange's state as a dict.
:rtype: dict
:returns: state of this instance.
"""
mapping = {}
if self.start_open:
mapping["start_o... |
Construct a KeySet protobuf.
:rtype: :class:`~google.cloud.spanner_v1.proto.keys_pb2.KeySet`
:returns: protobuf corresponding to this instance.
def _to_pb(self):
"""Construct a KeySet protobuf.
:rtype: :class:`~google.cloud.spanner_v1.proto.keys_pb2.KeySet`
:returns: protobuf ... |
Return keyset's state as a dict.
The result can be used to serialize the instance and reconstitute
it later using :meth:`_from_dict`.
:rtype: dict
:returns: state of this instance.
def _to_dict(self):
"""Return keyset's state as a dict.
The result can be used to seria... |
Create an instance from the corresponding state mapping.
:type mapping: dict
:param mapping: the instance state.
def _from_dict(cls, mapping):
"""Create an instance from the corresponding state mapping.
:type mapping: dict
:param mapping: the instance state.
"""
... |
Map errors for Unary-Unary and Stream-Unary gRPC callables.
def _wrap_unary_errors(callable_):
"""Map errors for Unary-Unary and Stream-Unary gRPC callables."""
_patch_callable_name(callable_)
@six.wraps(callable_)
def error_remapped_callable(*args, **kwargs):
try:
return callable_... |
Wrap errors for Unary-Stream and Stream-Stream gRPC callables.
The callables that return iterators require a bit more logic to re-map
errors when iterating. This wraps both the initial invocation and the
iterator of the return value to re-map errors.
def _wrap_stream_errors(callable_):
"""Wrap errors ... |
Create a secure channel with credentials.
Args:
target (str): The target service address in the format 'hostname:port'.
credentials (google.auth.credentials.Credentials): The credentials. If
not specified, then this function will attempt to ascertain the
credentials from the... |
Get the next response from the stream.
Returns:
protobuf.Message: A single response from the stream.
def next(self):
"""Get the next response from the stream.
Returns:
protobuf.Message: A single response from the stream.
"""
try:
return six.... |
A functools.wraps helper that handles partial objects on Python 2.
def wraps(wrapped):
"""A functools.wraps helper that handles partial objects on Python 2."""
if isinstance(wrapped, functools.partial):
return six.wraps(wrapped, assigned=_PARTIAL_VALID_ASSIGNMENTS)
else:
return six.wraps(wr... |
Determine default project explicitly or implicitly as fall-back.
In implicit case, supports four environments. In order of precedence, the
implicit environments are:
* DATASTORE_DATASET environment variable (for ``gcd`` / emulator testing)
* GOOGLE_CLOUD_PROJECT environment variable
* Google App E... |
Repeat lookup until all keys found (unless stop requested).
Helper function for :meth:`Client.get_multi`.
:type datastore_api:
:class:`google.cloud.datastore._http.HTTPDatastoreAPI`
or :class:`google.cloud.datastore_v1.gapic.DatastoreClient`
:param datastore_api: The datastore API object u... |
Getter for a wrapped API object.
def _datastore_api(self):
"""Getter for a wrapped API object."""
if self._datastore_api_internal is None:
if self._use_grpc:
self._datastore_api_internal = make_datastore_api(self)
else:
self._datastore_api_interna... |
Retrieve an entity from a single key (if it exists).
.. note::
This is just a thin wrapper over :meth:`get_multi`.
The backend API does not make a distinction between a single key or
multiple keys in a lookup request.
:type key: :class:`google.cloud.datastore.key.Key`... |
Retrieve entities, along with their attributes.
:type keys: list of :class:`google.cloud.datastore.key.Key`
:param keys: The keys to be retrieved from the datastore.
:type missing: list
:param missing: (Optional) If a list is passed, the key-only entities
return... |
Save entities in the Cloud Datastore.
:type entities: list of :class:`google.cloud.datastore.entity.Entity`
:param entities: The entities to be saved to the datastore.
:raises: :class:`ValueError` if ``entities`` is a single entity.
def put_multi(self, entities):
"""Save entities in t... |
Delete keys from the Cloud Datastore.
:type keys: list of :class:`google.cloud.datastore.key.Key`
:param keys: The keys to be deleted from the Datastore.
def delete_multi(self, keys):
"""Delete keys from the Cloud Datastore.
:type keys: list of :class:`google.cloud.datastore.key.Key`
... |
Allocate a list of IDs from a partial key.
:type incomplete_key: :class:`google.cloud.datastore.key.Key`
:param incomplete_key: Partial key to use as base for allocated IDs.
:type num_ids: int
:param num_ids: The number of IDs to allocate.
:rtype: list of :class:`google.cloud.... |
Proxy to :class:`google.cloud.datastore.key.Key`.
Passes our ``project``.
def key(self, *path_args, **kwargs):
"""Proxy to :class:`google.cloud.datastore.key.Key`.
Passes our ``project``.
"""
if "project" in kwargs:
raise TypeError("Cannot pass project")
kw... |
Proxy to :class:`google.cloud.datastore.query.Query`.
Passes our ``project``.
Using query to search a datastore:
.. testsetup:: query
import os
import uuid
from google.cloud import datastore
unique = os.getenv('CIRCLE_BUILD_NUM', str(uuid.uui... |
Add a row to the batch. If the current batch meets one of the size
limits, the batch is sent synchronously.
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_batcher_mutate]
:end-before: [END bigtable_batcher_mutate]
:type row: class
... |
Sends the current. batch to Cloud Bigtable.
For example:
.. literalinclude:: snippets.py
:start-after: [START bigtable_batcher_flush]
:end-before: [END bigtable_batcher_flush]
def flush(self):
""" Sends the current. batch to Cloud Bigtable.
For example:
... |
Verify that a topic path is in the correct format.
.. _resource manager docs: https://cloud.google.com/resource-manager/\
reference/rest/v1beta1/projects#\
Project.FIELDS.project_id
.. _topic spec: https://cloud.google.com/storage/docs/json_api/v1/\... |
Construct an instance from the JSON repr returned by the server.
See: https://cloud.google.com/storage/docs/json_api/v1/notifications
:type resource: dict
:param resource: JSON repr of the notification
:type bucket: :class:`google.cloud.storage.bucket.Bucket`
:param bucket: Bu... |
Helper for :meth:`reload`.
:type response: dict
:param response: resource mapping from server
def _set_properties(self, response):
"""Helper for :meth:`reload`.
:type response: dict
:param response: resource mapping from server
"""
self._properties.clear()
... |
API wrapper: create the notification.
See:
https://cloud.google.com/storage/docs/json_api/v1/notifications/insert
If :attr:`user_project` is set on the bucket, bills the API request
to that project.
:type client: :class:`~google.cloud.storage.client.Client`
:param clie... |
Test whether this notification exists.
See:
https://cloud.google.com/storage/docs/json_api/v1/notifications/get
If :attr:`user_project` is set on the bucket, bills the API request
to that project.
:type client: :class:`~google.cloud.storage.client.Client` or
... |
Update this notification from the server configuration.
See:
https://cloud.google.com/storage/docs/json_api/v1/notifications/get
If :attr:`user_project` is set on the bucket, bills the API request
to that project.
:type client: :class:`~google.cloud.storage.client.Client` or
... |
Delete this notification.
See:
https://cloud.google.com/storage/docs/json_api/v1/notifications/delete
If :attr:`user_project` is set on the bucket, bills the API request
to that project.
:type client: :class:`~google.cloud.storage.client.Client` or
``None... |
Creates a Redis instance based on the specified tier and memory size.
By default, the instance is accessible from the project's `default
network <https://cloud.google.com/compute/docs/networks-and-firewalls#networks>`__.
The creation is executed asynchronously and callers may check the
... |
Import a Redis RDB snapshot file from GCS into a Redis instance.
Redis may stop serving during this operation. Instance state will be
IMPORTING for entire operation. When complete, the instance will contain
only data from the imported file.
The returned operation is automatically delet... |
Return a fully-qualified notification_channel string.
def notification_channel_path(cls, project, notification_channel):
"""Return a fully-qualified notification_channel string."""
return google.api_core.path_template.expand(
"projects/{project}/notificationChannels/{notification_channel}",... |
Return a fully-qualified notification_channel_descriptor string.
def notification_channel_descriptor_path(cls, project, channel_descriptor):
"""Return a fully-qualified notification_channel_descriptor string."""
return google.api_core.path_template.expand(
"projects/{project}/notificationCh... |
Return a batch to use as a context manager.
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
:param client: the client to use. If not passed, falls back to the
``client`` stored on the current topic.
:rtype: :class:`Batch`... |
Helper for :meth:`log_empty`, :meth:`log_text`, etc.
def _do_log(self, client, _entry_class, payload=None, **kw):
"""Helper for :meth:`log_empty`, :meth:`log_text`, etc.
"""
client = self._require_client(client)
# Apply defaults
kw["log_name"] = kw.pop("log_name", self.full_nam... |
API call: log a text message via a POST request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
:type text: str
:param text: the log message.
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
... |
API call: log a structured message via a POST request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
:type info: dict
:param info: the log entry information
:type client: :class:`~google.cloud.logging.client.Client` or
``Non... |
API call: log a protobuf message via a POST request
See
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list
:type message: :class:`~google.protobuf.message.Message`
:param message: The protobuf message to be logged.
:type client: :class:`~google.cloud.logg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.