shared_keys
Creates, updates, deletes, gets or lists a shared_keys resource.
Overview
| Name | shared_keys |
| Type | Resource |
| Id | azure.log_analytics.shared_keys |
Fields
The following fields are returned by SELECT queries:
- get_shared_keys
| Name | Datatype | Description |
|---|---|---|
primarySharedKey | string | The primary shared key of a workspace. |
secondarySharedKey | string | The secondary shared key of a workspace. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_shared_keys | select | resource_group_name, workspace_name, subscription_id | Gets the shared keys for a workspace. | |
regenerate | exec | resource_group_name, workspace_name, subscription_id | Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational Insights agents to the workspace. |
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 |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
workspace_name | string | The name of the workspace. Required. |
SELECT examples
- get_shared_keys
Gets the shared keys for a workspace.
SELECT
primarySharedKey,
secondarySharedKey
FROM azure.log_analytics.shared_keys
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lifecycle Methods
- regenerate
Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational Insights agents to the workspace.
EXEC azure.log_analytics.shared_keys.regenerate
@resource_group_name='{{ resource_group_name }}' --required,
@workspace_name='{{ workspace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;