This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.
appinsights¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.
- class
pulumi_azure.appinsights.AnalyticsItem(resource_name, opts=None, application_insights_id=None, content=None, function_alias=None, name=None, scope=None, type=None, __props__=None, __name__=None, __opts__=None)¶ Manages an Application Insights Analytics Item component.
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_insights = azure.appinsights.Insights("exampleInsights", location="West Europe", resource_group_name=example_resource_group.name, application_type="web") example_analytics_item = azure.appinsights.AnalyticsItem("exampleAnalyticsItem", application_insights_id=example_insights.id, content="requests //simple example query", scope="shared", type="query")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
application_insights_id (pulumi.Input[str]) – The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created.
content (pulumi.Input[str]) – The content for the Analytics Item, for example the query text if
typeisquery.function_alias (pulumi.Input[str]) – The alias to use for the function. Required when
typeisfunction.name (pulumi.Input[str]) – Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created.
scope (pulumi.Input[str]) – The scope for the Analytics Item. Can be
sharedoruser. Changing this forces a new resource to be created. Must besharedfor functions.type (pulumi.Input[str]) – The type of Analytics Item to create. Can be one of
query,function,folder,recent. Changing this forces a new resource to be created.
application_insights_id: pulumi.Output[str] = None¶The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created.
content: pulumi.Output[str] = None¶The content for the Analytics Item, for example the query text if
typeisquery.
function_alias: pulumi.Output[str] = None¶The alias to use for the function. Required when
typeisfunction.
name: pulumi.Output[str] = None¶Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created.
scope: pulumi.Output[str] = None¶The scope for the Analytics Item. Can be
sharedoruser. Changing this forces a new resource to be created. Must besharedfor functions.
time_created: pulumi.Output[str] = None¶A string containing the time the Analytics Item was created.
time_modified: pulumi.Output[str] = None¶A string containing the time the Analytics Item was last modified.
type: pulumi.Output[str] = None¶The type of Analytics Item to create. Can be one of
query,function,folder,recent. Changing this forces a new resource to be created.
version: pulumi.Output[str] = None¶A string indicating the version of the query format
- static
get(resource_name, id, opts=None, application_insights_id=None, content=None, function_alias=None, name=None, scope=None, time_created=None, time_modified=None, type=None, version=None)¶ Get an existing AnalyticsItem resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
application_insights_id (pulumi.Input[str]) – The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created.
content (pulumi.Input[str]) – The content for the Analytics Item, for example the query text if
typeisquery.function_alias (pulumi.Input[str]) – The alias to use for the function. Required when
typeisfunction.name (pulumi.Input[str]) – Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created.
scope (pulumi.Input[str]) – The scope for the Analytics Item. Can be
sharedoruser. Changing this forces a new resource to be created. Must besharedfor functions.time_created (pulumi.Input[str]) – A string containing the time the Analytics Item was created.
time_modified (pulumi.Input[str]) – A string containing the time the Analytics Item was last modified.
type (pulumi.Input[str]) – The type of Analytics Item to create. Can be one of
query,function,folder,recent. Changing this forces a new resource to be created.version (pulumi.Input[str]) – A string indicating the version of the query format
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_azure.appinsights.ApiKey(resource_name, opts=None, application_insights_id=None, name=None, read_permissions=None, write_permissions=None, __props__=None, __name__=None, __opts__=None)¶ Manages an Application Insights API key.
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_insights = azure.appinsights.Insights("exampleInsights", location="West Europe", resource_group_name=example_resource_group.name, application_type="web") read_telemetry = azure.appinsights.ApiKey("readTelemetry", application_insights_id=example_insights.id, read_permissions=[ "aggregate", "api", "draft", "extendqueries", "search", ]) write_annotations = azure.appinsights.ApiKey("writeAnnotations", application_insights_id=example_insights.id, write_permissions=["annotations"]) authenticate_sdk_control_channel_api_key = azure.appinsights.ApiKey("authenticateSdkControlChannelApiKey", application_insights_id=example_insights.id, read_permissions=["agentconfig"]) full_permissions = azure.appinsights.ApiKey("fullPermissions", application_insights_id=example_insights.id, read_permissions=[ "agentconfig", "aggregate", "api", "draft", "extendqueries", "search", ], write_permissions=["annotations"]) pulumi.export("readTelemetryApiKey", read_telemetry.api_key) pulumi.export("writeAnnotationsApiKey", write_annotations.api_key) pulumi.export("authenticateSdkControlChannel", authenticate_sdk_control_channel_api_key.api_key) pulumi.export("fullPermissionsApiKey", full_permissions.api_key)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
application_insights_id (pulumi.Input[str]) – The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
name (pulumi.Input[str]) – Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
read_permissions (pulumi.Input[list]) – Specifies the list of read permissions granted to the API key. Valid values are
agentconfig,aggregate,api,draft,extendqueries,search. Please note these values are case sensitive. Changing this forces a new resource to be created.write_permissions (pulumi.Input[list]) – Specifies the list of write permissions granted to the API key. Valid values are
annotations. Please note these values are case sensitive. Changing this forces a new resource to be created.
api_key: pulumi.Output[str] = None¶The API Key secret (Sensitive).
application_insights_id: pulumi.Output[str] = None¶The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
name: pulumi.Output[str] = None¶Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
read_permissions: pulumi.Output[list] = None¶Specifies the list of read permissions granted to the API key. Valid values are
agentconfig,aggregate,api,draft,extendqueries,search. Please note these values are case sensitive. Changing this forces a new resource to be created.
write_permissions: pulumi.Output[list] = None¶Specifies the list of write permissions granted to the API key. Valid values are
annotations. Please note these values are case sensitive. Changing this forces a new resource to be created.
- static
get(resource_name, id, opts=None, api_key=None, application_insights_id=None, name=None, read_permissions=None, write_permissions=None)¶ Get an existing ApiKey resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
api_key (pulumi.Input[str]) – The API Key secret (Sensitive).
application_insights_id (pulumi.Input[str]) – The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created.
name (pulumi.Input[str]) – Specifies the name of the Application Insights API key. Changing this forces a new resource to be created.
read_permissions (pulumi.Input[list]) – Specifies the list of read permissions granted to the API key. Valid values are
agentconfig,aggregate,api,draft,extendqueries,search. Please note these values are case sensitive. Changing this forces a new resource to be created.write_permissions (pulumi.Input[list]) – Specifies the list of write permissions granted to the API key. Valid values are
annotations. Please note these values are case sensitive. Changing this forces a new resource to be created.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_azure.appinsights.AwaitableGetInsightsResult(app_id=None, application_type=None, id=None, instrumentation_key=None, location=None, name=None, resource_group_name=None, retention_in_days=None, tags=None)¶
- class
pulumi_azure.appinsights.GetInsightsResult(app_id=None, application_type=None, id=None, instrumentation_key=None, location=None, name=None, resource_group_name=None, retention_in_days=None, tags=None)¶ A collection of values returned by getInsights.
app_id= None¶The App ID associated with this Application Insights component.
application_type= None¶The type of the component.
id= None¶The provider-assigned unique ID for this managed resource.
instrumentation_key= None¶The instrumentation key of the Application Insights component.
location= None¶The Azure location where the component exists.
retention_in_days= None¶The retention period in days.
Tags applied to the component.
- class
pulumi_azure.appinsights.Insights(resource_name, opts=None, application_type=None, daily_data_cap_in_gb=None, daily_data_cap_notifications_disabled=None, disable_ip_masking=None, location=None, name=None, resource_group_name=None, retention_in_days=None, sampling_percentage=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Manages an Application Insights component.
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_insights = azure.appinsights.Insights("exampleInsights", location=example_resource_group.location, resource_group_name=example_resource_group.name, application_type="web") pulumi.export("instrumentationKey", example_insights.instrumentation_key) pulumi.export("appId", example_insights.app_id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
application_type (pulumi.Input[str]) – Specifies the type of Application Insights to create. Valid values are
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor ASP.NET. Please note these values are case sensitive; unmatched values are treated as ASP.NET by Azure. Changing this forces a new resource to be created.daily_data_cap_in_gb (pulumi.Input[float]) – Specifies the Application Insights component daily data volume cap in GB.
daily_data_cap_notifications_disabled (pulumi.Input[bool]) – Specifies if a notification email will be send when the daily data volume cap is met.
disable_ip_masking (pulumi.Input[bool]) – By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
name (pulumi.Input[str]) – Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the Application Insights component.
retention_in_days (pulumi.Input[float]) – Specifies the retention period in days. Possible values are
30,60,90,120,180,270,365,550or730. Defaults to90.sampling_percentage (pulumi.Input[float]) – Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
app_id: pulumi.Output[str] = None¶The App ID associated with this Application Insights component.
application_type: pulumi.Output[str] = None¶Specifies the type of Application Insights to create. Valid values are
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor ASP.NET. Please note these values are case sensitive; unmatched values are treated as ASP.NET by Azure. Changing this forces a new resource to be created.
daily_data_cap_in_gb: pulumi.Output[float] = None¶Specifies the Application Insights component daily data volume cap in GB.
daily_data_cap_notifications_disabled: pulumi.Output[bool] = None¶Specifies if a notification email will be send when the daily data volume cap is met.
disable_ip_masking: pulumi.Output[bool] = None¶By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.
instrumentation_key: pulumi.Output[str] = None¶The Instrumentation Key for this Application Insights component.
location: pulumi.Output[str] = None¶Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
name: pulumi.Output[str] = None¶Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
resource_group_name: pulumi.Output[str] = None¶The name of the resource group in which to create the Application Insights component.
retention_in_days: pulumi.Output[float] = None¶Specifies the retention period in days. Possible values are
30,60,90,120,180,270,365,550or730. Defaults to90.
sampling_percentage: pulumi.Output[float] = None¶Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
A mapping of tags to assign to the resource.
- static
get(resource_name, id, opts=None, app_id=None, application_type=None, daily_data_cap_in_gb=None, daily_data_cap_notifications_disabled=None, disable_ip_masking=None, instrumentation_key=None, location=None, name=None, resource_group_name=None, retention_in_days=None, sampling_percentage=None, tags=None)¶ Get an existing Insights resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
app_id (pulumi.Input[str]) – The App ID associated with this Application Insights component.
application_type (pulumi.Input[str]) – Specifies the type of Application Insights to create. Valid values are
iosfor iOS,javafor Java web,MobileCenterfor App Center,Node.JSfor Node.js,otherfor General,phonefor Windows Phone,storefor Windows Store andwebfor ASP.NET. Please note these values are case sensitive; unmatched values are treated as ASP.NET by Azure. Changing this forces a new resource to be created.daily_data_cap_in_gb (pulumi.Input[float]) – Specifies the Application Insights component daily data volume cap in GB.
daily_data_cap_notifications_disabled (pulumi.Input[bool]) – Specifies if a notification email will be send when the daily data volume cap is met.
disable_ip_masking (pulumi.Input[bool]) – By default the real client ip is masked as
0.0.0.0in the logs. Use this argument to disable masking and log the real client ip. Defaults tofalse.instrumentation_key (pulumi.Input[str]) – The Instrumentation Key for this Application Insights component.
location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
name (pulumi.Input[str]) – Specifies the name of the Application Insights component. Changing this forces a new resource to be created.
resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the Application Insights component.
retention_in_days (pulumi.Input[float]) – Specifies the retention period in days. Possible values are
30,60,90,120,180,270,365,550or730. Defaults to90.sampling_percentage (pulumi.Input[float]) – Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_azure.appinsights.WebTest(resource_name, opts=None, application_insights_id=None, configuration=None, description=None, enabled=None, frequency=None, geo_locations=None, kind=None, location=None, name=None, resource_group_name=None, retry_enabled=None, tags=None, timeout=None, __props__=None, __name__=None, __opts__=None)¶ Manages an Application Insights WebTest.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
application_insights_id (pulumi.Input[str]) – The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created.
configuration (pulumi.Input[str]) – An XML configuration specification for a WebTest.
description (pulumi.Input[str]) – Purpose/user defined descriptive test for this WebTest.
enabled (pulumi.Input[bool]) – Is the test actively being monitored.
frequency (pulumi.Input[float]) – Interval in seconds between test runs for this WebTest. Default is
300.geo_locations (pulumi.Input[list]) – A list of where to physically run the tests from to give global coverage for accessibility of your application.
kind (pulumi.Input[str]) – = (Required) The kind of web test that this web test watches. Choices are
pingandmultistep.location (pulumi.Input[str]) – The location of the resource group.
name (pulumi.Input[str]) – Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created.
retry_enabled (pulumi.Input[bool]) – Allow for retries should this WebTest fail.
tags (pulumi.Input[dict]) – Resource tags.
timeout (pulumi.Input[float]) – Seconds until this WebTest will timeout and fail. Default is
30.
application_insights_id: pulumi.Output[str] = None¶The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created.
configuration: pulumi.Output[str] = None¶An XML configuration specification for a WebTest.
description: pulumi.Output[str] = None¶Purpose/user defined descriptive test for this WebTest.
enabled: pulumi.Output[bool] = None¶Is the test actively being monitored.
frequency: pulumi.Output[float] = None¶Interval in seconds between test runs for this WebTest. Default is
300.
geo_locations: pulumi.Output[list] = None¶A list of where to physically run the tests from to give global coverage for accessibility of your application.
kind: pulumi.Output[str] = None¶= (Required) The kind of web test that this web test watches. Choices are
pingandmultistep.
location: pulumi.Output[str] = None¶The location of the resource group.
name: pulumi.Output[str] = None¶Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created.
retry_enabled: pulumi.Output[bool] = None¶Allow for retries should this WebTest fail.
Resource tags.
timeout: pulumi.Output[float] = None¶Seconds until this WebTest will timeout and fail. Default is
30.
- static
get(resource_name, id, opts=None, application_insights_id=None, configuration=None, description=None, enabled=None, frequency=None, geo_locations=None, kind=None, location=None, name=None, resource_group_name=None, retry_enabled=None, synthetic_monitor_id=None, tags=None, timeout=None)¶ Get an existing WebTest resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
application_insights_id (pulumi.Input[str]) – The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created.
configuration (pulumi.Input[str]) – An XML configuration specification for a WebTest.
description (pulumi.Input[str]) – Purpose/user defined descriptive test for this WebTest.
enabled (pulumi.Input[bool]) – Is the test actively being monitored.
frequency (pulumi.Input[float]) – Interval in seconds between test runs for this WebTest. Default is
300.geo_locations (pulumi.Input[list]) – A list of where to physically run the tests from to give global coverage for accessibility of your application.
kind (pulumi.Input[str]) – = (Required) The kind of web test that this web test watches. Choices are
pingandmultistep.location (pulumi.Input[str]) – The location of the resource group.
name (pulumi.Input[str]) – Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created.
retry_enabled (pulumi.Input[bool]) – Allow for retries should this WebTest fail.
tags (pulumi.Input[dict]) – Resource tags.
timeout (pulumi.Input[float]) – Seconds until this WebTest will timeout and fail. Default is
30.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
pulumi_azure.appinsights.get_insights(name=None, resource_group_name=None, opts=None)¶Use this data source to access information about an existing Application Insights component.
import pulumi import pulumi_azure as azure example = azure.appinsights.get_insights(name="production", resource_group_name="networking") pulumi.export("applicationInsightsInstrumentationKey", example.instrumentation_key)
- Parameters
name (str) – Specifies the name of the Application Insights component.
resource_group_name (str) – Specifies the name of the resource group the Application Insights component is located in.