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

ApiManagementServiceResource.CreateOrUpdateContentItemAsync 方法

定义

创建由提供的内容类型指定的新开发人员门户的内容项。

  • Request Path/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}
  • 操作IdContentItem_CreateOrUpdate
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentItem>> CreateOrUpdateContentItemAsync (string contentTypeId, string contentItemId, Azure.ETag? ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateContentItemAsync : string * string * Nullable<Azure.ETag> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentItem>>
override this.CreateOrUpdateContentItemAsync : string * string * Nullable<Azure.ETag> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.ApiManagementContentItem>>
Public Overridable Function CreateOrUpdateContentItemAsync (contentTypeId As String, contentItemId As String, Optional ifMatch As Nullable(Of ETag) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ApiManagementContentItem))

参数

contentTypeId
String

内容类型标识符。

contentItemId
String

内容项标识符。

ifMatch
Nullable<ETag>

实体的 ETag。 创建实体时不需要,但在更新实体时是必需的。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

contentTypeIdcontentItemId 是空字符串,预期为非空。

contentTypeIdcontentItemId 为 null。

适用于