Confidential Computing V1 API - Class Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Rest::Client (v1.0.0)

Reference documentation and code samples for the Confidential Computing V1 API class Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Rest::Client.

REST client for the ConfidentialComputing service.

Service describing handlers for resources

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the ConfidentialComputing 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 ConfidentialComputing clients
::Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the ConfidentialComputing 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

#create_challenge

def create_challenge(request, options = nil) -> ::Google::Cloud::ConfidentialComputing::V1::Challenge
def create_challenge(parent: nil, challenge: nil) -> ::Google::Cloud::ConfidentialComputing::V1::Challenge

Creates a new Challenge in a given project and location.

Overloads
def create_challenge(request, options = nil) -> ::Google::Cloud::ConfidentialComputing::V1::Challenge
Pass arguments to create_challenge via a request object, either of type Google::Cloud::ConfidentialComputing::V1::CreateChallengeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ConfidentialComputing::V1::CreateChallengeRequest, ::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 create_challenge(parent: nil, challenge: nil) -> ::Google::Cloud::ConfidentialComputing::V1::Challenge
Pass arguments to create_challenge 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
  • parent (::String) — Required. The resource name of the location where the Challenge will be used, in the format projects/*/locations/*.
  • challenge (::Google::Cloud::ConfidentialComputing::V1::Challenge, ::Hash) — Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/confidential_computing/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ConfidentialComputing::V1::CreateChallengeRequest.new

# Call the create_challenge method.
result = client.create_challenge request

# The returned object is of type Google::Cloud::ConfidentialComputing::V1::Challenge.
p result

#initialize

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

Create a new ConfidentialComputing REST client object.

Yields
  • (config) — Configure the ConfidentialComputing client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Rest::Client.new do |config|
  config.timeout = 10.0
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#verify_attestation

def verify_attestation(request, options = nil) -> ::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse
def verify_attestation(challenge: nil, gcp_credentials: nil, tpm_attestation: nil, confidential_space_info: nil, token_options: nil) -> ::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse

Verifies the provided attestation info, returning a signed OIDC token.

Overloads
def verify_attestation(request, options = nil) -> ::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse
Pass arguments to verify_attestation via a request object, either of type VerifyAttestationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationRequest, ::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 verify_attestation(challenge: nil, gcp_credentials: nil, tpm_attestation: nil, confidential_space_info: nil, token_options: nil) -> ::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse
Pass arguments to verify_attestation 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
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/confidential_computing/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::ConfidentialComputing::V1::VerifyAttestationRequest.new

# Call the verify_attestation method.
result = client.verify_attestation request

# The returned object is of type Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse.
p result