google-cloud-ids-v1 0.2.0 → 0.4.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: 8aa1416d4a7c670563f5505fc437efeca93a4449ac6a65cf148de9bb80db7899
4
- data.tar.gz: afee74a8cead9316af623c74094b7911e3120deecd01ee79e0a11c4a1ff051b9
3
+ metadata.gz: 76a77a5063b189dddab5b8c76983d0cc5c6e9c15522a68e729f82ded7625e1ac
4
+ data.tar.gz: d9f87027b159ca9e5e2bd4c3b328d08de6320032fd7acf28b531e6993dadc5a0
5
5
  SHA512:
6
- metadata.gz: 5988ec7a00e0abe686c499ce3635247d28fe83eb26643bc9fbc066d438d6746032284413d73dfcf584ef75904f1ebdd6547a6fb9f29d931acb1bd084257ea910
7
- data.tar.gz: 8f644da99a3446bbf5e75607e06b98eb12626f21a2119af6188b1fbc694e4f356cd4aa255d8a97968cfcd2b25e266e9276db7bbd718a74eaab7a3abf34d87bd1
6
+ metadata.gz: c6b90bc7e6b031e94d91270dcdafea6122796b0fbdd680b78ab14c1fafaebcaeb239491673089d343850a08deaa96c1ddb6a10da497e3ef610bfbc32a4d81e1c
7
+ data.tar.gz: 7ffd60dd4b87203762f3e2218f4688fcfd0d9428e0e4280b77ae9c50648fef2ad137b52ba55249d5aa87bff9116437f22acf993e5af360657216ff46401b5930
data/AUTHENTICATION.md CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
112
112
  To configure your system for this, simply:
113
113
 
114
114
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
115
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
115
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
116
116
  3. Write code as if already authenticated.
117
117
 
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud IDS V1 API
2
2
 
3
- API Client library for the Cloud IDS V1 API
3
+ Cloud IDS (Cloud Intrusion Detection System) detects malware, spyware, command-and-control attacks, and other network-based threats. Its security efficacy is industry leading, built with Palo Alto Networks technologies. When you use this product, your organization name and consumption levels will be shared with Palo Alto Networks.
4
4
 
5
5
  Cloud IDS is an intrusion detection service that provides threat detection for intrusions, malware, spyware, and command-and-control attacks on your network. Cloud IDS works by creating a Google-managed peered network with mirrored VMs. Traffic in the peered network is mirrored, and then inspected by Palo Alto Networks threat protection technologies to provide advanced threat detection. You can mirror all traffic or you can mirror filtered traffic, based on protocol, IP address range, or ingress and egress.
6
6
 
@@ -46,8 +46,8 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -137,7 +137,7 @@ module Google
137
137
  credentials = @config.credentials
138
138
  # Use self-signed JWT if the endpoint is unchanged from default,
139
139
  # but only if the default endpoint does not have a region prefix.
140
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
140
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
141
141
  !@config.endpoint.split(".").first.include?("-")
142
142
  credentials ||= Credentials.default scope: @config.scope,
143
143
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -227,13 +227,11 @@ module Google
227
227
  # # Call the list_endpoints method.
228
228
  # result = client.list_endpoints request
229
229
  #
230
- # # The returned object is of type Gapic::PagedEnumerable. You can
231
- # # iterate over all elements by calling #each, and the enumerable
232
- # # will lazily make API calls to fetch subsequent pages. Other
233
- # # methods are also available for managing paging directly.
234
- # result.each do |response|
230
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
231
+ # # over elements, and API calls will be issued to fetch pages as needed.
232
+ # result.each do |item|
235
233
  # # Each element is of type ::Google::Cloud::IDS::V1::Endpoint.
236
- # p response
234
+ # p item
237
235
  # end
238
236
  #
239
237
  def list_endpoints request, options = nil
@@ -428,14 +426,14 @@ module Google
428
426
  # # Call the create_endpoint method.
429
427
  # result = client.create_endpoint request
430
428
  #
431
- # # The returned object is of type Gapic::Operation. You can use this
432
- # # object to check the status of an operation, cancel it, or wait
433
- # # for results. Here is how to block until completion:
429
+ # # The returned object is of type Gapic::Operation. You can use it to
430
+ # # check the status of an operation, cancel it, or wait for results.
431
+ # # Here is how to wait for a response.
434
432
  # result.wait_until_done! timeout: 60
435
433
  # if result.response?
436
434
  # p result.response
437
435
  # else
438
- # puts "Error!"
436
+ # puts "No response received."
439
437
  # end
440
438
  #
441
439
  def create_endpoint request, options = nil
@@ -535,14 +533,14 @@ module Google
535
533
  # # Call the delete_endpoint method.
536
534
  # result = client.delete_endpoint request
537
535
  #
538
- # # The returned object is of type Gapic::Operation. You can use this
539
- # # object to check the status of an operation, cancel it, or wait
540
- # # for results. Here is how to block until completion:
536
+ # # The returned object is of type Gapic::Operation. You can use it to
537
+ # # check the status of an operation, cancel it, or wait for results.
538
+ # # Here is how to wait for a response.
541
539
  # result.wait_until_done! timeout: 60
542
540
  # if result.response?
543
541
  # p result.response
544
542
  # else
545
- # puts "Error!"
543
+ # puts "No response received."
546
544
  # end
547
545
  #
548
546
  def delete_endpoint request, options = nil
@@ -625,9 +623,9 @@ module Google
625
623
  # * (`String`) The path to a service account key file in JSON format
626
624
  # * (`Hash`) A service account key as a Hash
627
625
  # * (`Google::Auth::Credentials`) A googleauth credentials object
628
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
626
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
629
627
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
630
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
628
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
631
629
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
632
630
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
633
631
  # * (`nil`) indicating no credentials
@@ -669,7 +667,9 @@ module Google
669
667
  class Configuration
670
668
  extend ::Gapic::Config
671
669
 
672
- config_attr :endpoint, "ids.googleapis.com", ::String
670
+ DEFAULT_ENDPOINT = "ids.googleapis.com"
671
+
672
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
673
673
  config_attr :credentials, nil do |value|
674
674
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
675
675
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil
@@ -622,9 +620,9 @@ module Google
622
620
  # * (`String`) The path to a service account key file in JSON format
623
621
  # * (`Hash`) A service account key as a Hash
624
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
625
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
626
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
627
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
628
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
629
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
630
628
  # * (`nil`) indicating no credentials
@@ -666,7 +664,9 @@ module Google
666
664
  class Configuration
667
665
  extend ::Gapic::Config
668
666
 
669
- config_attr :endpoint, "ids.googleapis.com", ::String
667
+ DEFAULT_ENDPOINT = "ids.googleapis.com"
668
+
669
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
670
670
  config_attr :credentials, nil do |value|
671
671
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
672
672
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC