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:

NameDatatypeDescription
statusstringStatus of the operation represented by the requested Id. Required. Known values are: "pending" and "completed". (pending, completed)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_purge_statusselectresource_group_name, resource_name, purge_id, subscription_idGet status for an ongoing purge operation.
getselectresource_group_name, resource_name, subscription_idReturns an Application Insights component.
list_by_resource_groupselectresource_group_name, subscription_idGets a list of Application Insights components within a resource group.
listselectsubscription_idGets a list of all Application Insights components within a subscription.
create_or_updateinsertresource_group_name, resource_name, subscription_id, location, kindCreates (or updates) an Application Insights component. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation.
update_tagsupdateresource_group_name, resource_name, subscription_idUpdates an existing component's tags. To update other fields use the CreateOrUpdate method.
create_or_updatereplaceresource_group_name, resource_name, subscription_id, location, kindCreates (or updates) an Application Insights component. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation.
purgedeleteresource_group_name, resource_name, subscription_idPurges 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.
deletedeleteresource_group_name, resource_name, subscription_idDeletes 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.

NameDatatypeDescription
purge_idstringIn a purge status request, this is the Id of the operation the status of which is returned. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the Application Insights component resource. Required.
subscription_idstring

SELECT examples

Get status for an ongoing purge operation.

SELECT
status
FROM azure.application_insights.components
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND purge_id = '{{ purge_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- 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 (
location,
tags,
kind,
etag,
properties,
resource_group_name,
resource_name,
subscription_id
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ kind }}' /* required */,
'{{ etag }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
kind,
location,
properties,
tags,
type
;

UPDATE examples

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

UPDATE azure.application_insights.components
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
tags,
type;

REPLACE examples

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

REPLACE azure.application_insights.components
SET
location = '{{ location }}',
tags = '{{ tags }}',
kind = '{{ kind }}',
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND kind = '{{ kind }}' --required
RETURNING
id,
name,
etag,
kind,
location,
properties,
tags,
type;

DELETE examples

Purges 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.

DELETE FROM azure.application_insights.components
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;