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
The API Key for this key id.
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. |
A list containing 0 or more API key definitions of an Application Insights component.
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 | resourceGroupName , subscriptionId , resourceName , keyId | Get the API Key for this key id. | |
list | select | resourceGroupName , subscriptionId , resourceName | Gets a list of API keys of an Application Insights component. | |
create | insert | resourceGroupName , subscriptionId , resourceName | Create an API Key of an Application Insights component. | |
delete | delete | resourceGroupName , subscriptionId , resourceName , keyId | 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 |
---|---|---|
keyId | string | The API Key ID. This is unique within a Application Insights component. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
resourceName | string | The name of the Application Insights component resource. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
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 resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND keyId = '{{ keyId }}' -- 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 resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND resourceName = '{{ resourceName }}' -- required
;
INSERT
examples
- create
- Manifest
Create an API Key of an Application Insights component.
INSERT INTO azure.application_insights.api_keys (
data__name,
data__linkedReadProperties,
data__linkedWriteProperties,
resourceGroupName,
subscriptionId,
resourceName
)
SELECT
'{{ name }}',
'{{ linkedReadProperties }}',
'{{ linkedWriteProperties }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ resourceName }}'
RETURNING
id,
name,
apiKey,
createdDate,
linkedReadProperties,
linkedWriteProperties
;
# Description fields are for documentation purposes
- name: api_keys
props:
- name: resourceGroupName
value: string
description: Required parameter for the api_keys resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the api_keys resource.
- name: resourceName
value: string
description: Required parameter for the api_keys resource.
- name: name
value: string
description: |
The name of the API Key.
- name: linkedReadProperties
value: array
description: |
The read access rights of this API Key.
- name: linkedWriteProperties
value: array
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 resourceGroupName = '{{ resourceGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND resourceName = '{{ resourceName }}' --required
AND keyId = '{{ keyId }}' --required
;