API Keys v2 API - Class ApiKeys.ApiKeysBase (1.2.0)

[BindServiceMethod(typeof(ApiKeys), "BindService")]
public abstract class ApiKeys.ApiKeysBase

Reference documentation and code samples for the API Keys v2 API class ApiKeys.ApiKeysBase.

Base class for server-side implementations of ApiKeys

Inheritance

object > ApiKeys.ApiKeysBase

Namespace

Google.Cloud.ApiKeys.V2

Assembly

Google.Cloud.ApiKeys.V2.dll

Methods

CreateKey(CreateKeyRequest, ServerCallContext)

public virtual Task<Operation> CreateKey(CreateKeyRequest request, ServerCallContext context)

Creates a new API key.

NOTE: Key is a global resource; hence the only supported value for location is global.

Parameters
NameDescription
requestCreateKeyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

DeleteKey(DeleteKeyRequest, ServerCallContext)

public virtual Task<Operation> DeleteKey(DeleteKeyRequest request, ServerCallContext context)

Deletes an API key. Deleted key can be retrieved within 30 days of deletion. Afterward, key will be purged from the project.

NOTE: Key is a global resource; hence the only supported value for location is global.

Parameters
NameDescription
requestDeleteKeyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

GetKey(GetKeyRequest, ServerCallContext)

public virtual Task<Key> GetKey(GetKeyRequest request, ServerCallContext context)

Gets the metadata for an API key. The key string of the API key isn't included in the response.

NOTE: Key is a global resource; hence the only supported value for location is global.

Parameters
NameDescription
requestGetKeyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskKey

The response to send back to the client (wrapped by a task).

GetKeyString(GetKeyStringRequest, ServerCallContext)

public virtual Task<GetKeyStringResponse> GetKeyString(GetKeyStringRequest request, ServerCallContext context)

Get the key string for an API key.

NOTE: Key is a global resource; hence the only supported value for location is global.

Parameters
NameDescription
requestGetKeyStringRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskGetKeyStringResponse

The response to send back to the client (wrapped by a task).

ListKeys(ListKeysRequest, ServerCallContext)

public virtual Task<ListKeysResponse> ListKeys(ListKeysRequest request, ServerCallContext context)

Lists the API keys owned by a project. The key string of the API key isn't included in the response.

NOTE: Key is a global resource; hence the only supported value for location is global.

Parameters
NameDescription
requestListKeysRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskListKeysResponse

The response to send back to the client (wrapped by a task).

LookupKey(LookupKeyRequest, ServerCallContext)

public virtual Task<LookupKeyResponse> LookupKey(LookupKeyRequest request, ServerCallContext context)

Find the parent project and resource name of the API key that matches the key string in the request. If the API key has been purged, resource name will not be set. The service account must have the apikeys.keys.lookup permission on the parent project.

Parameters
NameDescription
requestLookupKeyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskLookupKeyResponse

The response to send back to the client (wrapped by a task).

UndeleteKey(UndeleteKeyRequest, ServerCallContext)

public virtual Task<Operation> UndeleteKey(UndeleteKeyRequest request, ServerCallContext context)

Undeletes an API key which was deleted within 30 days.

NOTE: Key is a global resource; hence the only supported value for location is global.

Parameters
NameDescription
requestUndeleteKeyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).

UpdateKey(UpdateKeyRequest, ServerCallContext)

public virtual Task<Operation> UpdateKey(UpdateKeyRequest request, ServerCallContext context)

Patches the modifiable fields of an API key. The key string of the API key isn't included in the response.

NOTE: Key is a global resource; hence the only supported value for location is global.

Parameters
NameDescription
requestUpdateKeyRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskOperation

The response to send back to the client (wrapped by a task).