Class: Google::Apis::LoggingV1beta3::LoggingService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/logging_v1beta3/service.rb

Overview

Google Cloud Logging API

The Google Cloud Logging API lets you write log entries and manage your logs, log sinks and logs-based metrics.

Examples:

require 'google/apis/logging_v1beta3'

Logging = Google::Apis::LoggingV1beta3 # Alias the module
service = Logging::LoggingService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeLoggingService

Returns a new instance of LoggingService



46
47
48
# File 'generated/google/apis/logging_v1beta3/service.rb', line 46

def initialize
  super('https://logging.googleapis.com/', '')
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



39
40
41
# File 'generated/google/apis/logging_v1beta3/service.rb', line 39

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



44
45
46
# File 'generated/google/apis/logging_v1beta3/service.rb', line 44

def quota_user
  @quota_user
end

Instance Method Details

#create_log_service_sink(projects_id, log_services_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Creates a log service sink. All log entries from a specified log service are written to the destination.

Parameters:

  • projects_id (String)

    Part of serviceName. The resource name of the log service to which the sink is bound.

  • log_services_id (String)

    Part of serviceName. See documentation of projectsId.

  • log_sink_object (Google::Apis::LoggingV1beta3::LogSink) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



559
560
561
562
563
564
565
566
567
568
569
570
# File 'generated/google/apis/logging_v1beta3/service.rb', line 559

