Class: Google::Apis::BinaryauthorizationV1::BinaryAuthorizationService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::BinaryauthorizationV1::BinaryAuthorizationService
- Defined in:
- lib/google/apis/binaryauthorization_v1/service.rb
Overview
Binary Authorization API
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.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://binaryauthorization.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_project_attestor(parent, attestor_object = nil, attestor_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Attestor
Creates an attestor, and returns a copy of the new attestor.
-
#create_project_platform_policy(parent, platform_policy_object = nil, policy_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::PlatformPolicy
Creates a platform policy, and returns a copy of it.
-
#delete_project_attestor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Empty
Deletes an attestor.
-
#delete_project_platform_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Empty
Deletes a platform policy.
-
#evaluate_gke_policy(name, evaluate_gke_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::EvaluateGkePolicyResponse
Evaluates a Kubernetes object versus a GKE platform policy.
-
#get_project_attestor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Attestor
Gets an attestor.
-
#get_project_attestor_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::IamPolicy
Gets the access control policy for a resource.
-
#get_project_platform_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::PlatformPolicy
Gets a platform policy.
-
#get_project_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Policy
A policy specifies the attestors that must attest to a container image, before the project is allowed to deploy that image.
-
#get_project_policy_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::IamPolicy
Gets the access control policy for a resource.
-
#get_systempolicy_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Policy
Gets the current system policy in the specified location.
-
#initialize ⇒ BinaryAuthorizationService
constructor
A new instance of BinaryAuthorizationService.
-
#list_project_attestors(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::ListAttestorsResponse
Lists attestors.
-
#list_project_platform_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::ListPlatformPoliciesResponse
Lists platform policies owned by a project in the specified platform.
-
#replace_project_platform_policy_platform_policy(name, platform_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::PlatformPolicy
Replaces a platform policy.
-
#set_attestor_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::IamPolicy
Sets the access control policy on the specified resource.
-
#set_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::IamPolicy
Sets the access control policy on the specified resource.
-
#test_attestor_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource.
-
#test_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource.
-
#update_project_attestor(name, attestor_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Attestor
Updates an attestor.
-
#update_project_policy(name, policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Policy
Creates or updates a project's policy, and returns a copy of the new policy.
-
#validate_attestor_attestation_occurrence(attestor, validate_attestation_occurrence_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::ValidateAttestationOccurrenceResponse
Returns whether the given
Attestation
for the given image URI was signed by the givenAttestor
.
Constructor Details
#initialize ⇒ BinaryAuthorizationService
Returns a new instance of BinaryAuthorizationService.
49 50 51 52 53 54 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 49 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-binaryauthorization_v1', client_version: Google::Apis::BinaryauthorizationV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
42 43 44 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 42 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
47 48 49 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 47 def quota_user @quota_user end |
Instance Method Details
#create_project_attestor(parent, attestor_object = nil, attestor_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Attestor
Creates an attestor, and returns a copy of the new attestor. Returns
NOT_FOUND
if the project does not exist, INVALID_ARGUMENT
if the request is
malformed, ALREADY_EXISTS
if the attestor already exists.
153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 153 def create_project_attestor(parent, attestor_object = nil, attestor_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/attestors', ) command.request_representation = Google::Apis::BinaryauthorizationV1::Attestor::Representation command.request_object = attestor_object command.response_representation = Google::Apis::BinaryauthorizationV1::Attestor::Representation command.response_class = Google::Apis::BinaryauthorizationV1::Attestor command.params['parent'] = parent unless parent.nil? command.query['attestorId'] = attestor_id unless attestor_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_platform_policy(parent, platform_policy_object = nil, policy_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::PlatformPolicy
Creates a platform policy, and returns a copy of it. Returns NOT_FOUND
if
the project or platform doesn't exist, INVALID_ARGUMENT
if the request is
malformed, ALREADY_EXISTS
if the policy already exists, and
INVALID_ARGUMENT
if the policy contains a platform-specific policy that does
not match the platform value specified in the URL.
522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 522 def create_project_platform_policy(parent, platform_policy_object = nil, policy_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/policies', ) command.request_representation = Google::Apis::BinaryauthorizationV1::PlatformPolicy::Representation command.request_object = platform_policy_object command.response_representation = Google::Apis::BinaryauthorizationV1::PlatformPolicy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::PlatformPolicy command.params['parent'] = parent unless parent.nil? command.query['policyId'] = policy_id unless policy_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_attestor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Empty
Deletes an attestor. Returns NOT_FOUND
if the attestor does not exist.
187 188 189 190 191 192 193 194 195 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 187 def delete_project_attestor(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::BinaryauthorizationV1::Empty::Representation command.response_class = Google::Apis::BinaryauthorizationV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_platform_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Empty
Deletes a platform policy. Returns NOT_FOUND
if the policy doesn't exist.
559 560 561 562 563 564 565 566 567 568 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 559 def delete_project_platform_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::BinaryauthorizationV1::Empty::Representation command.response_class = Google::Apis::BinaryauthorizationV1::Empty command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#evaluate_gke_policy(name, evaluate_gke_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::EvaluateGkePolicyResponse
Evaluates a Kubernetes object versus a GKE platform policy. Returns NOT_FOUND
if the policy doesn't exist, INVALID_ARGUMENT
if the policy or request is
malformed and PERMISSION_DENIED
if the client does not have sufficient
permissions.
483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 483 def evaluate_gke_policy(name, evaluate_gke_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:evaluate', ) command.request_representation = Google::Apis::BinaryauthorizationV1::EvaluateGkePolicyRequest::Representation command.request_object = evaluate_gke_policy_request_object command.response_representation = Google::Apis::BinaryauthorizationV1::EvaluateGkePolicyResponse::Representation command.response_class = Google::Apis::BinaryauthorizationV1::EvaluateGkePolicyResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_attestor(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Attestor
Gets an attestor. Returns NOT_FOUND
if the attestor does not exist.
218 219 220 221 222 223 224 225 226 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 218 def get_project_attestor(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::BinaryauthorizationV1::Attestor::Representation command.response_class = Google::Apis::BinaryauthorizationV1::Attestor command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_attestor_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::IamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
262 263 264 265 266 267 268 269 270 271 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 262 def get_project_attestor_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', ) command.response_representation = Google::Apis::BinaryauthorizationV1::IamPolicy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::IamPolicy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = unless .nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_platform_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::PlatformPolicy
Gets a platform policy. Returns NOT_FOUND
if the policy doesn't exist.
591 592 593 594 595 596 597 598 599 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 591 def get_project_platform_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::BinaryauthorizationV1::PlatformPolicy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::PlatformPolicy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Policy
A policy specifies the attestors that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy. Gets the policy for this project. Returns a default policy if the project does not have one.
81 82 83 84 85 86 87 88 89 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 81 def get_project_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::BinaryauthorizationV1::Policy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_policy_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::IamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
710 711 712 713 714 715 716 717 718 719 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 710 def get_project_policy_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', ) command.response_representation = Google::Apis::BinaryauthorizationV1::IamPolicy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::IamPolicy command.params['resource'] = resource unless resource.nil? command.query['options.requestedPolicyVersion'] = unless .nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_systempolicy_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Policy
Gets the current system policy in the specified location.
818 819 820 821 822 823 824 825 826 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 818 def get_systempolicy_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::BinaryauthorizationV1::Policy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_attestors(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::ListAttestorsResponse
Lists attestors. Returns INVALID_ARGUMENT
if the project does not exist.
301 302 303 304 305 306 307 308 309 310 311 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 301 def list_project_attestors(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/attestors', ) command.response_representation = Google::Apis::BinaryauthorizationV1::ListAttestorsResponse::Representation command.response_class = Google::Apis::BinaryauthorizationV1::ListAttestorsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_platform_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::ListPlatformPoliciesResponse
Lists platform policies owned by a project in the specified platform. Returns
INVALID_ARGUMENT
if the project or the platform doesn't exist.
630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 630 def list_project_platform_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/policies', ) command.response_representation = Google::Apis::BinaryauthorizationV1::ListPlatformPoliciesResponse::Representation command.response_class = Google::Apis::BinaryauthorizationV1::ListPlatformPoliciesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#replace_project_platform_policy_platform_policy(name, platform_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::PlatformPolicy
Replaces a platform policy. Returns NOT_FOUND
if the policy doesn't exist.
664 665 666 667 668 669 670 671 672 673 674 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 664 def replace_project_platform_policy_platform_policy(name, platform_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v1/{+name}', ) command.request_representation = Google::Apis::BinaryauthorizationV1::PlatformPolicy::Representation command.request_object = platform_policy_object command.response_representation = Google::Apis::BinaryauthorizationV1::PlatformPolicy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::PlatformPolicy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_attestor_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::IamPolicy
Sets the access control policy on the specified resource. Replaces any
existing policy. Can return NOT_FOUND
, INVALID_ARGUMENT
, and
PERMISSION_DENIED
errors.
338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 338 def set_attestor_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::BinaryauthorizationV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::BinaryauthorizationV1::IamPolicy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::IamPolicy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::IamPolicy
Sets the access control policy on the specified resource. Replaces any
existing policy. Can return NOT_FOUND
, INVALID_ARGUMENT
, and
PERMISSION_DENIED
errors.
746 747 748 749 750 751 752 753 754 755 756 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 746 def set_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::BinaryauthorizationV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::BinaryauthorizationV1::IamPolicy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::IamPolicy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_attestor_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of permissions, not a
NOT_FOUND
error. Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization checking.
This operation may "fail open" without warning.
377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 377 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::BinaryauthorizationV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::BinaryauthorizationV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::BinaryauthorizationV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of permissions, not a
NOT_FOUND
error. Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization checking.
This operation may "fail open" without warning.
785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 785 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::BinaryauthorizationV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::BinaryauthorizationV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::BinaryauthorizationV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_project_attestor(name, attestor_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Attestor
Updates an attestor. Returns NOT_FOUND
if the attestor does not exist.
411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 411 def update_project_attestor(name, attestor_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v1/{+name}', ) command.request_representation = Google::Apis::BinaryauthorizationV1::Attestor::Representation command.request_object = attestor_object command.response_representation = Google::Apis::BinaryauthorizationV1::Attestor::Representation command.response_class = Google::Apis::BinaryauthorizationV1::Attestor command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_project_policy(name, policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::Policy
Creates or updates a project's policy, and returns a copy of the new policy. A
policy is always updated as a whole, to avoid race conditions with concurrent
policy enforcement (or management!) requests. Returns NOT_FOUND
if the
project does not exist, INVALID_ARGUMENT
if the request is malformed.
116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 116 def update_project_policy(name, policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v1/{+name}', ) command.request_representation = Google::Apis::BinaryauthorizationV1::Policy::Representation command.request_object = policy_object command.response_representation = Google::Apis::BinaryauthorizationV1::Policy::Representation command.response_class = Google::Apis::BinaryauthorizationV1::Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#validate_attestor_attestation_occurrence(attestor, validate_attestation_occurrence_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BinaryauthorizationV1::ValidateAttestationOccurrenceResponse
Returns whether the given Attestation
for the given image URI was signed by
the given Attestor
446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/google/apis/binaryauthorization_v1/service.rb', line 446 def validate_attestor_attestation_occurrence(attestor, validate_attestation_occurrence_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+attestor}:validateAttestationOccurrence', ) command.request_representation = Google::Apis::BinaryauthorizationV1::ValidateAttestationOccurrenceRequest::Representation command.request_object = validate_attestation_occurrence_request_object command.response_representation = Google::Apis::BinaryauthorizationV1::ValidateAttestationOccurrenceResponse::Representation command.response_class = Google::Apis::BinaryauthorizationV1::ValidateAttestationOccurrenceResponse command.params['attestor'] = attestor unless attestor.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |