Confidential Computing v1 API - Class ConfidentialComputingClient (1.2.0)

public abstract class ConfidentialComputingClient

Reference documentation and code samples for the Confidential Computing v1 API class ConfidentialComputingClient.

ConfidentialComputing client wrapper, for convenient use.

Inheritance

object > ConfidentialComputingClient

Namespace

Google.Cloud.ConfidentialComputing.V1

Assembly

Google.Cloud.ConfidentialComputing.V1.dll

Remarks

Service describing handlers for resources

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ConfidentialComputing service, which is a host of "confidentialcomputing.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ConfidentialComputing scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default ConfidentialComputing scopes are:

GrpcClient

public virtual ConfidentialComputing.ConfidentialComputingClient GrpcClient { get; }

The underlying gRPC ConfidentialComputing client

Property Value
TypeDescription
ConfidentialComputingConfidentialComputingClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static ConfidentialComputingClient Create()

Synchronously creates a ConfidentialComputingClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ConfidentialComputingClientBuilder.

Returns
TypeDescription
ConfidentialComputingClient

The created ConfidentialComputingClient.

CreateAsync(CancellationToken)

public static Task<ConfidentialComputingClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a ConfidentialComputingClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ConfidentialComputingClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskConfidentialComputingClient

The task representing the created ConfidentialComputingClient.

CreateChallenge(LocationName, Challenge, CallSettings)

public virtual Challenge CreateChallenge(LocationName parent, Challenge challenge, CallSettings callSettings = null)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
parentLocationName

