Skip to content

Commit

Permalink
Update references that were 301 redirecting.
Browse files Browse the repository at this point in the history
  • Loading branch information
daspecster committed Mar 22, 2017
1 parent 478b47e commit 83523ca
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 52 deletions.
6 changes: 3 additions & 3 deletions docs/logging-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Make sure that the storage bucket you want to export logs too has
``cloud-logs@google.com`` as the owner. See
`Setting permissions for Cloud Storage`_.

.. _Setting permissions for Cloud Storage: https://cloud.google.com/logging/docs/export/configure_export#setting_product_name_short_permissions_for_writing_exported_logs
.. _Setting permissions for Cloud Storage: https://cloud.google.com/logging/docs/export/configure_export_v2#errors_exporting_to_cloud_storage

Add ``cloud-logs@google.com`` as the owner of the bucket:

Expand All @@ -200,7 +200,7 @@ and add ``cloud-logs@google.com`` to a dataset.

See: `Setting permissions for BigQuery`_

.. _Setting permissions for BigQuery: https://cloud.google.com/logging/docs/export/configure_export#manual-access-bq
.. _Setting permissions for BigQuery: https://cloud.google.com/logging/docs/export/configure_export_v2#errors_exporting_to_bigquery

.. literalinclude:: logging_snippets.py
:start-after: [START sink_dataset_permissions]
Expand All @@ -223,7 +223,7 @@ and add ``cloud-logs@google.com`` to a topic.

See: `Setting permissions for Pub/Sub`_

.. _Setting permissions for Pub/Sub: https://cloud.google.com/logging/docs/export/configure_export#manual-access-pubsub
.. _Setting permissions for Pub/Sub: https://cloud.google.com/logging/docs/export/configure_export_v2#errors_exporting_logs_to_cloud_pubsub

