API Keys v2 API - Class ApiKeysClientImpl (1.3.0)

public sealed class ApiKeysClientImpl : ApiKeysClient

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

ApiKeys client wrapper implementation, for convenient use.

Inheritance

object > ApiKeysClient > ApiKeysClientImpl

Namespace

Google.Cloud.ApiKeys.V2

Assembly

Google.Cloud.ApiKeys.V2.dll

Remarks

Manages the API keys associated with projects.

Constructors

ApiKeysClientImpl(ApiKeysClient, ApiKeysSettings, ILogger)

public ApiKeysClientImpl(ApiKeys.ApiKeysClient grpcClient, ApiKeysSettings settings, ILogger logger)

Constructs a client wrapper for the ApiKeys service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientApiKeysApiKeysClient

The underlying gRPC client.

settingsApiKeysSettings

The base ApiKeysSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

CreateKeyOperationsClient

public override OperationsClient CreateKeyOperationsClient { get; }

The long-running operations client for CreateKey.

Property Value
TypeDescription
OperationsClient
Overrides

DeleteKeyOperationsClient

public override OperationsClient DeleteKeyOperationsClient { get; }

The long-running operations client for DeleteKey.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override ApiKeys.ApiKeysClient GrpcClient { get; }

The underlying gRPC ApiKeys client

Property Value
TypeDescription
ApiKeysApiKeysClient
Overrides

UndeleteKeyOperationsClient

public override OperationsClient UndeleteKeyOperationsClient { get; }

The long-running operations client for UndeleteKey.

Property Value
TypeDescription
OperationsClient
Overrides

UpdateKeyOperationsClient

public override OperationsClient UpdateKeyOperationsClient { get; }

The long-running operations client for UpdateKey.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

CreateKey(CreateKeyRequest, CallSettings)

public override Operation<Key, Empty> CreateKey(CreateKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationKeyEmpty

The RPC response.

Overrides

CreateKeyAsync(CreateKeyRequest, CallSettings)

public override Task<Operation<Key, Empty>> CreateKeyAsync(CreateKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationKeyEmpty

A Task containing the RPC response.

Overrides

DeleteKey(DeleteKeyRequest, CallSettings)

public override Operation<Key, Empty> DeleteKey(DeleteKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationKeyEmpty

The RPC response.

Overrides

DeleteKeyAsync(DeleteKeyRequest, CallSettings)

public override Task<Operation<Key, Empty>> DeleteKeyAsync(DeleteKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationKeyEmpty

A Task containing the RPC response.

Overrides

GetKey(GetKeyRequest, CallSettings)

public override Key GetKey(GetKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Key

The RPC response.

Overrides

GetKeyAsync(GetKeyRequest, CallSettings)

public override Task<Key> GetKeyAsync(GetKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskKey

A Task containing the RPC response.

Overrides

GetKeyString(GetKeyStringRequest, CallSettings)

public override GetKeyStringResponse GetKeyString(GetKeyStringRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
GetKeyStringResponse

The RPC response.

Overrides

GetKeyStringAsync(GetKeyStringRequest, CallSettings)

public override Task<GetKeyStringResponse> GetKeyStringAsync(GetKeyStringRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGetKeyStringResponse

A Task containing the RPC response.

Overrides

ListKeys(ListKeysRequest, CallSettings)

public override PagedEnumerable<ListKeysResponse, Key> ListKeys(ListKeysRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListKeysResponseKey

A pageable sequence of Key resources.

Overrides

ListKeysAsync(ListKeysRequest, CallSettings)

public override PagedAsyncEnumerable<ListKeysResponse, Key> ListKeysAsync(ListKeysRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListKeysResponseKey

A pageable asynchronous sequence of Key resources.

Overrides

LookupKey(LookupKeyRequest, CallSettings)

public override LookupKeyResponse LookupKey(LookupKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
LookupKeyResponse

The RPC response.

Overrides

LookupKeyAsync(LookupKeyRequest, CallSettings)

public override Task<LookupKeyResponse> LookupKeyAsync(LookupKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskLookupKeyResponse

A Task containing the RPC response.

Overrides

UndeleteKey(UndeleteKeyRequest, CallSettings)

public override Operation<Key, Empty> UndeleteKey(UndeleteKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationKeyEmpty

The RPC response.

Overrides

UndeleteKeyAsync(UndeleteKeyRequest, CallSettings)

public override Task<Operation<Key, Empty>> UndeleteKeyAsync(UndeleteKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationKeyEmpty

A Task containing the RPC response.

Overrides

UpdateKey(UpdateKeyRequest, CallSettings)

public override Operation<Key, Empty> UpdateKey(UpdateKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationKeyEmpty

The RPC response.

Overrides

UpdateKeyAsync(UpdateKeyRequest, CallSettings)

public override Task<Operation<Key, Empty>> UpdateKeyAsync(UpdateKeyRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationKeyEmpty

A Task containing the RPC response.

Overrides