teamsAsyncOperation 资源类型teamsAsyncOperation resource type

命名空间:microsoft.graphNamespace: microsoft.graph

Microsoft 团队 async operation 是 transcends 一个 API 请求的生存期的操作。A Microsoft Teams async operation is an operation that transcends the lifetime of a single API request. 这些操作运行时间较长,或者在发起请求的时间范围内完成的成本太高。These operations are long-running or too expensive to complete within the timeframe of their originating request.

当异步操作启动时,该方法将返回202接受的响应代码。When an async operation is initiated, the method returns a 202 Accepted response code. 该响应还将包含一个位置标头,其中包含 teamsAsyncOperation 的位置。The response will also contain a Location header, which contains the location of the teamsAsyncOperation. 通过向此位置发出 GET 请求来定期检查操作的状态;在两个检查之间等待 >30 秒。Periodically check the status of the operation by making a GET request to this location; wait >30 seconds between checks. 当请求成功完成时,状态将为 "已成功",targetResourceLocation 将指向 "已创建/已修改" 的资源。When the request completes successfully, the status will be "succeeded" and the targetResourceLocation will point to the created/modified resource.

属性Properties

属性Property 类型Type 说明Description
idid stringstring 唯一操作 id。Unique operation id.
operationTypeoperationType teamsAsyncOperationTypeteamsAsyncOperationType 指示正在描述的操作的类型。Denotes which type of operation is being described.
createdDateTimecreatedDateTime DateTimeOffsetDateTimeOffset 创建操作的时间。Time when the operation was created.
statusstatus teamsAsyncOperationStatusteamsAsyncOperationStatus 操作状态。Operation status.
lastActionDateTimelastActionDateTime DateTimeOffsetDateTimeOffset 上次更新异步操作的时间。Time when the async operation was last updated.
attemptsCountattemptsCount Int32Int32 在标记为 "成功" 或 "失败" 之前尝试操作的次数。Number of times the operation was attempted before being marked successful or failed.
targetResourceIdtargetResourceId containerparentjobguid 作为此异步操作(通常为 团队)的结果创建或修改的对象的 ID。The ID of the object that's created or modified as result of this async operation, typically a team.
targetResourceLocationtargetResourceLocation stringstring 作为此异步操作的结果创建或修改的对象的位置。The location of the object that's created or modified as result of this async operation. 应将此 URL 视为不透明值,而不会将其解析为其组件路径。This URL should be treated as an opaque value and not parsed into its component paths.
errorerror operationErroroperationError 导致异步操作失败的任何错误。Any error that causes the async operation to fail.

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。The following is a JSON representation of the resource.

{
    "id": "string",
    "operationType": "archiveTeam",
    "createdDateTime": "2018-01-01T00:00:00.0000000Z",
    "status": "succeeded",
    "lastActionDateTime": "2018-01-01T00:00:00.0000000Z",
    "attemptsCount": 1,
    "targetResourceId": "fa4aa5a2-a75b-4769-86f4-9e2742a18fda",
    "targetResourceLocation": "/groups('fa4aa5a2-a75b-4769-86f4-9e2742a18fda')/team",
    "error": null
}