From 511fdf203937aafae3b68e3534b4bdb514531a71 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 27 Oct 2016 11:28:21 -0400 Subject: [PATCH] Fix up logging docs URLs after 'v2beta1' -> 'v2' transition. Follow-on to #2625. --- logging/google/cloud/logging/_gax.py | 4 +-- logging/google/cloud/logging/client.py | 14 ++++----- logging/google/cloud/logging/connection.py | 34 +++++++++++----------- logging/google/cloud/logging/entries.py | 6 ++-- logging/google/cloud/logging/logger.py | 12 ++++---- logging/google/cloud/logging/metric.py | 12 ++++---- logging/google/cloud/logging/sink.py | 12 ++++---- 7 files changed, 47 insertions(+), 47 deletions(-) diff --git a/logging/google/cloud/logging/_gax.py b/logging/google/cloud/logging/_gax.py index cd5ad58cd1a4..57cd4981cc61 100644 --- a/logging/google/cloud/logging/_gax.py +++ b/logging/google/cloud/logging/_gax.py @@ -171,7 +171,7 @@ def sink_create(self, project, sink_name, filter_, destination): """API call: create a sink resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/create + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create :type project: str :param project: ID of the project in which to create the sink. @@ -318,7 +318,7 @@ def metric_create(self, project, metric_name, filter_, description): """API call: create a metric resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/create + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/create :type project: str :param project: ID of the project in which to create the metric. diff --git a/logging/google/cloud/logging/client.py b/logging/google/cloud/logging/client.py index 3a44fd4658cf..998e02d4e0c7 100644 --- a/logging/google/cloud/logging/client.py +++ b/logging/google/cloud/logging/client.py @@ -95,8 +95,8 @@ def logging_api(self): """Helper for logging-related API calls. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs """ if self._logging_api is None: if self._use_gax: @@ -111,7 +111,7 @@ def sinks_api(self): """Helper for log sink-related API calls. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks """ if self._sinks_api is None: if _USE_GAX: @@ -126,7 +126,7 @@ def metrics_api(self): """Helper for log metric-related API calls. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics """ if self._metrics_api is None: if _USE_GAX: @@ -177,7 +177,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/ref_v2beta1/rest/v2beta1/entries/list + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/list :type projects: list of strings :param projects: project IDs to include. If not passed, @@ -244,7 +244,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/ref_v2beta1/rest/v2beta1/projects.sinks/list + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/list :type page_size: int :param page_size: maximum number of sinks to return, If not passed, @@ -293,7 +293,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/ref_v2beta1/rest/v2beta1/projects.metrics/list + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/list :type page_size: int :param page_size: maximum number of metrics to return, If not passed, diff --git a/logging/google/cloud/logging/connection.py b/logging/google/cloud/logging/connection.py index 69e8cd7aee2d..9d442b29267b 100644 --- a/logging/google/cloud/logging/connection.py +++ b/logging/google/cloud/logging/connection.py @@ -52,8 +52,8 @@ class _LoggingAPI(object): """Helper mapping logging-related APIs. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/entries - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs :type connection: :class:`google.cloud.logging.connection.Connection` :param connection: the connection used to make API requests. @@ -66,7 +66,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/ref_v2beta1/rest/v2beta1/entries/list + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/list :type projects: list of strings :param projects: project IDs to include. If not passed, @@ -118,7 +118,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/ref_v2beta1/rest/v2beta1/entries/write + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/write :type entries: sequence of mapping :param entries: the log entry resources to log. @@ -153,7 +153,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/ref_v2beta1/rest/v2beta1/projects.logs/delete + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs/delete :type project: str :param project: ID of project containing the log entries to delete @@ -169,7 +169,7 @@ class _SinksAPI(object): """Helper mapping sink-related APIs. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks :type connection: :class:`google.cloud.logging.connection.Connection` :param connection: the connection used to make API requests. @@ -181,7 +181,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/ref_v2beta1/rest/v2beta1/projects.sinks/list + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/list :type project: str :param project: ID of the project whose sinks are to be listed. @@ -218,7 +218,7 @@ def sink_create(self, project, sink_name, filter_, destination): """API call: create a sink resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/create + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create :type project: str :param project: ID of the project in which to create the sink. @@ -246,7 +246,7 @@ def sink_get(self, project, sink_name): """API call: retrieve a sink resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/get + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/get :type project: str :param project: ID of the project containing the sink. @@ -264,7 +264,7 @@ def sink_update(self, project, sink_name, filter_, destination): """API call: update a sink resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/update + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/update :type project: str :param project: ID of the project containing the sink. @@ -292,7 +292,7 @@ def sink_delete(self, project, sink_name): """API call: delete a sink resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/delete + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/delete :type project: str :param project: ID of the project containing the sink. @@ -308,7 +308,7 @@ class _MetricsAPI(object): """Helper mapping sink-related APIs. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics :type connection: :class:`google.cloud.logging.connection.Connection` :param connection: the connection used to make API requests. @@ -320,7 +320,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/ref_v2beta1/rest/v2beta1/projects.metrics/list + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/list :type project: str :param project: ID of the project whose metrics are to be listed. @@ -357,7 +357,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/ref_v2beta1/rest/v2beta1/projects.metrics/create + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/create :type project: str :param project: ID of the project in which to create the metric. @@ -384,7 +384,7 @@ def metric_get(self, project, metric_name): """API call: retrieve a metric resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/get + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/get :type project: str :param project: ID of the project containing the metric. @@ -402,7 +402,7 @@ def metric_update(self, project, metric_name, filter_, description): """API call: update a metric resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/update + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/update :type project: str :param project: ID of the project containing the metric. @@ -429,7 +429,7 @@ def metric_delete(self, project, metric_name): """API call: delete a metric resource. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics/delete + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/delete :type project: str :param project: ID of the project containing the metric. diff --git a/logging/google/cloud/logging/entries.py b/logging/google/cloud/logging/entries.py index 0de34e68ed25..417d42cefdca 100644 --- a/logging/google/cloud/logging/entries.py +++ b/logging/google/cloud/logging/entries.py @@ -125,7 +125,7 @@ class TextEntry(_BaseEntry): """Entry created with ``textPayload``. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry + https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/LogEntry """ _PAYLOAD_KEY = 'textPayload' @@ -134,7 +134,7 @@ class StructEntry(_BaseEntry): """Entry created with ``jsonPayload``. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry + https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/LogEntry """ _PAYLOAD_KEY = 'jsonPayload' @@ -143,7 +143,7 @@ class ProtobufEntry(_BaseEntry): """Entry created with ``protoPayload``. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/LogEntry + https://cloud.google.com/logging/docs/api/reference/rest/Shared.Types/LogEntry """ _PAYLOAD_KEY = 'protoPayload' diff --git a/logging/google/cloud/logging/logger.py b/logging/google/cloud/logging/logger.py index d078dda29726..9ef9a2d3e887 100644 --- a/logging/google/cloud/logging/logger.py +++ b/logging/google/cloud/logging/logger.py @@ -23,7 +23,7 @@ class Logger(object): """Loggers represent named targets for log entries. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.logs + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs :type name: str :param name: the name of the logger @@ -162,7 +162,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/ref_v2beta1/rest/v2beta1/entries/write + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/write :type text: text :param text: the log message. @@ -196,7 +196,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/ref_v2beta1/rest/v2beta1/entries/write + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/write :type info: dict :param info: the log entry information @@ -230,7 +230,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/ref_v2beta1/rest/v2beta1/entries/write + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/write :type message: Protobuf message :param message: the message to be logged @@ -263,7 +263,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/ref_v2beta1/rest/v2beta1/projects.logs/delete + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.logs/delete :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -278,7 +278,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/ref_v2beta1/rest/v2beta1/entries/list + https://cloud.google.com/logging/docs/api/reference/rest/v2/entries/list :type projects: list of strings :param projects: project IDs to include. If not passed, diff --git a/logging/google/cloud/logging/metric.py b/logging/google/cloud/logging/metric.py index 162eed548720..e0912583c8a9 100644 --- a/logging/google/cloud/logging/metric.py +++ b/logging/google/cloud/logging/metric.py @@ -21,7 +21,7 @@ class Metric(object): """Metrics represent named filters for log entries. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.metrics + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics :type name: str :param name: the name of the metric @@ -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/ref_v2beta1/rest/v2beta1/projects.metrics/create + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/create :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -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/ref_v2beta1/rest/v2beta1/projects.metrics/get + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/get :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -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/ref_v2beta1/rest/v2beta1/projects.metrics/get + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/get :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -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/ref_v2beta1/rest/v2beta1/projects.metrics/update + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/update :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -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/ref_v2beta1/rest/v2beta1/projects.metrics/delete + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.metrics/delete :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` diff --git a/logging/google/cloud/logging/sink.py b/logging/google/cloud/logging/sink.py index 52c9efaece61..aeadde05ed9a 100644 --- a/logging/google/cloud/logging/sink.py +++ b/logging/google/cloud/logging/sink.py @@ -21,7 +21,7 @@ class Sink(object): """Sinks represent filtered exports for log entries. See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks :type name: str :param name: the name of the sink @@ -107,7 +107,7 @@ def create(self, client=None): """API call: create the sink via a PUT request See: - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/create + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/create :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -122,7 +122,7 @@ def exists(self, client=None): """API call: test for the existence of the sink via a GET request See - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/get + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/get :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -145,7 +145,7 @@ def reload(self, client=None): """API call: sync local sink configuration via a GET request See - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/get + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/get :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -161,7 +161,7 @@ def update(self, client=None): """API call: update sink configuration via a PUT request See - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/update + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/update :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType`` @@ -176,7 +176,7 @@ def delete(self, client=None): """API call: delete a sink via a DELETE request See - https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/projects.sinks/delete + https://cloud.google.com/logging/docs/api/reference/rest/v2/projects.sinks/delete :type client: :class:`~google.cloud.logging.client.Client` or ``NoneType``