lib/google/cloud/logging/v2/logging_service/client.rb in google-cloud-logging-v2-0.8.1 vs lib/google/cloud/logging/v2/logging_service/client.rb in google-cloud-logging-v2-0.9.0

- old
+ new

@@ -354,15 +354,17 @@ # To improve throughput and to avoid exceeding the # [quota limit](https://cloud.google.com/logging/quotas) for calls to # `entries.write`, you should try to include several log entries in this # list, rather than calling this method for each individual log entry. # @param partial_success [::Boolean] - # Optional. Whether valid entries should be written even if some other - # entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any - # entry is not written, then the response status is the error associated - # with one of the failed entries and the response includes error details - # keyed by the entries' zero-based index in the `entries.write` method. + # Optional. Whether a batch's valid entries should be written even if some + # other entry failed due to a permanent error such as INVALID_ARGUMENT or + # PERMISSION_DENIED. If any entry failed, then the response status is the + # response status of one of the failed entries. The response will include + # error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + # the entries' zero-based index in the `entries`. Failed requests for which + # no entries are written will not include per-entry errors. # @param dry_run [::Boolean] # Optional. If true, the request should expect normal response, but the # entries won't be persisted nor exported. Useful for checking whether the # logging API endpoints are working properly before sending valuable data. # @@ -458,30 +460,29 @@ # * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` # * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` # * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` # # Projects listed in the `project_ids` field are added to this list. + # A maximum of 100 resources may be specified in a single request. # @param filter [::String] - # Optional. A filter that chooses which log entries to return. See [Advanced - # Logs Queries](https://cloud.google.com/logging/docs/view/advanced-queries). - # Only log entries that match the filter are returned. An empty filter - # matches all log entries in the resources listed in `resource_names`. + # Optional. Only log entries that match the filter are returned. An empty + # filter matches all log entries in the resources listed in `resource_names`. # Referencing a parent resource that is not listed in `resource_names` will - # cause the filter to return no results. The maximum length of the filter is - # 20000 characters. + # cause the filter to return no results. The maximum length of a filter is + # 20,000 characters. # @param order_by [::String] # Optional. How the results should be sorted. Presently, the only permitted # values are `"timestamp asc"` (default) and `"timestamp desc"`. The first # option returns entries in order of increasing values of # `LogEntry.timestamp` (oldest first), and the second option returns entries # in order of decreasing timestamps (newest first). Entries with equal # timestamps are returned in order of their `insert_id` values. # @param page_size [::Integer] - # Optional. The maximum number of results to return from this request. Default is 50. - # If the value is negative or exceeds 1000, the request is rejected. The - # presence of `next_page_token` in the response indicates that more results - # might be available. + # Optional. The maximum number of results to return from this request. + # Default is 50. If the value is negative or exceeds 1000, the request is + # rejected. The presence of `next_page_token` in the response indicates that + # more results might be available. # @param page_token [::String] # Optional. If present, then retrieve the next batch of results from the # preceding call to this method. `page_token` must be the value of # `next_page_token` from the previous response. The values of other method # parameters should be identical to those in the previous call. @@ -504,17 +505,15 @@ # request = Google::Cloud::Logging::V2::ListLogEntriesRequest.new # # # Call the list_log_entries method. # result = client.list_log_entries request # - # # The returned object is of type Gapic::PagedEnumerable. You can - # # iterate over all elements by calling #each, and the enumerable - # # will lazily make API calls to fetch subsequent pages. Other - # # methods are also available for managing paging directly. - # result.each do |response| + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| # # Each element is of type ::Google::Cloud::Logging::V2::LogEntry. - # p response + # p item # end # def list_log_entries request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -595,17 +594,15 @@ # request = Google::Cloud::Logging::V2::ListMonitoredResourceDescriptorsRequest.new # # # Call the list_monitored_resource_descriptors method. # result = client.list_monitored_resource_descriptors request # - # # The returned object is of type Gapic::PagedEnumerable. You can - # # iterate over all elements by calling #each, and the enumerable - # # will lazily make API calls to fetch subsequent pages. Other - # # methods are also available for managing paging directly. - # result.each do |response| + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| # # Each element is of type ::Google::Api::MonitoredResourceDescriptor. - # p response + # p item # end # def list_monitored_resource_descriptors request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -652,33 +649,24 @@ # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_logs(parent: nil, page_size: nil, page_token: nil, resource_names: nil) + # @overload list_logs(parent: nil, resource_names: nil, page_size: nil, page_token: nil) # Pass arguments to `list_logs` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The resource name that owns the logs: + # Required. The resource name to list logs for: # # * `projects/[PROJECT_ID]` # * `organizations/[ORGANIZATION_ID]` # * `billingAccounts/[BILLING_ACCOUNT_ID]` # * `folders/[FOLDER_ID]` - # @param page_size [::Integer] - # Optional. The maximum number of results to return from this request. - # Non-positive values are ignored. The presence of `nextPageToken` in the - # response indicates that more results might be available. - # @param page_token [::String] - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. `pageToken` must be the value of - # `nextPageToken` from the previous response. The values of other method - # parameters should be identical to those in the previous call. # @param resource_names [::Array<::String>] - # Optional. The resource name that owns the logs: + # Optional. List of resource names to list logs for: # # * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` # * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` # * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` # * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` @@ -688,10 +676,21 @@ # * `projects/[PROJECT_ID]` # * `organizations/[ORGANIZATION_ID]` # * `billingAccounts/[BILLING_ACCOUNT_ID]` # * `folders/[FOLDER_ID]` # + # The resource name in the `parent` field is added to this list. + # @param page_size [::Integer] + # Optional. The maximum number of results to return from this request. + # Non-positive values are ignored. The presence of `nextPageToken` in the + # response indicates that more results might be available. + # @param page_token [::String] + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. `pageToken` must be the value of + # `nextPageToken` from the previous response. The values of other method + # parameters should be identical to those in the previous call. + # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::Logging::V2::ListLogsResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Cloud::Logging::V2::ListLogsResponse] @@ -775,26 +774,26 @@ # require "google/cloud/logging/v2" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Cloud::Logging::V2::LoggingService::Client.new # - # # Create an input stream + # # Create an input stream. # input = Gapic::StreamInput.new # # # Call the tail_log_entries method to start streaming. # output = client.tail_log_entries input # - # # Send requests on the stream. For each request, pass in keyword - # # arguments to set fields. Be sure to close the stream when done. + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. # input << Google::Cloud::Logging::V2::TailLogEntriesRequest.new # input << Google::Cloud::Logging::V2::TailLogEntriesRequest.new # input.close # - # # Handle streamed responses. These may be interleaved with inputs. - # # Each response is of type ::Google::Cloud::Logging::V2::TailLogEntriesResponse. - # output.each do |response| - # p response + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Logging::V2::TailLogEntriesResponse + # output.each do |current_response| + # p current_response # end # def tail_log_entries request, options = nil unless request.is_a? ::Enumerable raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum @@ -869,12 +868,12 @@ # @!attribute [rw] credentials # Credentials to send with calls. You may provide any of the following types: # * (`String`) The path to a service account key file in JSON format # * (`Hash`) A service account key as a Hash # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html)) + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html)) + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) # * (`GRPC::Core::Channel`) a gRPC channel with included credentials # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object # * (`nil`) indicating no credentials # @return [::Object] # @!attribute [rw] scope