Google Cloud Logging API . projects . logs . sinks

Instance Methods

create(projectsId, logsId, body, x__xgafv=None)

Creates the specified log sink resource.

delete(projectsId, logsId, sinksId, x__xgafv=None)

Deletes the specified log sink resource.

get(projectsId, logsId, sinksId, x__xgafv=None)

Gets the specified log sink resource.

list(projectsId, logsId, x__xgafv=None)

Lists log sinks associated with the specified log.

update(projectsId, logsId, sinksId, body, x__xgafv=None)

Creates or updates the specified log sink resource.

Method Details

create(projectsId, logsId, body, x__xgafv=None)
Creates the specified log sink resource.

Args:
  projectsId: string, Part of `logName`. The log in which to create a sink resource. (required)
  logsId: string, Part of `logName`. See documentation of `projectsId`. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # An object that describes where a log may be written.
    "errors": [ # _Output only._ All active errors found for this sink.
      { # A problem in a sink or the sink's configuration.
        "status": { # Represents the RPC error status for Google APIs. See http://go/errormodel for details. # The description of the last error observed.
          "message": "A String", # A developer-facing error message, which should be in English. The user-facing error message should be localized and stored in the [google.rpc.Status.details][google.rpc.Status.details] field.
          "code": 42, # The status code, which should be an enum value of [google.rpc.Code][].
          "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
            {
              "a_key": "", # Properties of the object. Contains field @ype with type URL.
            },
          ],
        },
        "timeNanos": "A String", # The last time the error was observed, in nanoseconds since the Unix epoch.
        "resource": "A String", # The resource associated with the error. It may be different from the sink destination. For example, the sink may point to a BigQuery dataset, but the error may refer to a table resource inside the dataset.
      },
    ],
    "destination": "A String", # The resource to send log entries to. The supported sink resource types are: + Google Cloud Storage: `storage.googleapis.com/BUCKET` or `BUCKET.storage.googleapis.com/` + Google BigQuery: `bigquery.googleapis.com/projects/PROJECT/datasets/DATASET` Currently the Cloud Logging API supports at most one sink for each resource type per log or log service resource.
    "name": "A String", # The name of this sink. This is a client-assigned identifier for the resource. This is ignored by UpdateLogSink and UpdateLogServicesSink.
  }

  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # An object that describes where a log may be written.
      "errors": [ # _Output only._ All active errors found for this sink.
        { # A problem in a sink or the sink's configuration.
          "status": { # Represents the RPC error status for Google APIs. See http://go/errormodel for details. # The description of the last error observed.
            "message": "A String", # A developer-facing error message, which should be in English. The user-facing error message should be localized and stored in the [google.rpc.Status.details][google.rpc.Status.details] field.
            "code": 42, # The status code, which should be an enum value of [google.rpc.Code][].
            "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
              {
                "a_key": "", # Properties of the object. Contains field @ype with type URL.
              },
            ],
          },
          "timeNanos": "A String", # The last time the error was observed, in nanoseconds since the Unix epoch.
          "resource": "A String", # The resource associated with the error. It may be different from the sink destination. For example, the sink may point to a BigQuery dataset, but the error may refer to a table resource inside the dataset.
        },
      ],
      "destination": "A String", # The resource to send log entries to. The supported sink resource types are: + Google Cloud Storage: `storage.googleapis.com/BUCKET` or `BUCKET.storage.googleapis.com/` + Google BigQuery: `bigquery.googleapis.com/projects/PROJECT/datasets/DATASET` Currently the Cloud Logging API supports at most one sink for each resource type per log or log service resource.
      "name": "A String", # The name of this sink. This is a client-assigned identifier for the resource. This is ignored by UpdateLogSink and UpdateLogServicesSink.
    }
delete(projectsId, logsId, sinksId, x__xgafv=None)
Deletes the specified log sink resource.

Args:
  projectsId: string, Part of `sinkName`. The name of the sink to delete. (required)
  logsId: string, Part of `sinkName`. See documentation of `projectsId`. (required)
  sinksId: string, Part of `sinkName`. See documentation of `projectsId`. (required)
  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  }
get(projectsId, logsId, sinksId, x__xgafv=None)
Gets the specified log sink resource.

Args:
  projectsId: string, Part of `sinkName`. The name of the sink resource to return. (required)
  logsId: string, Part of `sinkName`. See documentation of `projectsId`. (required)
  sinksId: string, Part of `sinkName`. See documentation of `projectsId`. (required)
  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # An object that describes where a log may be written.
      "errors": [ # _Output only._ All active errors found for this sink.
        { # A problem in a sink or the sink's configuration.
          "status": { # Represents the RPC error status for Google APIs. See http://go/errormodel for details. # The description of the last error observed.
            "message": "A String", # A developer-facing error message, which should be in English. The user-facing error message should be localized and stored in the [google.rpc.Status.details][google.rpc.Status.details] field.
            "code": 42, # The status code, which should be an enum value of [google.rpc.Code][].
            "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
              {
                "a_key": "", # Properties of the object. Contains field @ype with type URL.
              },
            ],
          },
          "timeNanos": "A String", # The last time the error was observed, in nanoseconds since the Unix epoch.
          "resource": "A String", # The resource associated with the error. It may be different from the sink destination. For example, the sink may point to a BigQuery dataset, but the error may refer to a table resource inside the dataset.
        },
      ],
      "destination": "A String", # The resource to send log entries to. The supported sink resource types are: + Google Cloud Storage: `storage.googleapis.com/BUCKET` or `BUCKET.storage.googleapis.com/` + Google BigQuery: `bigquery.googleapis.com/projects/PROJECT/datasets/DATASET` Currently the Cloud Logging API supports at most one sink for each resource type per log or log service resource.
      "name": "A String", # The name of this sink. This is a client-assigned identifier for the resource. This is ignored by UpdateLogSink and UpdateLogServicesSink.
    }
