Skip to main content

web_tests

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

Overview

Nameweb_tests
TypeResource
Idazure.application_insights.web_tests

Fields

The following fields are returned by SELECT queries:

Ann Application Insights web test definition.

NameDatatypeDescription
idstringAzure resource Id
namestringAzure resource name
kindstringThe kind of WebTest that this web test watches. Choices are ping, multistep and standard. (default: ping)
locationstringResource location
propertiesobjectMetadata describing a web test for an Azure resource.
tagsResource tags
typestringAzure resource type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, subscriptionId, webTestNameGet a specific Application Insights web test definition.
list_by_componentselectcomponentName, resourceGroupName, subscriptionIdGet all Application Insights web tests defined for the specified component.
list_by_resource_groupselectresourceGroupName, subscriptionIdGet all Application Insights web tests defined for the specified resource group.
listselectsubscriptionIdGet all Application Insights web test definitions for the specified subscription.
create_or_updateinsertresourceGroupName, subscriptionId, webTestNameCreates or updates an Application Insights web test definition.
deletedeletesubscriptionId, resourceGroupName, webTestNameDeletes an Application Insights web test.
update_tagsexecresourceGroupName, subscriptionId, webTestNameUpdates the tags associated with an Application Insights web test.

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
componentNamestringThe name of the Application Insights component resource.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
webTestNamestringThe name of the Application Insights WebTest resource.

SELECT examples

Get a specific Application Insights web test definition.

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

INSERT examples

Creates or updates an Application Insights web test definition.

INSERT INTO azure.application_insights.web_tests (
data__location,
data__tags,
data__kind,
data__properties,
resourceGroupName,
subscriptionId,
webTestName
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ kind }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ webTestName }}'
RETURNING
id,
name,
kind,
location,
properties,
tags,
type
;

DELETE examples

Deletes an Application Insights web test.

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

Lifecycle Methods

Updates the tags associated with an Application Insights web test.

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