google-cloud-access_approval-v1 0.1.1 → 0.1.2

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: f6f3f791c68c3279d51a1709f64cda59106bcf82dc40cdddfd1e789c12d8b610
4
- data.tar.gz: 1a25ce51a1e55d706153e67491001868ec19db7a76f3ce28b5446b3f87b41dfb
3
+ metadata.gz: 1b6a923c0a58aca2e91116fcd9fc31d8899e30b0488061dc86bacde71380314b
4
+ data.tar.gz: 74e54b7d714a184ef7b08c723819a93222c27b55c350e5175098f85ecee75f36
5
5
  SHA512:
6
- metadata.gz: 58f40dea2c7f9bf6fe894ef94d33cea1acd4d3884e61a4163f20a3ad9e7c5e850cb39ce79602af8b69b4c21d357abd27c12cdd394ddad28bf3b2fd1612465bcf
7
- data.tar.gz: e7ab6fea838d9e05de49e2389615aae7b92e49f9f74090ed92842b1a7b2655210c50e9b29d24c2f732866d497cd6bde5097388af9d1f2081c691fae59a9b8eac
6
+ metadata.gz: c15d261539fc29d098d44dc10374c4626b548fb86e682674f64f1d40e7edd519bdf55a3b13215fcc4375ee0dd25766dea7f0167c5a638ffee2da30bd12aba719
7
+ data.tar.gz: faf098ad779bce4d738f09b3a02336c15e0b5d05f881f7690c117ea92241d0e28ab02749d86f8b673e073b076d4c51f5680791be303d2c75e2a901d267d419b6
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Access Approval API V1
1
+ # Ruby Client for the Access Approval API V1 API
2
2
 
3
3
  API Client library for the Access Approval API V1 API
4
4
 
@@ -12,6 +12,53 @@ https://github.com/googleapis/google-cloud-ruby
12
12
  $ gem install google-cloud-access_approval-v1
