API Keys v2 API - Class ApiKeysClientImpl (1.4.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
Name Description
grpcClient ApiKeysApiKeysClient

The underlying gRPC client.

settings ApiKeysSettings

The base ApiKeysSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

CreateKeyOperationsClient

public override OperationsClient CreateKeyOperationsClient { get; }

The long-running operations client for CreateKey.

Property Value
Type Description
OperationsClient
Overrides

DeleteKeyOperationsClient

public override OperationsClient DeleteKeyOperationsClient { get; }

The long-running operations client for DeleteKey.

Property Value
Type Description
OperationsClient
Overrides

GrpcClient

public override ApiKeys.ApiKeysClient GrpcClient { get; }

The underlying gRPC ApiKeys client

Property Value
Type Description
ApiKeysApiKeysClient
Overrides

UndeleteKeyOperationsClient

public override OperationsClient UndeleteKeyOperationsClient { get; }

The long-running operations client for UndeleteKey.

Property Value
Type Description
OperationsClient
Overrides

UpdateKeyOperationsClient

public override OperationsClient UpdateKeyOperationsClient { get; }

The long-running operations client for UpdateKey.

Property Value
Type Description
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
Name Description
request CreateKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request CreateKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request DeleteKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request DeleteKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request GetKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request GetKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request GetKeyStringRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request GetKeyStringRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ListKeysRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ListKeysRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request LookupKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request LookupKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request UndeleteKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request UndeleteKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request UpdateKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request UpdateKeyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationKeyEmpty

A Task containing the RPC response.

Overrides