你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Components interface

表示组件的接口。

方法

createOrUpdate(string, string, ApplicationInsightsComponent, ComponentsCreateOrUpdateOptionalParams)

创建 Application Insights 组件(或更新)。 注意:不能在 Put 操作中为 InstrumentationKey 和 AppId 指定其他值。

delete(string, string, ComponentsDeleteOptionalParams)

删除 Application Insights 组件。

get(string, string, ComponentsGetOptionalParams)

返回 Application Insights 组件。

getPurgeStatus(string, string, string, ComponentsGetPurgeStatusOptionalParams)

获取正在进行的清除操作的状态。

list(ComponentsListOptionalParams)

获取订阅中所有 Application Insights 组件的列表。

listByResourceGroup(string, ComponentsListByResourceGroupOptionalParams)

获取资源组中的 Application Insights 组件的列表。

purge(string, string, ComponentPurgeBody, ComponentsPurgeOptionalParams)

通过一组用户定义的筛选器清除 Application Insights 组件中的数据。

为了管理系统资源,清除请求被限制为每小时 50 个请求。 应通过发送一个命令(其谓词包括需要清除的所有用户标识)来批处理清除请求的执行。 使用 in 运算符指定多个标识。 应在使用清除请求之前运行查询,以验证结果是否预期。 注意:此作适用于经典资源,对于基于工作区的 Application Insights 资源,请运行清除作(直接在工作区上)( https://learn.microsoft.com/rest/api/loganalytics/workspace-purge/purge),范围限定为特定资源 ID。

updateTags(string, string, TagsResource, ComponentsUpdateTagsOptionalParams)

更新现有组件的标记。 若要更新其他字段,请使用 CreateOrUpdate 方法。

方法详细信息

createOrUpdate(string, string, ApplicationInsightsComponent, ComponentsCreateOrUpdateOptionalParams)

创建 Application Insights 组件(或更新)。 注意:不能在 Put 操作中为 InstrumentationKey 和 AppId 指定其他值。

function createOrUpdate(resourceGroupName: string, resourceName: string, insightProperties: ApplicationInsightsComponent, options?: ComponentsCreateOrUpdateOptionalParams): Promise<ApplicationInsightsComponent>

参数

resourceGroupName

string

资源组的名称。 名称不区分大小写。

resourceName

string

Application Insights 组件资源的名称。

insightProperties
ApplicationInsightsComponent

需要指定才能创建 Application Insights 组件的属性。

options
ComponentsCreateOrUpdateOptionalParams

选项参数。

返回

delete(string, string, ComponentsDeleteOptionalParams)

删除 Application Insights 组件。

function delete(resourceGroupName: string, resourceName: string, options?: ComponentsDeleteOptionalParams): Promise<void>

参数

resourceGroupName

string

资源组的名称。 名称不区分大小写。

resourceName

string

Application Insights 组件资源的名称。

options
ComponentsDeleteOptionalParams

选项参数。

返回

Promise<void>

get(string, string, ComponentsGetOptionalParams)

返回 Application Insights 组件。

function get(resourceGroupName: string, resourceName: string, options?: ComponentsGetOptionalParams): Promise<ApplicationInsightsComponent>

参数

resourceGroupName

string

资源组的名称。 名称不区分大小写。

resourceName

string

Application Insights 组件资源的名称。

options
ComponentsGetOptionalParams

选项参数。

返回

getPurgeStatus(string, string, string, ComponentsGetPurgeStatusOptionalParams)

获取正在进行的清除操作的状态。

function getPurgeStatus(resourceGroupName: string, resourceName: string, purgeId: string, options?: ComponentsGetPurgeStatusOptionalParams): Promise<ComponentPurgeStatusResponse>

参数

resourceGroupName

string

资源组的名称。 名称不区分大小写。

resourceName

string

Application Insights 组件资源的名称。

purgeId

string

在清除状态请求中,这是返回其状态的操作的 ID。

options
ComponentsGetPurgeStatusOptionalParams

选项参数。

返回

list(ComponentsListOptionalParams)

获取订阅中所有 Application Insights 组件的列表。

function list(options?: ComponentsListOptionalParams): PagedAsyncIterableIterator<ApplicationInsightsComponent, ApplicationInsightsComponent[], PageSettings>

参数

options
ComponentsListOptionalParams

选项参数。

返回

listByResourceGroup(string, ComponentsListByResourceGroupOptionalParams)

获取资源组中的 Application Insights 组件的列表。

function listByResourceGroup(resourceGroupName: string, options?: ComponentsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<ApplicationInsightsComponent, ApplicationInsightsComponent[], PageSettings>

参数

resourceGroupName

string

资源组的名称。 名称不区分大小写。

返回

purge(string, string, ComponentPurgeBody, ComponentsPurgeOptionalParams)

通过一组用户定义的筛选器清除 Application Insights 组件中的数据。

为了管理系统资源,清除请求被限制为每小时 50 个请求。 应通过发送一个命令(其谓词包括需要清除的所有用户标识)来批处理清除请求的执行。 使用 in 运算符指定多个标识。 应在使用清除请求之前运行查询,以验证结果是否预期。 注意:此作适用于经典资源,对于基于工作区的 Application Insights 资源,请运行清除作(直接在工作区上)( https://learn.microsoft.com/rest/api/loganalytics/workspace-purge/purge),范围限定为特定资源 ID。

function purge(resourceGroupName: string, resourceName: string, body: ComponentPurgeBody, options?: ComponentsPurgeOptionalParams): Promise<ComponentPurgeResponse>

参数

resourceGroupName

string

资源组的名称。 名称不区分大小写。

resourceName

string

Application Insights 组件资源的名称。

body
ComponentPurgeBody

描述在 Application Insights 组件的单个表中清除数据的请求正文

options
ComponentsPurgeOptionalParams

选项参数。

返回

updateTags(string, string, TagsResource, ComponentsUpdateTagsOptionalParams)

更新现有组件的标记。 若要更新其他字段,请使用 CreateOrUpdate 方法。

function updateTags(resourceGroupName: string, resourceName: string, componentTags: TagsResource, options?: ComponentsUpdateTagsOptionalParams): Promise<ApplicationInsightsComponent>

参数

resourceGroupName

string

资源组的名称。 名称不区分大小写。

resourceName

string

Application Insights 组件资源的名称。

componentTags
TagsResource

更新了要设置为组件实例的标记信息。

options
ComponentsUpdateTagsOptionalParams

选项参数。

返回