def create_log_service_sink(projects_id, log_services_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks', options)
  command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.request_object = log_sink_object
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logServicesId'] = log_services_id unless log_services_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_log_sink(projects_id, logs_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Creates a log sink. All log entries for a specified log are written to the destination.

Parameters:

  • projects_id (String)

    Part of logName. The resource name of the log to which to the sink is bound.

  • logs_id (String)

    Part of logName. See documentation of projectsId.

  • log_sink_object (Google::Apis::LoggingV1beta3::LogSink) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



272
273
274
275
276
277
278
279
280
281
282
283
# File 'generated/google/apis/logging_v1beta3/service.rb', line 272

def create_log_sink(projects_id, logs_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks', options)
  command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.request_object = log_sink_object
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logsId'] = logs_id unless logs_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_metric(projects_id, log_metric_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogMetric

Creates a logs-based metric.

Parameters:

  • projects_id (String)

    Part of projectName. The resource name of the project in which to create the metric.

  • log_metric_object (Google::Apis::LoggingV1beta3::LogMetric) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



911
912
913
914
915
916
917
918
919
920
921
# File 'generated/google/apis/logging_v1beta3/service.rb', line 911

def create_project_metric(projects_id, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1beta3/projects/{projectsId}/metrics', options)
  command.request_representation = Google::Apis::LoggingV1beta3::LogMetric::Representation
  command.request_object = log_metric_object
  command.response_representation = Google::Apis::LoggingV1beta3::LogMetric::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogMetric
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_sink(projects_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Creates a project sink. A logs filter determines which log entries are written to the destination.

Parameters:

  • projects_id (String)

    Part of projectName. The resource name of the project to which the sink is bound.

  • log_sink_object (Google::Apis::LoggingV1beta3::LogSink) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



734
735
736
737
738
739
740
741
742
743
744
# File 'generated/google/apis/logging_v1beta3/service.rb', line 734

def create_project_sink(projects_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1beta3/projects/{projectsId}/sinks', options)
  command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.request_object = log_sink_object
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_log(projects_id, logs_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::Empty

Deletes a log and all its log entries. The log will reappear if it receives new entries.

Parameters:

  • projects_id (String)

    Part of logName. The resource name of the log to be deleted.

  • logs_id (String)

    Part of logName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



126
127
128
129
130
131
132
133
134
135
# File 'generated/google/apis/logging_v1beta3/service.rb', line 126

def delete_log(projects_id, logs_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1beta3/projects/{projectsId}/logs/{logsId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation
  command.response_class = Google::Apis::LoggingV1beta3::Empty
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logsId'] = logs_id unless logs_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_log_service_sink(projects_id, log_services_id, sinks_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::Empty

Deletes a log service sink. After deletion, no new log entries are written to the destination.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the log service sink to delete.

  • log_services_id (String)

    Part of sinkName. See documentation of projectsId.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



636
637
638
639
640
641
642
643
644
645
646
# File 'generated/google/apis/logging_v1beta3/service.rb', line 636

def delete_log_service_sink(projects_id, log_services_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation
  command.response_class = Google::Apis::LoggingV1beta3::Empty
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logServicesId'] = log_services_id unless log_services_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_log_sink(projects_id, logs_id, sinks_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::Empty

Deletes a log sink. After deletion, no new log entries are written to the destination.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the log sink to delete.

  • logs_id (String)

    Part of sinkName. See documentation of projectsId.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



349
350
351
352
353
354
355
356
357
358
359
# File 'generated/google/apis/logging_v1beta3/service.rb', line 349

def delete_log_sink(projects_id, logs_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation
  command.response_class = Google::Apis::LoggingV1beta3::Empty
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logsId'] = logs_id unless logs_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_metric(projects_id, metrics_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::Empty

Deletes a logs-based metric.

Parameters:

  • projects_id (String)

    Part of metricName. The resource name of the metric to delete.

  • metrics_id (String)

    Part of metricName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



981
982
983
984
985
986
987
988
989
990
# File 'generated/google/apis/logging_v1beta3/service.rb', line 981

def delete_project_metric(projects_id, metrics_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1beta3/projects/{projectsId}/metrics/{metricsId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation
  command.response_class = Google::Apis::LoggingV1beta3::Empty
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['metricsId'] = metrics_id unless metrics_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_sink(projects_id, sinks_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::Empty

Deletes a project sink. After deletion, no new log entries are written to the destination.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the project sink to delete.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



806
807
808
809
810
811
812
813
814
815
# File 'generated/google/apis/logging_v1beta3/service.rb', line 806

def delete_project_sink(projects_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1beta3/projects/{projectsId}/sinks/{sinksId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::Empty::Representation
  command.response_class = Google::Apis::LoggingV1beta3::Empty
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_log_service_sink(projects_id, log_services_id, sinks_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Gets a log service sink.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the log service sink to return.

  • log_services_id (String)

    Part of sinkName. See documentation of projectsId.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



522
523
524
525
526
527
528
529
530
531
532
# File 'generated/google/apis/logging_v1beta3/service.rb', line 522

def get_log_service_sink(projects_id, log_services_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logServicesId'] = log_services_id unless log_services_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_log_sink(projects_id, logs_id, sinks_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Gets a log sink.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the log sink to return.

  • logs_id (String)

    Part of sinkName. See documentation of projectsId.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



236
237
238
239
240
241
242
243
244
245
246
# File 'generated/google/apis/logging_v1beta3/service.rb', line 236

def get_log_sink(projects_id, logs_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logsId'] = logs_id unless logs_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_metric(projects_id, metrics_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogMetric

Gets a logs-based metric.

Parameters:

  • projects_id (String)

    Part of metricName. The resource name of the desired metric.

  • metrics_id (String)

    Part of metricName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



878
879
880
881
882
883
884
885
886
887
# File 'generated/google/apis/logging_v1beta3/service.rb', line 878

def get_project_metric(projects_id, metrics_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/metrics/{metricsId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::LogMetric::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogMetric
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['metricsId'] = metrics_id unless metrics_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_sink(projects_id, sinks_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Gets a project sink.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the project sink to return.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



700
701
702
703
704
705
706
707
708
709
# File 'generated/google/apis/logging_v1beta3/service.rb', line 700

def get_project_sink(projects_id, sinks_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/sinks/{sinksId}', options)
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_log_service_indexes(projects_id, log_services_id, index_prefix: nil, depth: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse

Lists the current index values for a log service.

Parameters:

  • projects_id (String)

    Part of serviceName. The resource name of a log service whose service indexes are requested. Example: "projects/my-project-id/logServices/appengine. googleapis.com".

  • log_services_id (String)

    Part of serviceName. See documentation of projectsId.

  • index_prefix (String)

    Restricts the index values returned to be those with a specified prefix for each index key. This field has the form "/prefix1/prefix2/...", in order corresponding to the LogService indexKeys. Non-empty prefixes must begin with /. For example, App Engine's two keys are the module ID and the version ID. Following is the effect of using various values for indexPrefix: + "/ Mod/" retrieves /Mod/10 and /Mod/11 but not /ModA/10. + "/Mod retrieves /Mod/10, /Mod/11 and /ModA/10 but not /XXX/33. + "/Mod/1" retrieves /Mod/10 and /Mod/11 but not /ModA/10. + "/Mod/10/" retrieves /Mod/10 only. + An empty prefix or "/" retrieves all values.

  • depth (Fixnum)

    A non-negative integer that limits the number of levels of the index hierarchy that are returned. If depth is 1 (default), only the first index key value is returned. If depth is 2, both primary and secondary key values are returned. If depth is 0, the depth is the number of slash-separators in the indexPrefix field, not counting a slash appearing as the last character of the prefix. If the indexPrefix field is empty, the default depth is 1. It is an error for depth to be any positive value less than the number of components in indexPrefix.

  • page_size (Fixnum)

    The maximum number of log service index resources to return in one operation.

  • page_token (String)

    An opaque token, returned as nextPageToken by a prior ListLogServiceIndexes operation. If pageToken is supplied, then the other fields of this request are ignored, and instead the previous ListLogServiceIndexes operation is continued.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



450
451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'generated/google/apis/logging_v1beta3/service.rb', line 450

def list_log_service_indexes(projects_id, log_services_id, index_prefix: nil, depth: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/indexes', options)
  command.response_representation = Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse::Representation
  command.response_class = Google::Apis::LoggingV1beta3::ListLogServiceIndexesResponse
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logServicesId'] = log_services_id unless log_services_id.nil?
  command.query['indexPrefix'] = index_prefix unless index_prefix.nil?
  command.query['depth'] = depth unless depth.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_log_service_sinks(projects_id, log_services_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse

Lists log service sinks associated with a log service.

Parameters:

  • projects_id (String)

    Part of serviceName. The log service whose sinks are wanted.

  • log_services_id (String)

    Part of serviceName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



487
488
489
490
491
492
493
494
495
496
# File 'generated/google/apis/logging_v1beta3/service.rb', line 487

def list_log_service_sinks(projects_id, log_services_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks', options)
  command.response_representation = Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse::Representation
  command.response_class = Google::Apis::LoggingV1beta3::ListLogServiceSinksResponse
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logServicesId'] = log_services_id unless log_services_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_log_services(projects_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::ListLogServicesResponse

Lists the log services that have log entries in this project.

Parameters:

  • projects_id (String)

    Part of projectName. The resource name of the project whose services are to be listed.

  • page_size (Fixnum)

    The maximum number of LogService objects to return in one operation.

  • page_token (String)

    An opaque token, returned as nextPageToken by a prior ListLogServices operation. If pageToken is supplied, then the other fields of this request are ignored, and instead the previous ListLogServices operation is continued.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



388
389
390
391
392
393
394
395
396
397
398
# File 'generated/google/apis/logging_v1beta3/service.rb', line 388

def list_log_services(projects_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/logServices', options)
  command.response_representation = Google::Apis::LoggingV1beta3::ListLogServicesResponse::Representation
  command.response_class = Google::Apis::LoggingV1beta3::ListLogServicesResponse
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_log_sinks(projects_id, logs_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::ListLogSinksResponse

Lists log sinks associated with a log.

Parameters:

  • projects_id (String)

    Part of logName. The log whose sinks are wanted. For example, "compute. google.com/syslog".

  • logs_id (String)

    Part of logName. See documentation of projectsId.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



201
202
203
204
205
206
207
208
209
210
# File 'generated/google/apis/logging_v1beta3/service.rb', line 201

def list_log_sinks(projects_id, logs_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks', options)
  command.response_representation = Google::Apis::LoggingV1beta3::ListLogSinksResponse::Representation
  command.response_class = Google::Apis::LoggingV1beta3::ListLogSinksResponse
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logsId'] = logs_id unless logs_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_logs(projects_id, service_name: nil, service_index_prefix: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::ListLogsResponse

Lists the logs in the project. Only logs that have entries are listed.

Parameters:

  • projects_id (String)

    Part of projectName. The resource name of the project whose logs are requested. If both serviceName and serviceIndexPrefix are empty, then all logs with entries in this project are listed.

  • service_name (String)

    If not empty, this field must be a log service name such as "compute. googleapis.com". Only logs associated with that that log service are listed.

  • service_index_prefix (String)

    The purpose of this field is to restrict the listed logs to those with entries of a certain kind. If serviceName is the name of a log service, then this field may contain values for the log service's indexes. Only logs that have entries whose indexes include the values are listed. The format for this field is "/val1/val2.../valN", where val1 is a value for the first index, val2 for the second index, etc. An empty value (a single slash) for an index matches all values, and you can omit values for later indexes entirely.

  • page_size (Fixnum)

    The maximum number of results to return.

  • page_token (String)

    An opaque token, returned as nextPageToken by a prior ListLogs operation. If pageToken is supplied, then the other fields of this request are ignored, and instead the previous ListLogs operation is continued.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'generated/google/apis/logging_v1beta3/service.rb', line 89

def list_logs(projects_id, service_name: nil, service_index_prefix: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/logs', options)
  command.response_representation = Google::Apis::LoggingV1beta3::ListLogsResponse::Representation
  command.response_class = Google::Apis::LoggingV1beta3::ListLogsResponse
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.query['serviceName'] = service_name unless service_name.nil?
  command.query['serviceIndexPrefix'] = service_index_prefix unless service_index_prefix.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_metrics(projects_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::ListLogMetricsResponse

Lists the logs-based metrics associated with a project.

Parameters:

  • projects_id (String)

    Part of projectName. The resource name for the project whose metrics are wanted.

  • page_token (String)

    An opaque token, returned as nextPageToken by a prior ListLogMetrics operation. If pageToken is supplied, then the other fields of this request are ignored, and instead the previous ListLogMetrics operation is continued.

  • page_size (Fixnum)

    The maximum number of LogMetric objects to return in one operation.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



844
845
846
847
848
849
850
851
852
853
854
# File 'generated/google/apis/logging_v1beta3/service.rb', line 844

def list_project_metrics(projects_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/metrics', options)
  command.response_representation = Google::Apis::LoggingV1beta3::ListLogMetricsResponse::Representation
  command.response_class = Google::Apis::LoggingV1beta3::ListLogMetricsResponse
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_sinks(projects_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::ListSinksResponse

Lists project sinks associated with a project.

Parameters:

  • projects_id (String)

    Part of projectName. The project whose sinks are wanted.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



668
669
670
671
672
673
674
675
676
# File 'generated/google/apis/logging_v1beta3/service.rb', line 668

def list_project_sinks(projects_id, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1beta3/projects/{projectsId}/sinks', options)
  command.response_representation = Google::Apis::LoggingV1beta3::ListSinksResponse::Representation
  command.response_class = Google::Apis::LoggingV1beta3::ListSinksResponse
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_log_service_sink(projects_id, log_services_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Updates a log service sink. If the sink does not exist, it is created.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the log service sink to update.

  • log_services_id (String)

    Part of sinkName. See documentation of projectsId.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • log_sink_object (Google::Apis::LoggingV1beta3::LogSink) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



597
598
599
600
601
602
603
604
605
606
607
608
609
# File 'generated/google/apis/logging_v1beta3/service.rb', line 597

def update_log_service_sink(projects_id, log_services_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:put, 'v1beta3/projects/{projectsId}/logServices/{logServicesId}/sinks/{sinksId}', options)
  command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.request_object = log_sink_object
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logServicesId'] = log_services_id unless log_services_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_log_sink(projects_id, logs_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Updates a log sink. If the sink does not exist, it is created.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the sink to update.

  • logs_id (String)

    Part of sinkName. See documentation of projectsId.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • log_sink_object (Google::Apis::LoggingV1beta3::LogSink) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'generated/google/apis/logging_v1beta3/service.rb', line 310

def update_log_sink(projects_id, logs_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:put, 'v1beta3/projects/{projectsId}/logs/{logsId}/sinks/{sinksId}', options)
  command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.request_object = log_sink_object
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logsId'] = logs_id unless logs_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_project_metric(projects_id, metrics_id, log_metric_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogMetric

Creates or updates a logs-based metric.

Parameters:

  • projects_id (String)

    Part of metricName. The resource name of the metric to update.

  • metrics_id (String)

    Part of metricName. See documentation of projectsId.

  • log_metric_object (Google::Apis::LoggingV1beta3::LogMetric) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



946
947
948
949
950
951
952
953
954
955
956
957
# File 'generated/google/apis/logging_v1beta3/service.rb', line 946

def update_project_metric(projects_id, metrics_id, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:put, 'v1beta3/projects/{projectsId}/metrics/{metricsId}', options)
  command.request_representation = Google::Apis::LoggingV1beta3::LogMetric::Representation
  command.request_object = log_metric_object
  command.response_representation = Google::Apis::LoggingV1beta3::LogMetric::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogMetric
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['metricsId'] = metrics_id unless metrics_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_project_sink(projects_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink

Updates a project sink. If the sink does not exist, it is created. The destination, filter, or both may be updated.

Parameters:

  • projects_id (String)

    Part of sinkName. The resource name of the project sink to update.

  • sinks_id (String)

    Part of sinkName. See documentation of projectsId.

  • log_sink_object (Google::Apis::LoggingV1beta3::LogSink) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



770
771
772
773
774
775
776
777
778
779
780
781
# File 'generated/google/apis/logging_v1beta3/service.rb', line 770

def update_project_sink(projects_id, sinks_id, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:put, 'v1beta3/projects/{projectsId}/sinks/{sinksId}', options)
  command.request_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.request_object = log_sink_object
  command.response_representation = Google::Apis::LoggingV1beta3::LogSink::Representation
  command.response_class = Google::Apis::LoggingV1beta3::LogSink
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['sinksId'] = sinks_id unless sinks_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#write_log_entries(projects_id, logs_id, write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::WriteLogEntriesResponse

Writes log entries to Cloud Logging. Each entry consists of a LogEntry object. You must fill in all the fields of the object, including one of the payload fields. You may supply a map, commonLabels, that holds default (key, value) data for the entries[].metadata.labels map in each entry, saving you the trouble of creating identical copies for each entry.

Parameters:

  • projects_id (String)

    Part of logName. The resource name of the log that will receive the log entries.

  • logs_id (String)

    Part of logName. See documentation of projectsId.

  • write_log_entries_request_object (Google::Apis::LoggingV1beta3::WriteLogEntriesRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



165
166
167
168
169
170
171
172
173
174
175
176
# File 'generated/google/apis/logging_v1beta3/service.rb', line 165

def write_log_entries(projects_id, logs_id, write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1beta3/projects/{projectsId}/logs/{logsId}/entries:write', options)
  command.request_representation = Google::Apis::LoggingV1beta3::WriteLogEntriesRequest::Representation
  command.request_object = write_log_entries_request_object
  command.response_representation = Google::Apis::LoggingV1beta3::WriteLogEntriesResponse::Representation
  command.response_class = Google::Apis::LoggingV1beta3::WriteLogEntriesResponse
  command.params['projectsId'] = projects_id unless projects_id.nil?
  command.params['logsId'] = logs_id unless logs_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end