api_keys
Creates, updates, deletes, gets or lists an api_keys resource.
Overview
| Name | api_keys |
| Type | Resource |
| Id | azure.application_insights.api_keys |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the API key inside an Application Insights component. It is auto generated when the API key is created. |
name | string | The name of the API key. |
apiKey | string | The API key value. It will be only return once when the API Key was created. |
createdDate | string | The create date of this API key. |
linkedReadProperties | array | The read access rights of this API Key. |
linkedWriteProperties | array | The write access rights of this API Key. |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the API key inside an Application Insights component. It is auto generated when the API key is created. |
name | string | The name of the API key. |
apiKey | string | The API key value. It will be only return once when the API Key was created. |
createdDate | string | The create date of this API key. |
linkedReadProperties | array | The read access rights of this API Key. |
linkedWriteProperties | array | The write access rights of this API Key. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, resource_name, key_id, subscription_id | Get the API Key for this key id. | |
list | select | resource_group_name, resource_name, subscription_id | Gets a list of API keys of an Application Insights component. | |
create | insert | resource_group_name, resource_name, subscription_id | Create an API Key of an Application Insights component. | |
delete | delete | resource_group_name, resource_name, key_id, subscription_id | Delete an API Key of an Application Insights component. |
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 |
|---|---|---|
key_id | string | The API Key ID. This is unique within a Application Insights component. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
resource_name | string | The name of the Application Insights component resource. Required. |
subscription_id | string |
SELECT examples
- get
- list
Get the API Key for this key id.
SELECT
id,
name,
apiKey,
createdDate,
linkedReadProperties,
linkedWriteProperties
FROM azure.application_insights.api_keys
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND key_id = '{{ key_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets a list of API keys of an Application Insights component.
SELECT
id,
name,
apiKey,
createdDate,
linkedReadProperties,
linkedWriteProperties
FROM azure.application_insights.api_keys
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Create an API Key of an Application Insights component.
INSERT INTO azure.application_insights.api_keys (
name,
linkedReadProperties,
linkedWriteProperties,
resource_group_name,
resource_name,
subscription_id
)
SELECT
'{{ name }}',
'{{ linkedReadProperties }}',
'{{ linkedWriteProperties }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
apiKey,
createdDate,
linkedReadProperties,
linkedWriteProperties
;
# Description fields are for documentation purposes
- name: api_keys
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the api_keys resource.
- name: resource_name
value: "{{ resource_name }}"
description: Required parameter for the api_keys resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the api_keys resource.
- name: name
value: "{{ name }}"
description: |
The name of the API Key.
- name: linkedReadProperties
value:
- "{{ linkedReadProperties }}"
description: |
The read access rights of this API Key.
- name: linkedWriteProperties
value:
- "{{ linkedWriteProperties }}"
description: |
The write access rights of this API Key.
DELETE examples
- delete
Delete an API Key of an Application Insights component.
DELETE FROM azure.application_insights.api_keys
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND key_id = '{{ key_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;