Skip to main content

components

Creates, updates, deletes, gets or lists a components resource.

Overview

Namecomponents
TypeResource
Idazure.application_insights.components

Fields

The following fields are returned by SELECT queries:

An Application Insights Component definition.

NameDatatypeDescription
idstringAzure resource Id
namestringAzure resource name
etagstringResource etag
kindstringThe kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone.
locationstringResource location
propertiesobjectProperties that define an Application Insights component resource.
tagsResource tags
typestringAzure resource type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, subscriptionId, resourceNameReturns an Application Insights component.
list_by_resource_groupselectresourceGroupName, subscriptionIdGets a list of Application Insights components within a resource group.
listselectsubscriptionIdGets a list of all Application Insights components within a subscription.
create_or_updateinsertresourceGroupName, subscriptionId, resourceName, data__kindCreates (or updates) an Application Insights component. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation.
deletedeleteresourceGroupName, subscriptionId, resourceNameDeletes an Application Insights component.
update_tagsexecresourceGroupName, subscriptionId, resourceNameUpdates an existing component's tags. To update other fields use the CreateOrUpdate method.
purgeexecresourceGroupName, subscriptionId, resourceName, table, filtersPurges data in an Application Insights component by a set of user-defined filters.

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected.
Note: this operation is intended for Classic resources, for workspace-based Application Insights resource please run purge operation (directly on the workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific resource id.

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.

NameDatatypeDescription
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
resourceNamestringThe name of the Application Insights component resource.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Returns an Application Insights component.

SELECT
id,
name,
etag,
kind,
location,
properties,
tags,
type
FROM azure.application_insights.components
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND resourceName = '{{ resourceName }}' -- required
;

INSERT examples

Creates (or updates) an Application Insights component. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation.

INSERT INTO azure.application_insights.components (
data__kind,
data__etag,
data__properties,
data__location,
data__tags,
resourceGroupName,
subscriptionId,
resourceName
)
SELECT
'{{ kind }}' /* required */,
'{{ etag }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ resourceName }}'
RETURNING
id,
name,
etag,
kind,
location,
properties,
tags,
type
;

DELETE examples

Deletes an Application Insights component.

DELETE FROM azure.application_insights.components
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND resourceName = '{{ resourceName }}' --required
;

Lifecycle Methods

Updates an existing component's tags. To update other fields use the CreateOrUpdate method.

EXEC azure.application_insights.components.update_tags 
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@resourceName='{{ resourceName }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;