Components - Update Tags
Updates an existing component's tags. To update other fields use the CreateOrUpdate method.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}?api-version=2015-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
resource
|
path | True |
string |
The name of the Application Insights component resource. |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
tags |
object |
Resource tags |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Updating the Application Insights component's tags was successful. Component tags are updated and returned with the rest of the Component's object properties. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
ComponentUpdateTagsOnly
Sample request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component?api-version=2015-05-01
{
"tags": {
"ApplicationGatewayType": "Internal-Only",
"BillingEntity": "Self",
"Color": "AzureBlue",
"CustomField_01": "Custom text in some random field named randomly",
"NodeType": "Edge"
}
}
Sample response
{
"id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component",
"name": "my-component",
"type": "Microsoft.Insights/components",
"location": "South Central US",
"tags": {
"ApplicationGatewayType": "Internal-Only",
"BillingEntity": "Self",
"Color": "AzureBlue",
"CustomField_01": "Custom text in some random field named randomly",
"NodeType": "Edge"
},
"kind": "web",
"properties": {
"ApplicationId": "my-component",
"AppId": "887f4bfd-b5fd-40d7-9fc3-123456789abc",
"Application_Type": "web",
"Flow_Type": "Bluefield",
"Request_Source": "rest",
"InstrumentationKey": "bc095013-3cf2-45ac-ab47-123456789abc",
"CreationDate": "2017-01-24T01:05:38.5934061+00:00",
"TenantId": "f438d567-7177-4fe1-a5e3-123456789abc",
"HockeyAppId": "",
"HockeyAppToken": "",
"provisioningState": "Succeeded",
"SamplingPercentage": 100,
"RetentionInDays": 90,
"ConnectionString": "InstrumentationKey=bc095013-3cf2-45ac-ab47-123456789abc",
"DisableIpMasking": false,
"ImmediatePurgeDataOn30Days": false,
"IngestionMode": "ApplicationInsights"
}
}
Definitions
Name | Description |
---|---|
Application |
An Application Insights component definition. |
Application |
Type of application being monitored. |
Flow |
Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. |
Ingestion |
Indicates the flow of the ingestion. |
Private |
The private link scope resource reference. |
Request |
Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. |
Tags |
A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance. |
ApplicationInsightsComponent
An Application Insights component definition.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
Azure resource Id |
|
kind |
string |
The 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. |
|
location |
string |
Resource location |
|
name |
string |
Azure resource name |
|
properties.AppId |
string |
Application Insights Unique ID for your Application. |
|
properties.ApplicationId |
string |
The unique ID of your application. This field mirrors the 'Name' field and cannot be changed. |
|
properties.Application_Type | web |
Type of application being monitored. |
|
properties.ConnectionString |
string |
Application Insights component connection string. |
|
properties.CreationDate |
string |
Creation Date for the Application Insights component, in ISO 8601 format. |
|
properties.DisableIpMasking |
boolean |
Disable IP masking. |
|
properties.Flow_Type | Bluefield |
Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API. |
|
properties.HockeyAppId |
string |
The unique application ID created when a new application is added to HockeyApp, used for communications with HockeyApp. |
|
properties.HockeyAppToken |
string |
Token used to authenticate communications with between Application Insights and HockeyApp. |
|
properties.ImmediatePurgeDataOn30Days |
boolean |
Purge data immediately after 30 days. |
|
properties.IngestionMode | ApplicationInsights |
Indicates the flow of the ingestion. |
|
properties.InstrumentationKey |
string |
Application Insights Instrumentation key. A read-only value that applications can use to identify the destination for all telemetry sent to Azure Application Insights. This value will be supplied upon construction of each new Application Insights component. |
|
properties.PrivateLinkScopedResources |
List of linked private link scope resources. |
||
properties.Request_Source | rest |
Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'. |
|
properties.RetentionInDays |
integer |
90 |
Retention period in days. |
properties.SamplingPercentage |
number |
Percentage of the data produced by the application being monitored that is being sampled for Application Insights telemetry. |
|
properties.TenantId |
string |
Azure Tenant Id. |
|
properties.provisioningState |
string |
Current state of this component: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. |
|
tags |
object |
Resource tags |
|
type |
string |
Azure resource type |
ApplicationType
Type of application being monitored.
Name | Type | Description |
---|---|---|
other |
string |
|
web |
string |
FlowType
Used by the Application Insights system to determine what kind of flow this component was created by. This is to be set to 'Bluefield' when creating/updating a component via the REST API.
Name | Type | Description |
---|---|---|
Bluefield |
string |
IngestionMode
Indicates the flow of the ingestion.
Name | Type | Description |
---|---|---|
ApplicationInsights |
string |
|
ApplicationInsightsWithDiagnosticSettings |
string |
|
LogAnalytics |
string |
PrivateLinkScopedResource
The private link scope resource reference.
Name | Type | Description |
---|---|---|
ResourceId |
string |
The full resource Id of the private link scope resource. |
ScopeId |
string |
The private link scope unique Identifier. |
RequestSource
Describes what tool created this Application Insights component. Customers using this API should set this to the default 'rest'.
Name | Type | Description |
---|---|---|
rest |
string |
TagsResource
A container holding only the Tags for a resource, allowing the user to update the tags on a WebTest instance.
Name | Type | Description |
---|---|---|
tags |
object |
Resource tags |