query_keys
Creates, updates, deletes, gets or lists a query_keys
resource.
Overview
Name | query_keys |
Type | Resource |
Id | azure.search.query_keys |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the query API key. Query names are optional, but assigning a name can help you remember how it's used. |
key | string | The value of the query API key. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list_by_search_service | SELECT | resourceGroupName, searchServiceName, subscriptionId | Returns the list of query API keys for the given Azure AI Search service. |
create | INSERT | name, resourceGroupName, searchServiceName, subscriptionId | Generates a new query key for the specified search service. You can create up to 50 query keys per service. |
delete | DELETE | key, resourceGroupName, searchServiceName, subscriptionId | Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it. |
SELECT
examples
Returns the list of query API keys for the given Azure AI Search service.
SELECT
name,
key
FROM azure.search.query_keys
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND searchServiceName = '{{ searchServiceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new query_keys
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.search.query_keys (
name,
resourceGroupName,
searchServiceName,
subscriptionId
)
SELECT
'{{ name }}',
'{{ resourceGroupName }}',
'{{ searchServiceName }}',
'{{ subscriptionId }}'
;
- name: your_resource_model_name
props: []
DELETE
example
Deletes the specified query_keys
resource.
/*+ delete */
DELETE FROM azure.search.query_keys
WHERE key = '{{ key }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND searchServiceName = '{{ searchServiceName }}'
AND subscriptionId = '{{ subscriptionId }}';