.. literalinclude:: logging_snippets.py
:start-after: [START sink_topic_permissions]
Expand Down
4 changes: 2 additions & 2 deletions error_reporting/google/cloud/error_reporting/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def report_errors_api(self):
"""Helper for logging-related API calls.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs
:rtype:
:class:`_gax._ErrorReportingGaxApi`
Expand Down
4 changes: 2 additions & 2 deletions logging/google/cloud/logging/_gax.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def sink_create(self, project, sink_name, filter_, destination):
"""API call: create a sink resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create
:type project: str
:param project: ID of the project in which to create the sink.
Expand Down Expand Up @@ -343,7 +343,7 @@ def metric_create(self, project, metric_name, filter_, description):
"""API call: create a metric resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/create
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type project: str
:param project: ID of the project in which to create the metric.
Expand Down
34 changes: 17 additions & 17 deletions logging/google/cloud/logging/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class _LoggingAPI(object):
"""Helper mapping logging-related APIs.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs
:type client: :class:`~google.cloud.logging.client.Client`
:param client: The client used to make API requests.
Expand All @@ -69,7 +69,7 @@ def list_entries(self, projects, filter_=None, order_by=None,
"""Return a page of log entry resources.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/list
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list
:type projects: list of strings
:param projects: project IDs to include. If not passed,
Expand Down Expand Up @@ -128,7 +128,7 @@ def write_entries(self, entries, logger_name=None, resource=None,
"""API call: log an entry resource via a POST request
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/write
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
:type entries: sequence of mapping
:param entries: the log entry resources to log.
Expand Down Expand Up @@ -162,7 +162,7 @@ def logger_delete(self, project, logger_name):
"""API call: delete all entries in a logger via a DELETE request
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs/delete
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete
:type project: str
:param project: ID of project containing the log entries to delete
Expand All @@ -178,7 +178,7 @@ class _SinksAPI(object):
"""Helper mapping sink-related APIs.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks
:type client: :class:`~google.cloud.logging.client.Client`
:param client: The client used to make API requests.
Expand All @@ -191,7 +191,7 @@ def list_sinks(self, project, page_size=None, page_token=None):
"""List sinks for the project associated with this client.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/list
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list
:type project: str
:param project: ID of the project whose sinks are to be listed.
Expand Down Expand Up @@ -225,7 +225,7 @@ def sink_create(self, project, sink_name, filter_, destination):
"""API call: create a sink resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/create
:type project: str
:param project: ID of the project in which to create the sink.
Expand Down Expand Up @@ -253,7 +253,7 @@ def sink_get(self, project, sink_name):
"""API call: retrieve a sink resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/get
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/get
:type project: str
:param project: ID of the project containing the sink.
Expand All @@ -271,7 +271,7 @@ def sink_update(self, project, sink_name, filter_, destination):
"""API call: update a sink resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/update
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/update
:type project: str
:param project: ID of the project containing the sink.
Expand Down Expand Up @@ -299,7 +299,7 @@ def sink_delete(self, project, sink_name):
"""API call: delete a sink resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/delete
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/delete
:type project: str
:param project: ID of the project containing the sink.
Expand All @@ -315,7 +315,7 @@ class _MetricsAPI(object):
"""Helper mapping sink-related APIs.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics
:type client: :class:`~google.cloud.logging.client.Client`
:param client: The client used to make API requests.
Expand All @@ -328,7 +328,7 @@ def list_metrics(self, project, page_size=None, page_token=None):
"""List metrics for the project associated with this client.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/list
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/list
:type project: str
:param project: ID of the project whose metrics are to be listed.
Expand Down Expand Up @@ -362,7 +362,7 @@ def metric_create(self, project, metric_name, filter_, description=None):
"""API call: create a metric resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/create
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type project: str
:param project: ID of the project in which to create the metric.
Expand All @@ -389,7 +389,7 @@ def metric_get(self, project, metric_name):
"""API call: retrieve a metric resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/get
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type project: str
:param project: ID of the project containing the metric.
Expand All @@ -407,7 +407,7 @@ def metric_update(self, project, metric_name, filter_, description):
"""API call: update a metric resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/update
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/update
:type project: str
:param project: ID of the project containing the metric.
Expand All @@ -434,7 +434,7 @@ def metric_delete(self, project, metric_name):
"""API call: delete a metric resource.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/delete
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/delete
:type project: str
:param project: ID of the project containing the metric.
Expand Down
14 changes: 7 additions & 7 deletions logging/google/cloud/logging/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def logging_api(self):
"""Helper for logging-related API calls.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs
"""
if self._logging_api is None:
if self._use_gax:
Expand All @@ -127,7 +127,7 @@ def sinks_api(self):
"""Helper for log sink-related API calls.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks
"""
if self._sinks_api is None:
if self._use_gax:
Expand All @@ -141,7 +141,7 @@ def metrics_api(self):
"""Helper for log metric-related API calls.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics
"""
if self._metrics_api is None:
if self._use_gax:
Expand All @@ -166,7 +166,7 @@ def list_entries(self, projects=None, filter_=None, order_by=None,
"""Return a page of log entries.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/list
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list
:type projects: list of strings
:param projects: project IDs to include. If not passed,
Expand Down Expand Up @@ -228,7 +228,7 @@ def list_sinks(self, page_size=None, page_token=None):
"""List sinks for the project associated with this client.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/list
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks/list
:type page_size: int
:param page_size: maximum number of sinks to return, If not passed,
Expand Down Expand Up @@ -273,7 +273,7 @@ def list_metrics(self, page_size=None, page_token=None):
"""List metrics for the project associated with this client.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/list
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/list
:type page_size: int
:param page_size: maximum number of metrics to return, If not passed,
Expand Down
6 changes: 3 additions & 3 deletions logging/google/cloud/logging/entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class TextEntry(_BaseEntry):
"""Entry created with ``textPayload``.
See:
https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/LogEntry
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
"""
_PAYLOAD_KEY = 'textPayload'

Expand All @@ -134,7 +134,7 @@ class StructEntry(_BaseEntry):
"""Entry created with ``jsonPayload``.
See:
https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/LogEntry
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
"""
_PAYLOAD_KEY = 'jsonPayload'

Expand All @@ -143,7 +143,7 @@ class ProtobufEntry(_BaseEntry):
"""Entry created with ``protoPayload``.
See:
https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/LogEntry
https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
"""
_PAYLOAD_KEY = 'protoPayload'

Expand Down
12 changes: 6 additions & 6 deletions logging/google/cloud/logging/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Logger(object):
"""Loggers represent named targets for log entries.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs
:type name: str
:param name: the name of the logger
Expand Down Expand Up @@ -169,7 +169,7 @@ def log_text(self, text, client=None, labels=None, insert_id=None,
"""API call: log a text message via a POST request
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/write
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
:type text: str
:param text: the log message.
Expand Down Expand Up @@ -206,7 +206,7 @@ def log_struct(self, info, client=None, labels=None, insert_id=None,
"""API call: log a structured message via a POST request
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/write
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write
:type info: dict
:param info: the log entry information
Expand Down Expand Up @@ -243,7 +243,7 @@ def log_proto(self, message, client=None, labels=None, insert_id=None,
"""API call: log a protobuf message via a POST request
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/write
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list
:type message: Protobuf message
:param message: the message to be logged
Expand Down Expand Up @@ -279,7 +279,7 @@ def delete(self, client=None):
"""API call: delete all entries in a logger via a DELETE request
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs/delete
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs/delete
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
Expand All @@ -294,7 +294,7 @@ def list_entries(self, projects=None, filter_=None, order_by=None,
"""Return a page of log entries.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/list
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list
:type projects: list of strings
:param projects: project IDs to include. If not passed,
Expand Down
12 changes: 6 additions & 6 deletions logging/google/cloud/logging/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Metric(object):
"""Metrics represent named filters for log entries.
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics
:type name: str
:param name: the name of the metric
Expand Down Expand Up @@ -103,7 +103,7 @@ def create(self, client=None):
"""API call: create the metric via a PUT request
See:
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/create
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
Expand All @@ -118,7 +118,7 @@ def exists(self, client=None):
"""API call: test for the existence of the metric via a GET request
See
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/get
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
Expand All @@ -141,7 +141,7 @@ def reload(self, client=None):
"""API call: sync local metric configuration via a GET request
See
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/get
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/get
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
Expand All @@ -157,7 +157,7 @@ def update(self, client=None):
"""API call: update metric configuration via a PUT request
See
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/update
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/update
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
Expand All @@ -172,7 +172,7 @@ def delete(self, client=None):
"""API call: delete a metric via a DELETE request
See
https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/delete
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/delete
:type client: :class:`~google.cloud.logging.client.Client` or
``NoneType``
Expand Down
Loading

0 comments on commit 83523ca

Please sign in to comment.