google-cloud-binary_authorization-v1 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb +74 -37
- data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb +82 -37
- data/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb +1 -0
- data/lib/google/cloud/binary_authorization/v1/bindings_override.rb +110 -0
- data/lib/google/cloud/binary_authorization/v1/rest.rb +1 -0
- data/lib/google/cloud/binary_authorization/v1/system_policy/client.rb +16 -0
- data/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb +24 -0
- data/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb +1 -0
- data/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb +23 -6
- data/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb +31 -6
- data/lib/google/cloud/binary_authorization/v1/validation_helper/rest.rb +1 -0
- data/lib/google/cloud/binary_authorization/v1/version.rb +1 -1
- data/lib/google/cloud/binaryauthorization/v1/resources_pb.rb +1 -1
- data/lib/google/cloud/binaryauthorization/v1/service_pb.rb +1 -1
- data/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb +29 -20
- data/proto_docs/google/cloud/binaryauthorization/v1/resources.rb +106 -52
- data/proto_docs/google/cloud/binaryauthorization/v1/service.rb +56 -34
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +21 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e383cdfd964203f069356c45a2f8df281c588a7d0ce4c33d45ad86f815254df
|
|
4
|
+
data.tar.gz: d9936ff22ea647569a0e3f4195aa79dce37e81a7e79eb94a8d3e16e625d02f2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22a178077d03dc0fce4e84e70033358bb6001672d0a2b0ffe493954133a399178c4828f584123198b11c55b727bbd226d1e146a32c35e5c5bdd3abd1f00fc29c
|
|
7
|
+
data.tar.gz: a8bfcac5b91bb026d16a042bb12304ded6229563af8ac0a9b0cb0fac35a00436c18ddc037083c5d0dc39cf9544999fc239e9e60375140cc7d5b3463cbbf1e2b4
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ruby Client for the Binary Authorization V1 API
|
|
2
2
|
|
|
3
|
-
The management interface for Binary Authorization, a
|
|
3
|
+
The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run.
|
|
4
4
|
|
|
5
5
|
Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem.
|
|
6
6
|
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
require "google/cloud/errors"
|
|
20
20
|
require "google/cloud/binaryauthorization/v1/service_pb"
|
|
21
|
+
require "google/iam/v1"
|
|
21
22
|
|
|
22
23
|
module Google
|
|
23
24
|
module Cloud
|
|
@@ -208,8 +209,23 @@ module Google
|
|
|
208
209
|
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
209
210
|
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
210
211
|
end
|
|
212
|
+
|
|
213
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
|
214
|
+
config.credentials = credentials
|
|
215
|
+
config.quota_project = @quota_project_id
|
|
216
|
+
config.endpoint = @binauthz_management_service_stub.endpoint
|
|
217
|
+
config.universe_domain = @binauthz_management_service_stub.universe_domain
|
|
218
|
+
config.logger = @binauthz_management_service_stub.logger if config.respond_to? :logger=
|
|
219
|
+
end
|
|
211
220
|
end
|
|
212
221
|
|
|
222
|
+
##
|
|
223
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
224
|
+
#
|
|
225
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
|
226
|
+
#
|
|
227
|
+
attr_reader :iam_policy_client
|
|
228
|
+
|
|
213
229
|
##
|
|
214
230
|
# The logger used for request/response debug logging.
|
|
215
231
|
#
|
|
@@ -222,13 +238,16 @@ module Google
|
|
|
222
238
|
# Service calls
|
|
223
239
|
|
|
224
240
|
##
|
|
225
|
-
# A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} specifies the
|
|
226
|
-
#
|
|
227
|
-
# image
|
|
228
|
-
#
|
|
241
|
+
# A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} specifies the
|
|
242
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} that must attest
|
|
243
|
+
# to a container image, before the project is allowed to deploy that image.
|
|
244
|
+
# There is at most one policy per project. All image admission requests are
|
|
245
|
+
# permitted if a project has no policy.
|
|
229
246
|
#
|
|
230
|
-
# Gets the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for this
|
|
231
|
-
#
|
|
247
|
+
# Gets the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for this
|
|
248
|
+
# project. Returns a default
|
|
249
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Policy policy} if the project does
|
|
250
|
+
# not have one.
|
|
232
251
|
#
|
|
233
252
|
# @overload get_policy(request, options = nil)
|
|
234
253
|
# Pass arguments to `get_policy` via a request object, either of type
|
|
@@ -246,8 +265,9 @@ module Google
|
|
|
246
265
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
247
266
|
#
|
|
248
267
|
# @param name [::String]
|
|
249
|
-
# Required. The resource name of the
|
|
250
|
-
# in the
|
|
268
|
+
# Required. The resource name of the
|
|
269
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Policy policy} to retrieve, in the
|
|
270
|
+
# format `projects/*/policy`.
|
|
251
271
|
#
|
|
252
272
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
253
273
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Policy]
|
|
@@ -314,11 +334,12 @@ module Google
|
|
|
314
334
|
end
|
|
315
335
|
|
|
316
336
|
##
|
|
317
|
-
# Creates or updates a project's
|
|
318
|
-
#
|
|
319
|
-
#
|
|
320
|
-
#
|
|
321
|
-
# if the
|
|
337
|
+
# Creates or updates a project's
|
|
338
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Policy policy}, and returns a copy of
|
|
339
|
+
# the new {::Google::Cloud::BinaryAuthorization::V1::Policy policy}. A policy is
|
|
340
|
+
# always updated as a whole, to avoid race conditions with concurrent policy
|
|
341
|
+
# enforcement (or management!) requests. Returns `NOT_FOUND` if the project
|
|
342
|
+
# does not exist, `INVALID_ARGUMENT` if the request is malformed.
|
|
322
343
|
#
|
|
323
344
|
# @overload update_policy(request, options = nil)
|
|
324
345
|
# Pass arguments to `update_policy` via a request object, either of type
|
|
@@ -336,9 +357,11 @@ module Google
|
|
|
336
357
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
337
358
|
#
|
|
338
359
|
# @param policy [::Google::Cloud::BinaryAuthorization::V1::Policy, ::Hash]
|
|
339
|
-
# Required. A new or updated
|
|
340
|
-
#
|
|
341
|
-
#
|
|
360
|
+
# Required. A new or updated
|
|
361
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Policy policy} value. The service
|
|
362
|
+
# will overwrite the [policy
|
|
363
|
+
# name][google.cloud.binaryauthorization.v1.Policy.name] field with the
|
|
364
|
+
# resource name in the request URL, in the format `projects/*/policy`.
|
|
342
365
|
#
|
|
343
366
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
344
367
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Policy]
|
|
@@ -405,9 +428,11 @@ module Google
|
|
|
405
428
|
end
|
|
406
429
|
|
|
407
430
|
##
|
|
408
|
-
# Creates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}, and
|
|
409
|
-
#
|
|
410
|
-
#
|
|
431
|
+
# Creates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}, and
|
|
432
|
+
# returns a copy of the new
|
|
433
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns
|
|
434
|
+
# `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the
|
|
435
|
+
# request is malformed, `ALREADY_EXISTS` if the
|
|
411
436
|
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} already exists.
|
|
412
437
|
#
|
|
413
438
|
# @overload create_attestor(request, options = nil)
|
|
@@ -426,13 +451,16 @@ module Google
|
|
|
426
451
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
427
452
|
#
|
|
428
453
|
# @param parent [::String]
|
|
429
|
-
# Required. The parent of this
|
|
454
|
+
# Required. The parent of this
|
|
455
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
430
456
|
# @param attestor_id [::String]
|
|
431
457
|
# Required. The {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} ID.
|
|
432
458
|
# @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash]
|
|
433
|
-
# Required. The initial
|
|
434
|
-
#
|
|
435
|
-
#
|
|
459
|
+
# Required. The initial
|
|
460
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service
|
|
461
|
+
# will overwrite the [attestor
|
|
462
|
+
# name][google.cloud.binaryauthorization.v1.Attestor.name] field with the
|
|
463
|
+
# resource name, in the format `projects/*/attestors/*`.
|
|
436
464
|
#
|
|
437
465
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
438
466
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor]
|
|
@@ -500,7 +528,8 @@ module Google
|
|
|
500
528
|
|
|
501
529
|
##
|
|
502
530
|
# Gets an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
503
|
-
# Returns NOT_FOUND if the
|
|
531
|
+
# Returns `NOT_FOUND` if the
|
|
532
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist.
|
|
504
533
|
#
|
|
505
534
|
# @overload get_attestor(request, options = nil)
|
|
506
535
|
# Pass arguments to `get_attestor` via a request object, either of type
|
|
@@ -518,8 +547,9 @@ module Google
|
|
|
518
547
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
519
548
|
#
|
|
520
549
|
# @param name [::String]
|
|
521
|
-
# Required. The name of the
|
|
522
|
-
#
|
|
550
|
+
# Required. The name of the
|
|
551
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} to retrieve, in
|
|
552
|
+
# the format `projects/*/attestors/*`.
|
|
523
553
|
#
|
|
524
554
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
525
555
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor]
|
|
@@ -587,7 +617,8 @@ module Google
|
|
|
587
617
|
|
|
588
618
|
##
|
|
589
619
|
# Updates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
590
|
-
# Returns NOT_FOUND if the
|
|
620
|
+
# Returns `NOT_FOUND` if the
|
|
621
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist.
|
|
591
622
|
#
|
|
592
623
|
# @overload update_attestor(request, options = nil)
|
|
593
624
|
# Pass arguments to `update_attestor` via a request object, either of type
|
|
@@ -605,9 +636,11 @@ module Google
|
|
|
605
636
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
606
637
|
#
|
|
607
638
|
# @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash]
|
|
608
|
-
# Required. The updated
|
|
609
|
-
#
|
|
610
|
-
#
|
|
639
|
+
# Required. The updated
|
|
640
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service
|
|
641
|
+
# will overwrite the [attestor
|
|
642
|
+
# name][google.cloud.binaryauthorization.v1.Attestor.name] field with the
|
|
643
|
+
# resource name in the request URL, in the format `projects/*/attestors/*`.
|
|
611
644
|
#
|
|
612
645
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
613
646
|
# @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor]
|
|
@@ -675,7 +708,7 @@ module Google
|
|
|
675
708
|
|
|
676
709
|
##
|
|
677
710
|
# Lists {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}.
|
|
678
|
-
# Returns INVALID_ARGUMENT if the project does not exist.
|
|
711
|
+
# Returns `INVALID_ARGUMENT` if the project does not exist.
|
|
679
712
|
#
|
|
680
713
|
# @overload list_attestors(request, options = nil)
|
|
681
714
|
# Pass arguments to `list_attestors` via a request object, either of type
|
|
@@ -694,14 +727,16 @@ module Google
|
|
|
694
727
|
#
|
|
695
728
|
# @param parent [::String]
|
|
696
729
|
# Required. The resource name of the project associated with the
|
|
697
|
-
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format
|
|
730
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format
|
|
731
|
+
# `projects/*`.
|
|
698
732
|
# @param page_size [::Integer]
|
|
699
733
|
# Requested page size. The server may return fewer results than requested. If
|
|
700
734
|
# unspecified, the server will pick an appropriate default.
|
|
701
735
|
# @param page_token [::String]
|
|
702
736
|
# A token identifying a page of results the server should return. Typically,
|
|
703
|
-
# this is the value of
|
|
704
|
-
#
|
|
737
|
+
# this is the value of
|
|
738
|
+
# {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token}
|
|
739
|
+
# returned from the previous call to the `ListAttestors` method.
|
|
705
740
|
#
|
|
706
741
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
707
742
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>]
|
|
@@ -774,7 +809,8 @@ module Google
|
|
|
774
809
|
end
|
|
775
810
|
|
|
776
811
|
##
|
|
777
|
-
# Deletes an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
812
|
+
# Deletes an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
813
|
+
# Returns `NOT_FOUND` if the
|
|
778
814
|
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist.
|
|
779
815
|
#
|
|
780
816
|
# @overload delete_attestor(request, options = nil)
|
|
@@ -793,8 +829,9 @@ module Google
|
|
|
793
829
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
794
830
|
#
|
|
795
831
|
# @param name [::String]
|
|
796
|
-
# Required. The name of the
|
|
797
|
-
#
|
|
832
|
+
# Required. The name of the
|
|
833
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} to delete, in the
|
|
834
|
+
# format `projects/*/attestors/*`.
|
|
798
835
|
#
|
|
799
836
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
800
837
|
# @yieldparam response [::Google::Protobuf::Empty]
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
require "google/cloud/errors"
|
|
20
20
|
require "google/cloud/binaryauthorization/v1/service_pb"
|
|
21
21
|
require "google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub"
|
|
22
|
+
require "google/iam/v1/rest"
|
|
22
23
|
|
|
23
24
|
module Google
|
|
24
25
|
module Cloud
|
|
@@ -201,8 +202,24 @@ module Google
|
|
|
201
202
|
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
202
203
|
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
203
204
|
end
|
|
205
|
+
|
|
206
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
|
207
|
+
config.credentials = credentials
|
|
208
|
+
config.quota_project = @quota_project_id
|
|
209
|
+
config.endpoint = @binauthz_management_service_stub.endpoint
|
|
210
|
+
config.universe_domain = @binauthz_management_service_stub.universe_domain
|
|
211
|
+
config.bindings_override = @config.bindings_override
|
|
212
|
+
config.logger = @binauthz_management_service_stub.logger if config.respond_to? :logger=
|
|
213
|
+
end
|
|
204
214
|
end
|
|
205
215
|
|
|
216
|
+
##
|
|
217
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
218
|
+
#
|
|
219
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
|
220
|
+
#
|
|
221
|
+
attr_reader :iam_policy_client
|
|
222
|
+
|
|
206
223
|
##
|
|
207
224
|
# The logger used for request/response debug logging.
|
|
208
225
|
#
|
|
@@ -215,13 +232,16 @@ module Google
|
|
|
215
232
|
# Service calls
|
|
216
233
|
|
|
217
234
|
##
|
|
218
|
-
# A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} specifies the
|
|
219
|
-
#
|
|
220
|
-
# image
|
|
221
|
-
#
|
|
235
|
+
# A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} specifies the
|
|
236
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} that must attest
|
|
237
|
+
# to a container image, before the project is allowed to deploy that image.
|
|
238
|
+
# There is at most one policy per project. All image admission requests are
|
|
239
|
+
# permitted if a project has no policy.
|
|
222
240
|
#
|
|
223
|
-
# Gets the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for this
|
|
224
|
-
#
|
|
241
|
+
# Gets the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for this
|
|
242
|
+
# project. Returns a default
|
|
243
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Policy policy} if the project does
|
|
244
|
+
# not have one.
|
|
225
245
|
#
|
|
226
246
|
# @overload get_policy(request, options = nil)
|
|
227
247
|
# Pass arguments to `get_policy` via a request object, either of type
|
|
@@ -239,8 +259,9 @@ module Google
|
|
|
239
259
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
240
260
|
#
|
|
241
261
|
# @param name [::String]
|
|
242
|
-
# Required. The resource name of the
|
|
243
|
-
# in the
|
|
262
|
+
# Required. The resource name of the
|
|
263
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Policy policy} to retrieve, in the
|
|
264
|
+
# format `projects/*/policy`.
|
|
244
265
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
245
266
|
# @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy]
|
|
246
267
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -300,11 +321,12 @@ module Google
|
|
|
300
321
|
end
|
|
301
322
|
|
|
302
323
|
##
|
|
303
|
-
# Creates or updates a project's
|
|
304
|
-
#
|
|
305
|
-
#
|
|
306
|
-
#
|
|
307
|
-
# if the
|
|
324
|
+
# Creates or updates a project's
|
|
325
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Policy policy}, and returns a copy of
|
|
326
|
+
# the new {::Google::Cloud::BinaryAuthorization::V1::Policy policy}. A policy is
|
|
327
|
+
# always updated as a whole, to avoid race conditions with concurrent policy
|
|
328
|
+
# enforcement (or management!) requests. Returns `NOT_FOUND` if the project
|
|
329
|
+
# does not exist, `INVALID_ARGUMENT` if the request is malformed.
|
|
308
330
|
#
|
|
309
331
|
# @overload update_policy(request, options = nil)
|
|
310
332
|
# Pass arguments to `update_policy` via a request object, either of type
|
|
@@ -322,9 +344,11 @@ module Google
|
|
|
322
344
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
323
345
|
#
|
|
324
346
|
# @param policy [::Google::Cloud::BinaryAuthorization::V1::Policy, ::Hash]
|
|
325
|
-
# Required. A new or updated
|
|
326
|
-
#
|
|
327
|
-
#
|
|
347
|
+
# Required. A new or updated
|
|
348
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Policy policy} value. The service
|
|
349
|
+
# will overwrite the [policy
|
|
350
|
+
# name][google.cloud.binaryauthorization.v1.Policy.name] field with the
|
|
351
|
+
# resource name in the request URL, in the format `projects/*/policy`.
|
|
328
352
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
329
353
|
# @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy]
|
|
330
354
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -384,9 +408,11 @@ module Google
|
|
|
384
408
|
end
|
|
385
409
|
|
|
386
410
|
##
|
|
387
|
-
# Creates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}, and
|
|
388
|
-
#
|
|
389
|
-
#
|
|
411
|
+
# Creates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}, and
|
|
412
|
+
# returns a copy of the new
|
|
413
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns
|
|
414
|
+
# `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the
|
|
415
|
+
# request is malformed, `ALREADY_EXISTS` if the
|
|
390
416
|
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} already exists.
|
|
391
417
|
#
|
|
392
418
|
# @overload create_attestor(request, options = nil)
|
|
@@ -405,13 +431,16 @@ module Google
|
|
|
405
431
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
406
432
|
#
|
|
407
433
|
# @param parent [::String]
|
|
408
|
-
# Required. The parent of this
|
|
434
|
+
# Required. The parent of this
|
|
435
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
409
436
|
# @param attestor_id [::String]
|
|
410
437
|
# Required. The {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} ID.
|
|
411
438
|
# @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash]
|
|
412
|
-
# Required. The initial
|
|
413
|
-
#
|
|
414
|
-
#
|
|
439
|
+
# Required. The initial
|
|
440
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service
|
|
441
|
+
# will overwrite the [attestor
|
|
442
|
+
# name][google.cloud.binaryauthorization.v1.Attestor.name] field with the
|
|
443
|
+
# resource name, in the format `projects/*/attestors/*`.
|
|
415
444
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
416
445
|
# @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor]
|
|
417
446
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -472,7 +501,8 @@ module Google
|
|
|
472
501
|
|
|
473
502
|
##
|
|
474
503
|
# Gets an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
475
|
-
# Returns NOT_FOUND if the
|
|
504
|
+
# Returns `NOT_FOUND` if the
|
|
505
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist.
|
|
476
506
|
#
|
|
477
507
|
# @overload get_attestor(request, options = nil)
|
|
478
508
|
# Pass arguments to `get_attestor` via a request object, either of type
|
|
@@ -490,8 +520,9 @@ module Google
|
|
|
490
520
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
491
521
|
#
|
|
492
522
|
# @param name [::String]
|
|
493
|
-
# Required. The name of the
|
|
494
|
-
#
|
|
523
|
+
# Required. The name of the
|
|
524
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} to retrieve, in
|
|
525
|
+
# the format `projects/*/attestors/*`.
|
|
495
526
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
496
527
|
# @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor]
|
|
497
528
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -552,7 +583,8 @@ module Google
|
|
|
552
583
|
|
|
553
584
|
##
|
|
554
585
|
# Updates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
555
|
-
# Returns NOT_FOUND if the
|
|
586
|
+
# Returns `NOT_FOUND` if the
|
|
587
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist.
|
|
556
588
|
#
|
|
557
589
|
# @overload update_attestor(request, options = nil)
|
|
558
590
|
# Pass arguments to `update_attestor` via a request object, either of type
|
|
@@ -570,9 +602,11 @@ module Google
|
|
|
570
602
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
571
603
|
#
|
|
572
604
|
# @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash]
|
|
573
|
-
# Required. The updated
|
|
574
|
-
#
|
|
575
|
-
#
|
|
605
|
+
# Required. The updated
|
|
606
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service
|
|
607
|
+
# will overwrite the [attestor
|
|
608
|
+
# name][google.cloud.binaryauthorization.v1.Attestor.name] field with the
|
|
609
|
+
# resource name in the request URL, in the format `projects/*/attestors/*`.
|
|
576
610
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
577
611
|
# @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor]
|
|
578
612
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -633,7 +667,7 @@ module Google
|
|
|
633
667
|
|
|
634
668
|
##
|
|
635
669
|
# Lists {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}.
|
|
636
|
-
# Returns INVALID_ARGUMENT if the project does not exist.
|
|
670
|
+
# Returns `INVALID_ARGUMENT` if the project does not exist.
|
|
637
671
|
#
|
|
638
672
|
# @overload list_attestors(request, options = nil)
|
|
639
673
|
# Pass arguments to `list_attestors` via a request object, either of type
|
|
@@ -652,14 +686,16 @@ module Google
|
|
|
652
686
|
#
|
|
653
687
|
# @param parent [::String]
|
|
654
688
|
# Required. The resource name of the project associated with the
|
|
655
|
-
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format
|
|
689
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format
|
|
690
|
+
# `projects/*`.
|
|
656
691
|
# @param page_size [::Integer]
|
|
657
692
|
# Requested page size. The server may return fewer results than requested. If
|
|
658
693
|
# unspecified, the server will pick an appropriate default.
|
|
659
694
|
# @param page_token [::String]
|
|
660
695
|
# A token identifying a page of results the server should return. Typically,
|
|
661
|
-
# this is the value of
|
|
662
|
-
#
|
|
696
|
+
# this is the value of
|
|
697
|
+
# {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token}
|
|
698
|
+
# returned from the previous call to the `ListAttestors` method.
|
|
663
699
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
664
700
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>]
|
|
665
701
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -725,7 +761,8 @@ module Google
|
|
|
725
761
|
end
|
|
726
762
|
|
|
727
763
|
##
|
|
728
|
-
# Deletes an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
764
|
+
# Deletes an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}.
|
|
765
|
+
# Returns `NOT_FOUND` if the
|
|
729
766
|
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist.
|
|
730
767
|
#
|
|
731
768
|
# @overload delete_attestor(request, options = nil)
|
|
@@ -744,8 +781,9 @@ module Google
|
|
|
744
781
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
745
782
|
#
|
|
746
783
|
# @param name [::String]
|
|
747
|
-
# Required. The name of the
|
|
748
|
-
#
|
|
784
|
+
# Required. The name of the
|
|
785
|
+
# {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} to delete, in the
|
|
786
|
+
# format `projects/*/attestors/*`.
|
|
749
787
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
750
788
|
# @yieldparam result [::Google::Protobuf::Empty]
|
|
751
789
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -912,6 +950,13 @@ module Google
|
|
|
912
950
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
913
951
|
config_attr :quota_project, nil, ::String, nil
|
|
914
952
|
config_attr :universe_domain, nil, ::String, nil
|
|
953
|
+
|
|
954
|
+
# @private
|
|
955
|
+
# Overrides for http bindings for the RPCs of this service
|
|
956
|
+
# are only used when this service is used as mixin, and only
|
|
957
|
+
# by the host service.
|
|
958
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
|
959
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
|
915
960
|
config_attr :logger, :default, ::Logger, nil, :default
|
|
916
961
|
|
|
917
962
|
# @private
|
|
@@ -21,6 +21,7 @@ require "gapic/config"
|
|
|
21
21
|
require "gapic/config/method"
|
|
22
22
|
|
|
23
23
|
require "google/cloud/binary_authorization/v1/version"
|
|
24
|
+
require "google/cloud/binary_authorization/v1/bindings_override"
|
|
24
25
|
|
|
25
26
|
require "google/cloud/binary_authorization/v1/binauthz_management_service/credentials"
|
|
26
27
|
require "google/cloud/binary_authorization/v1/binauthz_management_service/paths"
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 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 "gapic/rest"
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Cloud
|
|
23
|
+
module BinaryAuthorization
|
|
24
|
+
##
|
|
25
|
+
# @example Loading just the REST part of this package, including all its services, and instantiating a REST client
|
|
26
|
+
#
|
|
27
|
+
# require "google/cloud/binary_authorization/v1/rest"
|
|
28
|
+
# client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new
|
|
29
|
+
#
|
|
30
|
+
module V1
|
|
31
|
+
##
|
|
32
|
+
# @private
|
|
33
|
+
# Initialize the mixin bindings configuration
|
|
34
|
+
#
|
|
35
|
+
def self.configure
|
|
36
|
+
@configure ||= begin
|
|
37
|
+
namespace = ["Google", "Cloud", "BinaryAuthorization"]
|
|
38
|
+
parent_config = while namespace.any?
|
|
39
|
+
parent_name = namespace.join "::"
|
|
40
|
+
parent_const = const_get parent_name
|
|
41
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
42
|
+
namespace.pop
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config
|
|
46
|
+
default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [
|
|
47
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
|
48
|
+
uri_method: :get,
|
|
49
|
+
uri_template: "/v1/{resource}:getIamPolicy",
|
|
50
|
+
matches: [
|
|
51
|
+
["resource", %r{^projects/[^/]+/policy/?$}, false]
|
|
52
|
+
],
|
|
53
|
+
body: nil
|
|
54
|
+
),
|
|
55
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
|
56
|
+
uri_method: :get,
|
|
57
|
+
uri_template: "/v1/{resource}:getIamPolicy",
|
|
58
|
+
matches: [
|
|
59
|
+
["resource", %r{^projects/[^/]+/attestors/[^/]+/?$}, false]
|
|
60
|
+
],
|
|
61
|
+
body: nil
|
|
62
|
+
)
|
|
63
|
+
]
|
|
64
|
+
default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [
|
|
65
|
+
|
|
66
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
|
67
|
+
uri_method: :post,
|
|
68
|
+
uri_template: "/v1/{resource}:setIamPolicy",
|
|
69
|
+
matches: [
|
|
70
|
+
["resource", %r{^projects/[^/]+/policy/?$}, false]
|
|
71
|
+
],
|
|
72
|
+
body: "*"
|
|
73
|
+
),
|
|
74
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
|
75
|
+
uri_method: :post,
|
|
76
|
+
uri_template: "/v1/{resource}:setIamPolicy",
|
|
77
|
+
matches: [
|
|
78
|
+
["resource", %r{^projects/[^/]+/attestors/[^/]+/?$}, false]
|
|
79
|
+
],
|
|
80
|
+
body: "*"
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [
|
|
84
|
+
|
|
85
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
|
86
|
+
uri_method: :post,
|
|
87
|
+
uri_template: "/v1/{resource}:testIamPermissions",
|
|
88
|
+
matches: [
|
|
89
|
+
["resource", %r{^projects/[^/]+/policy/?$}, false]
|
|
90
|
+
],
|
|
91
|
+
body: "*"
|
|
92
|
+
),
|
|
93
|
+
Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
|
|
94
|
+
uri_method: :post,
|
|
95
|
+
uri_template: "/v1/{resource}:testIamPermissions",
|
|
96
|
+
matches: [
|
|
97
|
+
["resource", %r{^projects/[^/]+/attestors/[^/]+/?$}, false]
|
|
98
|
+
],
|
|
99
|
+
body: "*"
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
default_config
|
|
103
|
+
end
|
|
104
|
+
yield @configure if block_given?
|
|
105
|
+
@configure
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
require "google/cloud/binary_authorization/v1/binauthz_management_service/rest"
|
|
20
20
|
require "google/cloud/binary_authorization/v1/system_policy/rest"
|
|
21
21
|
require "google/cloud/binary_authorization/v1/validation_helper/rest"
|
|
22
|
+
require "google/cloud/binary_authorization/v1/bindings_override"
|
|
22
23
|
require "google/cloud/binary_authorization/v1/version"
|
|
23
24
|
|
|
24
25
|
module Google
|