13
13
  ```
14
14
 
15
+ ## Before You Begin
16
+
17
+ In order to use this library, you first need to go through the following steps:
18
+
19
+ 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
+ 1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. {file:AUTHENTICATION.md Set up authentication.}
22
+
23
+ ## Quick Start
24
+
25
+ ```ruby
26
+ require "google/cloud/access_approval/v1"
27
+
28
+ client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
29
+ request = my_create_request
30
+ response = client.list_approval_requests request
31
+ ```
32
+
33
+ View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-access_approval-v1/latest)
34
+ for class and method documentation.
35
+
36
+ ## Enabling Logging
37
+
38
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
39
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
40
+ or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
41
+ 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)
42
+ and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
43
+
44
+ Configuring a Ruby stdlib logger:
45
+
46
+ ```ruby
47
+ require "logger"
48
+
49
+ module MyLogger
50
+ LOGGER = Logger.new $stderr, level: Logger::WARN
51
+ def logger
52
+ LOGGER
53
+ end
54
+ end
55
+
56
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
57
+ module GRPC
58
+ extend MyLogger
59
+ end
60
+ ```
61
+
15
62
  ## Supported Ruby Versions
16
63
 
17
64
  This library is supported on Ruby 2.4+.
@@ -1 +1,21 @@
1
- require "google/cloud/access_approval/v1/version"
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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/cloud/access_approval/v1"
@@ -17,3 +17,19 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/access_approval/v1/access_approval"
20
+ require "google/cloud/access_approval/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module AccessApproval
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # require "google/cloud/access_approval/v1"
29
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
30
+ #
31
+ module V1
32
+ end
33
+ end
34
+ end
35
+ end
@@ -16,5 +16,65 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "google/cloud/access_approval/v1/access_approval/client"
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/access_approval/v1/version"
24
+
20
25
  require "google/cloud/access_approval/v1/access_approval/credentials"
26
+ require "google/cloud/access_approval/v1/access_approval/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module AccessApproval
31
+ module V1
32
+ ##
33
+ # This API allows a customer to manage accesses to cloud resources by
34
+ # Google personnel. It defines the following resource model:
35
+ #
36
+ # - The API has a collection of
37
+ # {Google::Cloud::AccessApproval::V1::ApprovalRequest ApprovalRequest}
38
+ # resources, named `approvalRequests/{approval_request_id}`
39
+ # - The API has top-level settings per Project/Folder/Organization, named
40
+ # `accessApprovalSettings`
41
+ #
42
+ # The service also periodically emails a list of recipients, defined at the
43
+ # Project/Folder/Organization level in the accessApprovalSettings, when there
44
+ # is a pending ApprovalRequest for them to act on. The ApprovalRequests can
45
+ # also optionally be published to a Cloud Pub/Sub topic owned by the customer
46
+ # (for Beta, the Pub/Sub setup is managed manually).
47
+ #
48
+ # ApprovalRequests can be approved or dismissed. Google personel can only
49
+ # access the indicated resource or resources if the request is approved
50
+ # (subject to some exclusions:
51
+ # https://cloud.google.com/access-approval/docs/overview#exclusions).
52
+ #
53
+ # Note: Using Access Approval functionality will mean that Google may not be
54
+ # able to meet the SLAs for your chosen products, as any support response times
55
+ # may be dramatically increased. As such the SLAs do not apply to any service
56
+ # disruption to the extent impacted by Customer's use of Access Approval. Do
57
+ # not enable Access Approval for projects where you may require high service
58
+ # availability and rapid response by Google Cloud Support.
59
+ #
60
+ # After a request is approved or dismissed, no further action may be taken on
61
+ # it. Requests with the requested_expiration in the past or with no activity
62
+ # for 14 days are considered dismissed. When an approval expires, the request
63
+ # is considered dismissed.
64
+ #
65
+ # If a request is not approved or dismissed, we call it pending.
66
+ #
67
+ # To load this service and instantiate a client:
68
+ #
69
+ # require "google/cloud/access_approval/v1/access_approval"
70
+ # client = Google::Cloud::AccessApproval::V1::AccessApproval::Client.new
71
+ #
72
+ module AccessApproval
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
78
+
79
+ helper_path = ::File.join __dir__, "access_approval", "helpers.rb"
80
+ require "google/cloud/access_approval/v1/access_approval/helpers" if ::File.file? helper_path
@@ -16,14 +16,8 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "gapic/common"
20
- require "gapic/config"
21
- require "gapic/config/method"
22
-
23
19
  require "google/cloud/errors"
24
- require "google/cloud/access_approval/v1/version"
25
20
  require "google/cloud/accessapproval/v1/accessapproval_pb"
26
- require "google/cloud/access_approval/v1/access_approval/credentials"
27
21
 
28
22
  module Google
29
23
  module Cloud
@@ -185,14 +179,20 @@ module Google
185
179
  # The order is reverse chronological.
186
180
  #
187
181
  # @overload list_approval_requests(request, options = nil)
188
- # @param request [Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage | Hash]
189
- # Lists approval requests associated with a project, folder, or organization.
190
- # Approval requests can be filtered by state (pending, active, dismissed).
191
- # The order is reverse chronological.
182
+ # Pass arguments to `list_approval_requests` via a request object, either of type
183
+ # {Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage} or an equivalent Hash.
184
+ #
185
+ # @param request [Google::Cloud::AccessApproval::V1::ListApprovalRequestsMessage, Hash]
186
+ # A request object representing the call parameters. Required. To specify no
187
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
192
188
  # @param options [Gapic::CallOptions, Hash]
193
189
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
194
190
  #
195
191
  # @overload list_approval_requests(parent: nil, filter: nil, page_size: nil, page_token: nil)
192
+ # Pass arguments to `list_approval_requests` via keyword arguments. Note that at
193
+ # least one keyword argument is required. To specify no parameters, or to keep all
194
+ # the default parameter values, pass an empty Hash as a request object (see above).
195
+ #
196
196
  # @param parent [String]
197
197
  # The parent resource. This may be "projects/\\{project_id}",
198
198
  # "folders/\\{folder_id}", or "organizations/\\{organization_id}".
@@ -211,7 +211,6 @@ module Google
211
211
  # @param page_token [String]
212
212
  # A token identifying the page of results to return.
213
213
  #
214
- #
215
214
  # @yield [response, operation] Access the result along with the RPC operation
216
215
  # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::AccessApproval::V1::ApprovalRequest>]
217
216
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -262,16 +261,23 @@ module Google
262
261
  # Gets an approval request. Returns NOT_FOUND if the request does not exist.
263
262
  #
264
263
  # @overload get_approval_request(request, options = nil)
265
- # @param request [Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage | Hash]
266
- # Gets an approval request. Returns NOT_FOUND if the request does not exist.
264
+ # Pass arguments to `get_approval_request` via a request object, either of type
265
+ # {Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage} or an equivalent Hash.
266
+ #
267
+ # @param request [Google::Cloud::AccessApproval::V1::GetApprovalRequestMessage, Hash]
268
+ # A request object representing the call parameters. Required. To specify no
269
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
267
270
  # @param options [Gapic::CallOptions, Hash]
268
271
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
269
272
  #
270
273
  # @overload get_approval_request(name: nil)
274
+ # Pass arguments to `get_approval_request` via keyword arguments. Note that at
275
+ # least one keyword argument is required. To specify no parameters, or to keep all
276
+ # the default parameter values, pass an empty Hash as a request object (see above).
277
+ #
271
278
  # @param name [String]
272
279
  # Name of the approval request to retrieve.
273
280
  #
274
- #
275
281
  # @yield [response, operation] Access the result along with the RPC operation
276
282
  # @yieldparam response [Google::Cloud::AccessApproval::V1::ApprovalRequest]
277
283
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -324,21 +330,25 @@ module Google
324
330
  # FAILED_PRECONDITION if the request exists but is not in a pending state.
325
331
  #
326
332
  # @overload approve_approval_request(request, options = nil)
327
- # @param request [Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage | Hash]
328
- # Approves a request and returns the updated ApprovalRequest.
333
+ # Pass arguments to `approve_approval_request` via a request object, either of type
334
+ # {Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage} or an equivalent Hash.
329
335
  #
330
- # Returns NOT_FOUND if the request does not exist. Returns
331
- # FAILED_PRECONDITION if the request exists but is not in a pending state.
336
+ # @param request [Google::Cloud::AccessApproval::V1::ApproveApprovalRequestMessage, Hash]
337
+ # A request object representing the call parameters. Required. To specify no
338
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
332
339
  # @param options [Gapic::CallOptions, Hash]
333
340
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
334
341
  #
335
342
  # @overload approve_approval_request(name: nil, expire_time: nil)
343
+ # Pass arguments to `approve_approval_request` via keyword arguments. Note that at
344
+ # least one keyword argument is required. To specify no parameters, or to keep all
345
+ # the default parameter values, pass an empty Hash as a request object (see above).
346
+ #
336
347
  # @param name [String]
337
348
  # Name of the approval request to approve.
338
- # @param expire_time [Google::Protobuf::Timestamp | Hash]
349
+ # @param expire_time [Google::Protobuf::Timestamp, Hash]
339
350
  # The expiration time of this approval.
340
351
  #
341
- #
342
352
  # @yield [response, operation] Access the result along with the RPC operation
343
353
  # @yieldparam response [Google::Cloud::AccessApproval::V1::ApprovalRequest]
344
354
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -397,25 +407,23 @@ module Google
397
407
  # state.
398
408
  #
399
409
  # @overload dismiss_approval_request(request, options = nil)
400
- # @param request [Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage | Hash]
401
- # Dismisses a request. Returns the updated ApprovalRequest.
402
- #
403
- # NOTE: This does not deny access to the resource if another request has been
404
- # made and approved. It is equivalent in effect to ignoring the request
405
- # altogether.
410
+ # Pass arguments to `dismiss_approval_request` via a request object, either of type
411
+ # {Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage} or an equivalent Hash.
406
412
  #
407
- # Returns NOT_FOUND if the request does not exist.
408
- #
409
- # Returns FAILED_PRECONDITION if the request exists but is not in a pending
410
- # state.
413
+ # @param request [Google::Cloud::AccessApproval::V1::DismissApprovalRequestMessage, Hash]
414
+ # A request object representing the call parameters. Required. To specify no
415
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
411
416
  # @param options [Gapic::CallOptions, Hash]
412
417
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
413
418
  #
414
419
  # @overload dismiss_approval_request(name: nil)
420
+ # Pass arguments to `dismiss_approval_request` via keyword arguments. Note that at
421
+ # least one keyword argument is required. To specify no parameters, or to keep all
422
+ # the default parameter values, pass an empty Hash as a request object (see above).
423
+ #
415
424
  # @param name [String]
416
425
  # Name of the ApprovalRequest to dismiss.
417
426
  #
418
- #
419
427
  # @yield [response, operation] Access the result along with the RPC operation
420
428
  # @yieldparam response [Google::Cloud::AccessApproval::V1::ApprovalRequest]
421
429
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -465,16 +473,23 @@ module Google
465
473
  # Gets the settings associated with a project, folder, or organization.
466
474
  #
467
475
  # @overload get_access_approval_settings(request, options = nil)
468
- # @param request [Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage | Hash]
469
- # Gets the settings associated with a project, folder, or organization.
476
+ # Pass arguments to `get_access_approval_settings` via a request object, either of type
477
+ # {Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage} or an equivalent Hash.
478
+ #
479
+ # @param request [Google::Cloud::AccessApproval::V1::GetAccessApprovalSettingsMessage, Hash]
480
+ # A request object representing the call parameters. Required. To specify no
481
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
470
482
  # @param options [Gapic::CallOptions, Hash]
471
483
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
472
484
  #
473
485
  # @overload get_access_approval_settings(name: nil)
486
+ # Pass arguments to `get_access_approval_settings` via keyword arguments. Note that at
487
+ # least one keyword argument is required. To specify no parameters, or to keep all
488
+ # the default parameter values, pass an empty Hash as a request object (see above).
489
+ #
474
490
  # @param name [String]
475
491
  # Name of the AccessApprovalSettings to retrieve.
476
492
  #
477
- #
478
493
  # @yield [response, operation] Access the result along with the RPC operation
479
494
  # @yieldparam response [Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
480
495
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -525,16 +540,23 @@ module Google
525
540
  # Settings to update are determined by the value of field_mask.
526
541
  #
527
542
  # @overload update_access_approval_settings(request, options = nil)
528
- # @param request [Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage | Hash]
529
- # Updates the settings associated with a project, folder, or organization.
530
- # Settings to update are determined by the value of field_mask.
543
+ # Pass arguments to `update_access_approval_settings` via a request object, either of type
544
+ # {Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage} or an equivalent Hash.
545
+ #
546
+ # @param request [Google::Cloud::AccessApproval::V1::UpdateAccessApprovalSettingsMessage, Hash]
547
+ # A request object representing the call parameters. Required. To specify no
548
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
531
549
  # @param options [Gapic::CallOptions, Hash]
532
550
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
533
551
  #
534
552
  # @overload update_access_approval_settings(settings: nil, update_mask: nil)
535
- # @param settings [Google::Cloud::AccessApproval::V1::AccessApprovalSettings | Hash]
553
+ # Pass arguments to `update_access_approval_settings` via keyword arguments. Note that at
554
+ # least one keyword argument is required. To specify no parameters, or to keep all
555
+ # the default parameter values, pass an empty Hash as a request object (see above).
556
+ #
557
+ # @param settings [Google::Cloud::AccessApproval::V1::AccessApprovalSettings, Hash]
536
558
  # The new AccessApprovalSettings.
537
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
559
+ # @param update_mask [Google::Protobuf::FieldMask, Hash]
538
560
  # The update mask applies to the settings. Only the top level fields of
539
561
  # AccessApprovalSettings (notification_emails & enrolled_services) are
540
562
  # supported. For each field, if it is included, the currently stored value
@@ -546,7 +568,6 @@ module Google
546
568
  # If this field is left unset, only the notification_emails field will be
547
569
  # updated.
548
570
  #
549
- #
550
571
  # @yield [response, operation] Access the result along with the RPC operation
551
572
  # @yieldparam response [Google::Cloud::AccessApproval::V1::AccessApprovalSettings]
552
573
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -601,21 +622,23 @@ module Google
601
622
  # the settings are inherited.
602
623
  #
603
624
  # @overload delete_access_approval_settings(request, options = nil)
604
- # @param request [Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage | Hash]
605
- # Deletes the settings associated with a project, folder, or organization.
606
- # This will have the effect of disabling Access Approval for the project,
607
- # folder, or organization, but only if all ancestors also have Access
608
- # Approval disabled. If Access Approval is enabled at a higher level of the
609
- # hierarchy, then Access Approval will still be enabled at this level as
610
- # the settings are inherited.
625
+ # Pass arguments to `delete_access_approval_settings` via a request object, either of type
626
+ # {Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage} or an equivalent Hash.
627
+ #
628
+ # @param request [Google::Cloud::AccessApproval::V1::DeleteAccessApprovalSettingsMessage, Hash]
629
+ # A request object representing the call parameters. Required. To specify no
630
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
611
631
  # @param options [Gapic::CallOptions, Hash]
612
632
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
613
633
  #
614
634
  # @overload delete_access_approval_settings(name: nil)
635
+ # Pass arguments to `delete_access_approval_settings` via keyword arguments. Note that at
636
+ # least one keyword argument is required. To specify no parameters, or to keep all
637
+ # the default parameter values, pass an empty Hash as a request object (see above).
638
+ #
615
639
  # @param name [String]
616
640
  # Name of the AccessApprovalSettings to delete.
617
641
  #
618
- #
619
642
  # @yield [response, operation] Access the result along with the RPC operation
620
643
  # @yieldparam response [Google::Protobuf::Empty]
621
644
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -856,13 +879,3 @@ module Google
856
879
  end
857
880
  end
858
881
  end
859
-
860
- # rubocop:disable Lint/HandleExceptions
861
-
862
- # Once client is loaded, load helpers.rb if it exists.
863
- begin
864
- require "google/cloud/access_approval/v1/access_approval/helpers"
865
- rescue LoadError
866
- end
867
-
868
- # rubocop:enable Lint/HandleExceptions
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module AccessApproval
23
23
  module V1
24
- VERSION = "0.1.1"
24
+ VERSION = "0.1.2"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-access_approval-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-02 00:00:00.000000000 Z
11
+ date: 2020-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common