google-cloud-monitoring 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63d5abc4eff35e0c04288ba3753bf7be55cad71769ab3260b3916e553bd1c4e1
4
- data.tar.gz: 5f43c24b936dedb51ea3ea86e57cdacd02c25dbe5772b4fd42f715df7b44b606
3
+ metadata.gz: 44049e8e18abb61468f2f71f4c1fb6ab145533dd30438f302fecb5453899bb8f
4
+ data.tar.gz: df306b539254738a88a2ce4e4b71b742d2a0daff37738a9b8c37e7f0e5f572a7
5
5
  SHA512:
6
- metadata.gz: a8d1fe548d638816992f6024fd4f3c782d32bcd3a54bd86aa7dbea67a673ef380ad839aa2a986f2f405a1246b1e325c72261a0c377c355087c3d6647c5d60fa4
7
- data.tar.gz: 2534dc8e91770200ca15a54a592089c4da0892d703e54d0f693cc45d928fc295d352dae1bae60bab0ad944ec2bd495bf6178f638799349d22072c9266cca997b
6
+ metadata.gz: a3ced08d7699b16685885ea61d62f45eef94d03f3ba2afcb200751eb21d96c965c73daae9c79ebabf319c8f4cc77ed7c6809e121bf171a0ff658730c576b9fbf
7
+ data.tar.gz: 88dc32d2f2ce6282406b9719e10f9353af09f815b710dc2a2536185ce249e9c075321a1c0418b4fe010aeaf757b96f8f7d8ab99ae67f6d332ed58215de70f5f4
data/MIGRATING.md CHANGED
@@ -299,7 +299,7 @@ end
299
299
  ### Handling Errors
300
300
 
301
301
  The client reports standard
