generated/google-apis-clouderrorreporting_v1beta1/lib/google/apis/clouderrorreporting_v1beta1/service.rb
# Report an individual error event and record the event to a log. This endpoint
# accepts **either** an OAuth token, **or** an [API key](https://support.google.
# com/cloud/answer/6158862) for authentication. To use an API key, append it to
# the URL as the value of a `key` parameter. For example: `POST https://
# clouderrorreporting.googleapis.com/v1beta1/`projectName`/events:report?key=
# 123ABC456` **Note:** [Error Reporting] (https://cloud.google.com/error-
# reporting) is a global service built on Cloud Logging and doesn't analyze logs
# stored in regional log buckets or logs routed to other Google Cloud projects.
# For more information, see [Using Error Reporting with regionalized logs] (
# https://cloud.google.com/error-reporting/docs/regionalization).
# @param [String] project_name
#   Required. The resource name of the Google Cloud Platform project. Written as `
#   projects/`projectId``, where ``projectId`` is the [Google Cloud Platform
#   project ID](https://support.google.com/cloud/answer/6158840). Example: // `
#   projects/my-project-123`.
# @param [Google::Apis::ClouderrorreportingV1beta1::ReportedErrorEvent] reported_error_event_object
# @param [String] fields
#   Selector specifying which fields to include in a partial response.
# @param [String] quota_user
#   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.
# @param [Google::Apis::RequestOptions] options
#   Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
Report an individual error event and record the event to a log.
Report an individual error event and record the event to a log .
def report_project_event(project_name, reported_error_event_object = nil, fields: nil, quota_user: nil, options: nil, &block)
          command = make_simple_command(:post, 'v1beta1/{+projectName}/events:report', options)
          command.request_representation = Google::Apis::ClouderrorreportingV1beta1::ReportedErrorEvent::Representation
          command.request_object = reported_error_event_object
          command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse::Representation
          command.response_class = Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse
          command.params['projectName'] = project_name unless project_name.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          execute_or_queue_command(command, &block)
        end
def report_project_event ( project_name , reported_error_event_object = nil , fields : nil , quota_user : nil , options : nil , & block ) command = make_simple_command ( :post , 'v1beta1/{+projectName}/events:report' , options ) command . request_representation = Google :: Apis :: ClouderrorreportingV1beta1 :: ReportedErrorEvent :: Representation command . request_object = reported_error_event_object command . response_representation = Google :: Apis :: ClouderrorreportingV1beta1 :: ReportErrorEventResponse :: Representation command . response_class = Google :: Apis :: ClouderrorreportingV1beta1 :: ReportErrorEventResponse command . params [ 'projectName' ] = project_name unless project_name . nil? command . query [ 'fields' ] = fields unless fields . nil? command . query [ 'quotaUser' ] = quota_user unless quota_user . nil? execute_or_queue_command ( command , & block ) end
Report an individual error event and record the event to a log.
Report an individual error event and record the event to a log .
None
Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse
[Google::Apis::ServerError] An error occurred on the server and the request can be retried
[ Google :: Apis :: ServerError ] An error occurred on the server and the request can be retried
[Google::Apis::ClientError] The request is invalid and should not be retried without modification
[ Google :: Apis :: ClientError ] The request is invalid and should not be retried without modification
[Google::Apis::AuthorizationError] Authorization is required
[ Google :: Apis :: AuthorizationError ] Authorization is required
project_name
reported_error_event_object
fields
quota_user
options
block
options Request-specific options
options Request - specific options
]
Result & error if block supplied
Result & error if block supplied
result
parsed result object
parsed result object
err
error object if request failed
error object if request failed