Confidential Computing V1 API - Class Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Client (v0.5.0)
Stay organized with collections
Save and categorize content based on your preferences.
Reference documentation and code samples for the Confidential Computing V1 API class Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Client.
Client for the ConfidentialComputing service.
Service describing handlers for resources
Inherits
- Object
Methods
.configure
defself.configure(){|config|...}->Client::ConfigurationConfigure the ConfidentialComputing Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ConfidentialComputing clients ::Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Client.configuredo|config| config.timeout=10.0 end
#configure
defconfigure(){|config|...}->Client::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_challenge
defcreate_challenge(request,options=nil)->::Google::Cloud::ConfidentialComputing::V1::Challenge
defcreate_challenge(parent:nil,challenge:nil)->::Google::Cloud::ConfidentialComputing::V1::ChallengeCreates a new Challenge in a given project and location.
defcreate_challenge(request,options=nil)->::Google::Cloud::ConfidentialComputing::V1::Challengecreate_challenge via a request object, either of type
Google::Cloud::ConfidentialComputing::V1::CreateChallengeRequest or an equivalent Hash.
- 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.
defcreate_challenge(parent:nil,challenge:nil)->::Google::Cloud::ConfidentialComputing::V1::Challengecreate_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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::ConfidentialComputing::V1::Challenge)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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_challengerequest # The returned object is of type Google::Cloud::ConfidentialComputing::V1::Challenge. presult
#initialize
definitialize(){|config|...}->ClientCreate a new ConfidentialComputing client object.
- (config) — Configure the ConfidentialComputing client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client=::Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Client.new # Create a client using a custom configuration client=::Google::Cloud::ConfidentialComputing::V1::ConfidentialComputing::Client.newdo|config| config.timeout=10.0 end
#location_client
deflocation_client()->Google::Cloud::Location::Locations::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#verify_attestation
defverify_attestation(request,options=nil)->::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse
defverify_attestation(challenge:nil,gcp_credentials:nil,tpm_attestation:nil,confidential_space_info:nil,token_options:nil)->::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponseVerifies the provided attestation info, returning a signed OIDC token.
defverify_attestation(request,options=nil)->::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponseverify_attestation via a request object, either of type
VerifyAttestationRequest or an equivalent Hash.
- 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.
defverify_attestation(challenge:nil,gcp_credentials:nil,tpm_attestation:nil,confidential_space_info:nil,token_options:nil)->::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponseverify_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).
-
challenge (::String) — Required. The name of the Challenge whose nonce was used to generate the
attestation, in the format
projects/*/locations/*/challenges/*. The provided Challenge will be consumed, and cannot be used again. - gcp_credentials (::Google::Cloud::ConfidentialComputing::V1::GcpCredentials, ::Hash) — Optional. Credentials used to populate the "emails" claim in the claims_token.
- tpm_attestation (::Google::Cloud::ConfidentialComputing::V1::TpmAttestation, ::Hash) — Required. The TPM-specific data provided by the attesting platform, used to populate any of the claims regarding platform state.
- confidential_space_info (::Google::Cloud::ConfidentialComputing::V1::ConfidentialSpaceInfo, ::Hash) — Optional. Optional information related to the Confidential Space TEE.
- token_options (::Google::Cloud::ConfidentialComputing::V1::TokenOptions, ::Hash) — Optional. A collection of optional, workload-specified claims that modify the token output.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::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_attestationrequest # The returned object is of type Google::Cloud::ConfidentialComputing::V1::VerifyAttestationResponse. presult