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

PurviewRelationships.CreateAsync(RequestContent, RequestContext) 方法

定义

在实体之间创建新关系。

public virtual System.Threading.Tasks.Task<Azure.Response> CreateAsync (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member CreateAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.CreateAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function CreateAsync (content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)

参数

content
RequestContent

要作为请求正文发送的内容。

context
RequestContext

请求上下文,它可以基于每个调用覆盖请求的默认行为。

返回

例外

content 为 null。

注解

Request Body架构:

{
              attributes: Dictionary<string, AnyObject>,
              typeName: string,
              lastModifiedTS: string,
              createTime: number,
              createdBy: string,
              end1: {
                guid: string,
                typeName: string,
                uniqueAttributes: Dictionary<string, AnyObject>
              },
              end2: AtlasObjectId,
              guid: string,
              homeId: string,
              label: string,
              provenanceType: number,
              status: "ACTIVE" | "DELETED",
              updateTime: number,
              updatedBy: string,
              version: number
            }

Response Body架构:

{
              attributes: Dictionary<string, AnyObject>,
              typeName: string,
              lastModifiedTS: string,
              createTime: number,
              createdBy: string,
              end1: {
                guid: string,
                typeName: string,
                uniqueAttributes: Dictionary<string, AnyObject>
              },
              end2: AtlasObjectId,
              guid: string,
              homeId: string,
              label: string,
              provenanceType: number,
              status: "ACTIVE" | "DELETED",
              updateTime: number,
              updatedBy: string,
              version: number
            }

Response Error架构:

{
              requestId: string,
              errorCode: string,
              errorMessage: string
            }

适用于