admin_keys
Creates, updates, deletes, gets or lists an admin_keys
resource.
Overview
Name | admin_keys |
Type | Resource |
Id | azure.search.admin_keys |
Fields
The following fields are returned by SELECT
queries:
- get
The admin keys were successfully retrieved and are in the response. You can use either the primary or secondary key as the value of the 'api-key' parameter in the Azure AI Search service REST API or SDK to perform any operations on your search service, including privileged operations. Privileged operations include managing resources like indexes and data sources as well as uploading, modifying, or deleting data in your indexes.
Name | Datatype | Description |
---|---|---|
primaryKey | string | The primary admin API key of the search service. |
secondaryKey | string | The secondary admin API key of the search service. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , searchServiceName , subscriptionId | x-ms-client-request-id | Gets the primary and secondary admin API keys for the specified Azure AI Search service. |
regenerate | exec | resourceGroupName , searchServiceName , keyKind , subscriptionId | x-ms-client-request-id | Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
keyKind | string | Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. |
resourceGroupName | string | The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. |
searchServiceName | string | The name of the Azure AI Search service associated with the specified resource group. |
subscriptionId | string | The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. |
x-ms-client-request-id | string (uuid) | A client-generated GUID value that identifies this request. If specified, this will be included in response information as a way to track the request. |
SELECT
examples
- get
Gets the primary and secondary admin API keys for the specified Azure AI Search service.
SELECT
primaryKey,
secondaryKey
FROM azure.search.admin_keys
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND searchServiceName = '{{ searchServiceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND x-ms-client-request-id = '{{ x-ms-client-request-id }}'
;
Lifecycle Methods
- regenerate
Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
EXEC azure.search.admin_keys.regenerate
@resourceGroupName='{{ resourceGroupName }}' --required,
@searchServiceName='{{ searchServiceName }}' --required,
@keyKind='{{ keyKind }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@x-ms-client-request-id='{{ x-ms-client-request-id }}'
;