When you add, update, or delete an API key,
the changes might not be immediately visible.
This method lets you wait until the operation is fully processed.
Usage
The Dart API client has three separate functions,
one for each operation.
Wait until an API key is created:
C#
Dart
Go
Java
JavaScript
Kotlin
PHP
Python
Ruby
Scala
Swift
var response = await client . WaitForApiKeyAsync (
"api-key-add-operation-test-csharp" ,
Enum . Parse < ApiKeyOperation >( "Add" )
);
Wait until an API key is updated:
C#
Dart
Go
Java
JavaScript
Kotlin
PHP
Python
Ruby
Scala
Swift
var response = await client . WaitForApiKeyAsync (
"api-key-update-operation-test-csharp" ,
Enum . Parse < ApiKeyOperation >( "Update" ),
new ApiKey
{
Description = "my updated api key" ,
Acl = new List < Acl >
{
Enum . Parse < Acl >( "Search" ),
Enum . Parse < Acl >( "AddObject" ),
Enum . Parse < Acl >( "DeleteObject" ),
},
Indexes = new List < string > { "Movies" , "Books" },
Referers = new List < string > { "*google.com" , "*algolia.com" },
Validity = 305 ,
MaxQueriesPerIPPerHour = 95 ,
MaxHitsPerQuery = 20 ,
}
);
Wait until an API key is deleted:
C#
Dart
Go
Java
JavaScript
Kotlin
PHP
Python
Ruby
Scala
Swift
var response = await client . WaitForApiKeyAsync (
"api-key-delete-operation-test-csharp" ,
Enum . Parse < ApiKeyOperation >( "Delete" )
);
Parameters
C#
Dart
Go
Java
JavaScript
Kotlin
PHP
Python
Ruby
Scala
Swift
Operation type to wait for.
One of: ApiKeyOperation.Add
,
ApiKeyOperation.Update
,
or ApiKeyOperation.Delete
.
API key object.
Required for Update
operations.
For details about the API key properties, see Update API key . Maximum number of retries for checking the status.
Returns a timeout based on the current number of iterations.
Parameter that can be used as a signal to cancel the request.