list(projectsId, logsId, x__xgafv=None)
Lists log sinks associated with the specified log.

Args:
  projectsId: string, Part of `logName`. The log for which to list sinks. (required)
  logsId: string, Part of `logName`. See documentation of `projectsId`. (required)
  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # Result returned from `ListLogSinks`.
    "sinks": [ # The requested log sinks. If any of the returned `LogSink` objects have an empty `destination` field, then call `logServices.sinks.get` to retrieve the complete `LogSink` object.
      { # An object that describes where a log may be written.
          "errors": [ # _Output only._ All active errors found for this sink.
            { # A problem in a sink or the sink's configuration.
              "status": { # Represents the RPC error status for Google APIs. See http://go/errormodel for details. # The description of the last error observed.
                "message": "A String", # A developer-facing error message, which should be in English. The user-facing error message should be localized and stored in the [google.rpc.Status.details][google.rpc.Status.details] field.
                "code": 42, # The status code, which should be an enum value of [google.rpc.Code][].
                "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
                  {
                    "a_key": "", # Properties of the object. Contains field @ype with type URL.
                  },
                ],
              },
              "timeNanos": "A String", # The last time the error was observed, in nanoseconds since the Unix epoch.
              "resource": "A String", # The resource associated with the error. It may be different from the sink destination. For example, the sink may point to a BigQuery dataset, but the error may refer to a table resource inside the dataset.
            },
          ],
          "destination": "A String", # The resource to send log entries to. The supported sink resource types are: + Google Cloud Storage: `storage.googleapis.com/BUCKET` or `BUCKET.storage.googleapis.com/` + Google BigQuery: `bigquery.googleapis.com/projects/PROJECT/datasets/DATASET` Currently the Cloud Logging API supports at most one sink for each resource type per log or log service resource.
          "name": "A String", # The name of this sink. This is a client-assigned identifier for the resource. This is ignored by UpdateLogSink and UpdateLogServicesSink.
        },
    ],
  }
update(projectsId, logsId, sinksId, body, x__xgafv=None)
Creates or updates the specified log sink resource.

Args:
  projectsId: string, Part of `sinkName`. The name of the sink to update. (required)
  logsId: string, Part of `sinkName`. See documentation of `projectsId`. (required)
  sinksId: string, Part of `sinkName`. See documentation of `projectsId`. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # An object that describes where a log may be written.
    "errors": [ # _Output only._ All active errors found for this sink.
      { # A problem in a sink or the sink's configuration.
        "status": { # Represents the RPC error status for Google APIs. See http://go/errormodel for details. # The description of the last error observed.
          "message": "A String", # A developer-facing error message, which should be in English. The user-facing error message should be localized and stored in the [google.rpc.Status.details][google.rpc.Status.details] field.
          "code": 42, # The status code, which should be an enum value of [google.rpc.Code][].
          "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
            {
              "a_key": "", # Properties of the object. Contains field @ype with type URL.
            },
          ],
        },
        "timeNanos": "A String", # The last time the error was observed, in nanoseconds since the Unix epoch.
        "resource": "A String", # The resource associated with the error. It may be different from the sink destination. For example, the sink may point to a BigQuery dataset, but the error may refer to a table resource inside the dataset.
      },
    ],
    "destination": "A String", # The resource to send log entries to. The supported sink resource types are: + Google Cloud Storage: `storage.googleapis.com/BUCKET` or `BUCKET.storage.googleapis.com/` + Google BigQuery: `bigquery.googleapis.com/projects/PROJECT/datasets/DATASET` Currently the Cloud Logging API supports at most one sink for each resource type per log or log service resource.
    "name": "A String", # The name of this sink. This is a client-assigned identifier for the resource. This is ignored by UpdateLogSink and UpdateLogServicesSink.
  }

  x__xgafv: string, V1 error format.

Returns:
  An object of the form:

    { # An object that describes where a log may be written.
      "errors": [ # _Output only._ All active errors found for this sink.
        { # A problem in a sink or the sink's configuration.
          "status": { # Represents the RPC error status for Google APIs. See http://go/errormodel for details. # The description of the last error observed.
            "message": "A String", # A developer-facing error message, which should be in English. The user-facing error message should be localized and stored in the [google.rpc.Status.details][google.rpc.Status.details] field.
            "code": 42, # The status code, which should be an enum value of [google.rpc.Code][].
            "details": [ # A list of messages that carry the error details. There will be a common set of message types for APIs to use.
              {
                "a_key": "", # Properties of the object. Contains field @ype with type URL.
              },
            ],
          },
          "timeNanos": "A String", # The last time the error was observed, in nanoseconds since the Unix epoch.
          "resource": "A String", # The resource associated with the error. It may be different from the sink destination. For example, the sink may point to a BigQuery dataset, but the error may refer to a table resource inside the dataset.
        },
      ],
      "destination": "A String", # The resource to send log entries to. The supported sink resource types are: + Google Cloud Storage: `storage.googleapis.com/BUCKET` or `BUCKET.storage.googleapis.com/` + Google BigQuery: `bigquery.googleapis.com/projects/PROJECT/datasets/DATASET` Currently the Cloud Logging API supports at most one sink for each resource type per log or log service resource.
      "name": "A String", # The name of this sink. This is a client-assigned identifier for the resource. This is ignored by UpdateLogSink and UpdateLogServicesSink.
    }