Reference documentation and code samples for the Binary Authorization V1 API class Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.
Client for the ValidationHelper service.
BinAuthz Attestor verification
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ValidationHelper Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ValidationHelper clients ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ValidationHelper Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#initialize
def initialize() { |config| ... } -> Client
Create a new ValidationHelper client object.
- (config) — Configure the ValidationHelper client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new # Create a client using a custom configuration client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| config.timeout = 10.0 end
#validate_attestation_occurrence
def validate_attestation_occurrence(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse
def validate_attestation_occurrence(attestor: nil, attestation: nil, occurrence_note: nil, occurrence_resource_uri: nil) -> ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse
Returns whether the given Attestation for the given image URI was signed by the given Attestor
def validate_attestation_occurrence(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse
validate_attestation_occurrence
via a request object, either of type
Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest or an equivalent Hash.
- request (::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def validate_attestation_occurrence(attestor: nil, attestation: nil, occurrence_note: nil, occurrence_resource_uri: nil) -> ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse
validate_attestation_occurrence
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
attestor (::String) — Required. The resource name of the Attestor of the
[occurrence][grafeas.v1.Occurrence], in the format
projects/*/attestors/*
. - attestation (::Grafeas::V1::AttestationOccurrence, ::Hash) — Required. An AttestationOccurrence to be checked that it can be verified by the Attestor. It does not have to be an existing entity in Container Analysis. It must otherwise be a valid AttestationOccurrence.
- occurrence_note (::String) — Required. The resource name of the [Note][grafeas.v1.Note] to which the containing [Occurrence][grafeas.v1.Occurrence] is associated.
- occurrence_resource_uri (::String) — Required. The URI of the artifact (e.g. container image) that is the subject of the containing [Occurrence][grafeas.v1.Occurrence].
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/binary_authorization/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new # Call the validate_attestation_occurrence method. result = client.validate_attestation_occurrence request # The returned object is of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse. p result