public sealed class ApiKeysClientImpl : ApiKeysClientReference documentation and code samples for the API Keys v2 API class ApiKeysClientImpl.
ApiKeys client wrapper implementation, for convenient use.
Namespace
Google.Cloud.ApiKeys.V2Assembly
Google.Cloud.ApiKeys.V2.dll
Remarks
Manages the API keys associated with projects.
Constructors
ApiKeysClientImpl(ApiKeys.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 |
ApiKeys.ApiKeysClientThe underlying gRPC client. |
settings |
ApiKeysSettingsThe base ApiKeysSettings used within this client. |
logger |
ILoggerOptional 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 |
|
DeleteKeyOperationsClient
public override OperationsClient DeleteKeyOperationsClient { get; }The long-running operations client for DeleteKey.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public override ApiKeys.ApiKeysClient GrpcClient { get; }The underlying gRPC ApiKeys client
| Property Value | |
|---|---|
| Type | Description |
ApiKeys.ApiKeysClient |
|
UndeleteKeyOperationsClient
public override OperationsClient UndeleteKeyOperationsClient { get; }The long-running operations client for UndeleteKey.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
UpdateKeyOperationsClient
public override OperationsClient UpdateKeyOperationsClient { get; }The long-running operations client for UpdateKey.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
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 |
CreateKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Operation<Key, Empty> |
The RPC response. |
CreateKeyAsync(CreateKeyRequest, CallSettings)
public override async 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 |
CreateKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Key, Empty>> |
A Task containing the RPC response. |
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 |
DeleteKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Operation<Key, Empty> |
The RPC response. |
DeleteKeyAsync(DeleteKeyRequest, CallSettings)
public override async 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 |
DeleteKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Key, Empty>> |
A Task containing the RPC response. |
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 |
GetKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Key |
The RPC response. |
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 |
GetKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Key> |
A Task containing the RPC response. |
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 |
GetKeyStringRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
GetKeyStringResponse |
The RPC response. |
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 |
GetKeyStringRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<GetKeyStringResponse> |
A Task containing the RPC response. |
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 |
ListKeysRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerable<ListKeysResponse, Key> |
A pageable sequence of Key resources. |
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 |
ListKeysRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerable<ListKeysResponse, Key> |
A pageable asynchronous sequence of Key resources. |
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 |
LookupKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
LookupKeyResponse |
The RPC response. |
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 |
LookupKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<LookupKeyResponse> |
A Task containing the RPC response. |
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 |
UndeleteKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Operation<Key, Empty> |
The RPC response. |
UndeleteKeyAsync(UndeleteKeyRequest, CallSettings)
public override async 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 |
UndeleteKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Key, Empty>> |
A Task containing the RPC response. |
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 |
UpdateKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Operation<Key, Empty> |
The RPC response. |
UpdateKeyAsync(UpdateKeyRequest, CallSettings)
public override async 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 |
UpdateKeyRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task<Operation<Key, Empty>> |
A Task containing the RPC response. |