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

ApplicationInsightsComponentResource.CreateAPIKeyAsync 方法

定义

创建 Application Insights 组件的 API 密钥。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys
  • 操作IdAPIKeys_Create
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAPIKey>> CreateAPIKeyAsync (Azure.ResourceManager.ApplicationInsights.Models.APIKeyContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateAPIKeyAsync : Azure.ResourceManager.ApplicationInsights.Models.APIKeyContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAPIKey>>
override this.CreateAPIKeyAsync : Azure.ResourceManager.ApplicationInsights.Models.APIKeyContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAPIKey>>
Public Overridable Function CreateAPIKeyAsync (content As APIKeyContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ApplicationInsightsComponentAPIKey))

参数

content
APIKeyContent

需要指定以创建 Application Insights 组件的 API 密钥的属性。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

content 为 null。

适用于