Class: Google::Apis::LoggingV1beta3::LoggingService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::LoggingV1beta3::LoggingService
- 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.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#delete_project_sink(projects_id, sinks_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::Empty
Deletes a project sink.
-
#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.
-
#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.
-
#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.
-
#get_project_sink(projects_id, sinks_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::LoggingV1beta3::LogSink
Gets a project sink.
-
#initialize ⇒ LoggingService
constructor
A new instance of LoggingService.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ LoggingService
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
#key ⇒ String
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.
39 40 41 |
# File 'generated/google/apis/logging_v1beta3/service.rb', line 39 def key @key end |
#quota_user ⇒ String
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.
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.
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', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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}', ) 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.
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', ) 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 |