302
- {file:https://github.com/grpc/grpc/blob/master/doc/statuscodes.md gRPC error codes}
302
+ [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
303
303
  by raising exceptions. In older releases, these exceptions were located in the
304
304
  `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
305
305
  exception class, defined in the `google-gax` gem. However, these classes were
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Monitoring
23
+ module MetricsScope
24
+ # @private
25
+ VERSION = ""
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,118 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ # Require this file early so that the version constant gets defined before
20
+ # requiring "google/cloud". This is because google-cloud-core will load the
21
+ # entrypoint (gem name) file, which in turn re-requires this file (hence
22
+ # causing a require cycle) unless the version constant is already defined.
23
+ require "google/cloud/monitoring/metrics_scope/version"
24
+
25
+ require "googleauth"
26
+ gem "google-cloud-core"
27
+ require "google/cloud" unless defined? ::Google::Cloud.new
28
+ require "google/cloud/config"
29
+
30
+ # Set the default configuration
31
+ ::Google::Cloud.configure.add_config! :monitoring_metrics_scope do |config|
32
+ config.add_field! :endpoint, "monitoring.googleapis.com", match: ::String
33
+ config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
34
+ config.add_field! :scope, nil, match: [::Array, ::String]
35
+ config.add_field! :lib_name, nil, match: ::String
36
+ config.add_field! :lib_version, nil, match: ::String
37
+ config.add_field! :interceptors, nil, match: ::Array
38
+ config.add_field! :timeout, nil, match: ::Numeric
39
+ config.add_field! :metadata, nil, match: ::Hash
40
+ config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
41
+ config.add_field! :quota_project, nil, match: ::String
42
+ end
43
+
44
+ module Google
45
+ module Cloud
46
+ module Monitoring
47
+ module MetricsScope
48
+ ##
49
+ # Create a new client object for MetricsScopes.
50
+ #
51
+ # By default, this returns an instance of
52
+ # [Google::Cloud::Monitoring::MetricsScope::V1::MetricsScopes::Client](https://googleapis.dev/ruby/google-cloud-monitoring-metrics_scope-v1/latest/Google/Cloud/Monitoring/MetricsScope/V1/MetricsScopes/Client.html)
53
+ # for version V1 of the API.
54
+ # However, you can specify specify a different API version by passing it in the
55
+ # `version` parameter. If the MetricsScopes service is
56
+ # supported by that API version, and the corresponding gem is available, the
57
+ # appropriate versioned client will be returned.
58
+ #
59
+ # ## About MetricsScopes
60
+ #
61
+ # Manages Cloud Monitoring Metrics Scopes, and the monitoring of Google Cloud
62
+ # projects and AWS accounts.
63
+ #
64
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
65
+ # Defaults to `:v1`.
66
+ # @return [MetricsScopes::Client] A client object for the specified version.
67
+ #
68
+ def self.metrics_scopes version: :v1, &block
69
+ require "google/cloud/monitoring/metrics_scope/#{version.to_s.downcase}"
70
+
71
+ package_name = Google::Cloud::Monitoring::MetricsScope
72
+ .constants
73
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
74
+ .first
75
+ package_module = Google::Cloud::Monitoring::MetricsScope.const_get package_name
76
+ package_module.const_get(:MetricsScopes).const_get(:Client).new(&block)
77
+ end
78
+
79
+ ##
80
+ # Configure the google-cloud-monitoring-metrics_scope library.
81
+ #
82
+ # The following configuration parameters are supported:
83
+ #
84
+ # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) -
85
+ # The path to the keyfile as a String, the contents of the keyfile as a
86
+ # Hash, or a Google::Auth::Credentials object.
87
+ # * `lib_name` (*type:* `String`) -
88
+ # The library name as recorded in instrumentation and logging.
89
+ # * `lib_version` (*type:* `String`) -
90
+ # The library version as recorded in instrumentation and logging.
91
+ # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
92
+ # An array of interceptors that are run before calls are executed.
93
+ # * `timeout` (*type:* `Numeric`) -
94
+ # Default timeout in seconds.
95
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) -
96
+ # Additional gRPC headers to be sent with the call.
97
+ # * `retry_policy` (*type:* `Hash`) -
98
+ # The retry policy. The value is a hash with the following keys:
99
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
100
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
101
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
102
+ # * `:retry_codes` (*type:* `Array<String>`) -
103
+ # The error codes that should trigger a retry.
104
+ #
105
+ # @return [::Google::Cloud::Config] The default configuration used by this library
106
+ #
107
+ def self.configure
108
+ yield ::Google::Cloud.configure.monitoring_metrics_scope if block_given?
109
+
110
+ ::Google::Cloud.configure.monitoring_metrics_scope
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
116
+
117
+ helper_path = ::File.join __dir__, "metrics_scope", "helpers.rb"
118
+ require "google/cloud/monitoring/metrics_scope/helpers" if ::File.file? helper_path
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Monitoring
23
- VERSION = "1.2.2"
23
+ VERSION = "1.3.0"
24
24
  end
25
25
  end
26
26
  end
@@ -18,3 +18,4 @@
18
18
 
19
19
  require "google/cloud/monitoring" unless defined? Google::Cloud::Monitoring::VERSION
20
20
  require "google/cloud/monitoring/dashboard" unless defined? Google::Cloud::Monitoring::Dashboard::VERSION
21
+ require "google/cloud/monitoring/metrics_scope" unless defined? Google::Cloud::Monitoring::MetricsScope::VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-monitoring
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -64,6 +64,26 @@ dependencies:
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 2.a
67
+ - !ruby/object:Gem::Dependency
68
+ name: google-cloud-monitoring-metrics_scope-v1
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0.0'
74
+ - - "<"
75
+ - !ruby/object:Gem::Version
76
+ version: 2.a
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0.0'
84
+ - - "<"
85
+ - !ruby/object:Gem::Version
86
+ version: 2.a
67
87
  - !ruby/object:Gem::Dependency
68
88
  name: google-style
69
89
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +212,8 @@ files:
192
212
  - lib/google/cloud/monitoring.rb
193
213
  - lib/google/cloud/monitoring/dashboard.rb
194
214
  - lib/google/cloud/monitoring/dashboard/version.rb
215
+ - lib/google/cloud/monitoring/metrics_scope.rb
216
+ - lib/google/cloud/monitoring/metrics_scope/version.rb
195
217
  - lib/google/cloud/monitoring/version.rb
196
218
  homepage: https://github.com/googleapis/google-cloud-ruby
197
219
  licenses: