api_keys
Creates, updates, deletes, gets or lists a api_keys
resource.
Overview
Name | api_keys |
Type | Resource |
Id | azure.application_insights.api_keys |
Fields
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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | keyId, resourceGroupName, resourceName, subscriptionId | Get the API Key for this key id. |
list | SELECT | resourceGroupName, resourceName, subscriptionId | Gets a list of API keys of an Application Insights component. |
create | INSERT | resourceGroupName, resourceName, subscriptionId | Create an API Key of an Application Insights component. |
delete | DELETE | keyId, resourceGroupName, resourceName, subscriptionId | Delete an API Key of an Application Insights component. |
SELECT
examples
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 }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new api_keys
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.application_insights.api_keys (
resourceGroupName,
resourceName,
subscriptionId,
name,
linkedReadProperties,
linkedWriteProperties
)
SELECT
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ name }}',
'{{ linkedReadProperties }}',
'{{ linkedWriteProperties }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: linkedReadProperties
value:
- string
- name: linkedWriteProperties
value:
- string
DELETE
example
Deletes the specified api_keys
resource.
/*+ delete */
DELETE FROM azure.application_insights.api_keys
WHERE keyId = '{{ keyId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';