Required. The resource name of the location where the Challenge will be used, in the format projects/*/locations/*.

challengeChallenge

Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Challenge

The RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = ConfidentialComputingClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Challenge challenge = new Challenge();
// Make the request
Challenge response = confidentialComputingClient.CreateChallenge(parent, challenge);

CreateChallenge(CreateChallengeRequest, CallSettings)

public virtual Challenge CreateChallenge(CreateChallengeRequest request, CallSettings callSettings = null)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
requestCreateChallengeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Challenge

The RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = ConfidentialComputingClient.Create();
// Initialize request argument(s)
CreateChallengeRequest request = new CreateChallengeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Challenge = new Challenge(),
};
// Make the request
Challenge response = confidentialComputingClient.CreateChallenge(request);

CreateChallenge(string, Challenge, CallSettings)

public virtual Challenge CreateChallenge(string parent, Challenge challenge, CallSettings callSettings = null)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
parentstring

Required. The resource name of the location where the Challenge will be used, in the format projects/*/locations/*.

challengeChallenge

Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Challenge

The RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = ConfidentialComputingClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Challenge challenge = new Challenge();
// Make the request
Challenge response = confidentialComputingClient.CreateChallenge(parent, challenge);

CreateChallengeAsync(LocationName, Challenge, CallSettings)

public virtual Task<Challenge> CreateChallengeAsync(LocationName parent, Challenge challenge, CallSettings callSettings = null)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
parentLocationName

Required. The resource name of the location where the Challenge will be used, in the format projects/*/locations/*.

challengeChallenge

Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskChallenge

A Task containing the RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = await ConfidentialComputingClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Challenge challenge = new Challenge();
// Make the request
Challenge response = await confidentialComputingClient.CreateChallengeAsync(parent, challenge);

CreateChallengeAsync(LocationName, Challenge, CancellationToken)

public virtual Task<Challenge> CreateChallengeAsync(LocationName parent, Challenge challenge, CancellationToken cancellationToken)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
parentLocationName

Required. The resource name of the location where the Challenge will be used, in the format projects/*/locations/*.

challengeChallenge

Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskChallenge

A Task containing the RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = await ConfidentialComputingClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Challenge challenge = new Challenge();
// Make the request
Challenge response = await confidentialComputingClient.CreateChallengeAsync(parent, challenge);

CreateChallengeAsync(CreateChallengeRequest, CallSettings)

public virtual Task<Challenge> CreateChallengeAsync(CreateChallengeRequest request, CallSettings callSettings = null)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
requestCreateChallengeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskChallenge

A Task containing the RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = await ConfidentialComputingClient.CreateAsync();
// Initialize request argument(s)
CreateChallengeRequest request = new CreateChallengeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Challenge = new Challenge(),
};
// Make the request
Challenge response = await confidentialComputingClient.CreateChallengeAsync(request);

CreateChallengeAsync(CreateChallengeRequest, CancellationToken)

public virtual Task<Challenge> CreateChallengeAsync(CreateChallengeRequest request, CancellationToken cancellationToken)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
requestCreateChallengeRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskChallenge

A Task containing the RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = await ConfidentialComputingClient.CreateAsync();
// Initialize request argument(s)
CreateChallengeRequest request = new CreateChallengeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Challenge = new Challenge(),
};
// Make the request
Challenge response = await confidentialComputingClient.CreateChallengeAsync(request);

CreateChallengeAsync(string, Challenge, CallSettings)

public virtual Task<Challenge> CreateChallengeAsync(string parent, Challenge challenge, CallSettings callSettings = null)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
parentstring

Required. The resource name of the location where the Challenge will be used, in the format projects/*/locations/*.

challengeChallenge

Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskChallenge

A Task containing the RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = await ConfidentialComputingClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Challenge challenge = new Challenge();
// Make the request
Challenge response = await confidentialComputingClient.CreateChallengeAsync(parent, challenge);

CreateChallengeAsync(string, Challenge, CancellationToken)

public virtual Task<Challenge> CreateChallengeAsync(string parent, Challenge challenge, CancellationToken cancellationToken)

Creates a new Challenge in a given project and location.

Parameters
NameDescription
parentstring

Required. The resource name of the location where the Challenge will be used, in the format projects/*/locations/*.

challengeChallenge

Required. The Challenge to be created. Currently this field can be empty as all the Challenge fields are set by the server.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskChallenge

A Task containing the RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = await ConfidentialComputingClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Challenge challenge = new Challenge();
// Make the request
Challenge response = await confidentialComputingClient.CreateChallengeAsync(parent, challenge);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

VerifyAttestation(VerifyAttestationRequest, CallSettings)

public virtual VerifyAttestationResponse VerifyAttestation(VerifyAttestationRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestVerifyAttestationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
VerifyAttestationResponse

The RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = ConfidentialComputingClient.Create();
// Initialize request argument(s)
VerifyAttestationRequest request = new VerifyAttestationRequest
{
    ChallengeAsChallengeName = ChallengeName.FromProjectLocationUuid("[PROJECT]", "[LOCATION]", "[UUID]"),
    GcpCredentials = new GcpCredentials(),
    TpmAttestation = new TpmAttestation(),
    ConfidentialSpaceInfo = new ConfidentialSpaceInfo(),
    TokenOptions = new TokenOptions(),
};
// Make the request
VerifyAttestationResponse response = confidentialComputingClient.VerifyAttestation(request);

VerifyAttestationAsync(VerifyAttestationRequest, CallSettings)

public virtual Task<VerifyAttestationResponse> VerifyAttestationAsync(VerifyAttestationRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestVerifyAttestationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskVerifyAttestationResponse

A Task containing the RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = await ConfidentialComputingClient.CreateAsync();
// Initialize request argument(s)
VerifyAttestationRequest request = new VerifyAttestationRequest
{
    ChallengeAsChallengeName = ChallengeName.FromProjectLocationUuid("[PROJECT]", "[LOCATION]", "[UUID]"),
    GcpCredentials = new GcpCredentials(),
    TpmAttestation = new TpmAttestation(),
    ConfidentialSpaceInfo = new ConfidentialSpaceInfo(),
    TokenOptions = new TokenOptions(),
};
// Make the request
VerifyAttestationResponse response = await confidentialComputingClient.VerifyAttestationAsync(request);

VerifyAttestationAsync(VerifyAttestationRequest, CancellationToken)

public virtual Task<VerifyAttestationResponse> VerifyAttestationAsync(VerifyAttestationRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestVerifyAttestationRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskVerifyAttestationResponse

A Task containing the RPC response.

Example
// Create client
ConfidentialComputingClient confidentialComputingClient = await ConfidentialComputingClient.CreateAsync();
// Initialize request argument(s)
VerifyAttestationRequest request = new VerifyAttestationRequest
{
    ChallengeAsChallengeName = ChallengeName.FromProjectLocationUuid("[PROJECT]", "[LOCATION]", "[UUID]"),
    GcpCredentials = new GcpCredentials(),
    TpmAttestation = new TpmAttestation(),
    ConfidentialSpaceInfo = new ConfidentialSpaceInfo(),
    TokenOptions = new TokenOptions(),
};
// Make the request
VerifyAttestationResponse response = await confidentialComputingClient.VerifyAttestationAsync(request);