Binary Authorization V1 API - Class Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client (v0.2.0)

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.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#initialize

def initialize() { |config| ... } -> Client

Create a new ValidationHelper client object.

Yields
  • (config) — Configure the ValidationHelper client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# 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

Overloads
def validate_attestation_occurrence(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse
Pass arguments to validate_attestation_occurrence via a request object, either of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest or an equivalent Hash.
Parameters
def validate_attestation_occurrence(attestor: nil, attestation: nil, occurrence_note: nil, occurrence_resource_uri: nil) -> ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse
Pass arguments to 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).
Parameters
  • 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].
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

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