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

Dataset - Get Operation

使用 检查数据集创建过程的状态。

API Get Operation 是一个 HTTP GET 请求,用于检查数据集创建过程的状态并检索datasetId值。

提交操作请求

若要查看数据集操作的当前进度,将使用请求 GET ,其中 operationId 给定的路径是表示操作的 ID。

操作响应

正在进行时, 200-OK 返回 http 状态代码,没有额外的标头。 如果操作成功,则 200-OK 返回具有 Resource-Location 标头的 http 状态代码。

GET https://{geography}.atlas.microsoft.com/datasets/operations/{operationId}?api-version=2.0

URI 参数

名称 必需 类型 说明
geography
path True

string

此参数指定 Azure Maps Creator 资源所在的位置。 有效值为 us 和 eu。

operationId
path True

string

用于查询数据集创建/导入请求状态的 ID。

api-version
query True

string

Azure Maps API 的版本号。

请求头

名称 必需 类型 说明
x-ms-client-id

string

指定要与Microsoft Entra ID安全模型结合使用的帐户。 它表示Azure Maps帐户的唯一 ID,可从Azure Maps管理平面帐户 API 检索。 若要在 Azure Maps 中使用Microsoft Entra ID安全性,请参阅以下文章以获取指导。

响应

名称 类型 说明
200 OK

LongRunningOperationResult

操作正在运行或已完成。 如果操作成功,请使用 Resource-Location 标头获取结果的路径。

Headers

Resource-Location: string

Other Status Codes

ErrorResponse

发生了意外错误。

安全性

AADToken

这些是Microsoft Entra OAuth 2.0 流。 与 Azure 基于角色的访问控制配对时,它可用于控制对Azure Maps REST API 的访问。 Azure 基于角色的访问控制用于指定对一个或多个Azure Maps资源帐户或子资源的访问权限。 可以通过内置角色或由一个或多个权限组成的自定义角色授予任何用户、组或服务主体的访问权限,以Azure Maps REST API。

若要实现方案,建议查看 身份验证概念。 总之,此安全定义提供了一种解决方案,用于通过能够对特定 API 和作用域进行访问控制的对象对应用程序 () 建模。

备注

  • 此安全定义需要使用x-ms-client-id 标头来指示应用程序请求访问的Azure Maps资源。 这可以从 地图管理 API 获取。

Authorization URL特定于 Azure 公有云实例。 主权云具有唯一的授权 URL 和Microsoft Entra ID配置。 * Azure 基于角色的访问控制是通过 Azure 门户、PowerShell、CLI、Azure SDK 或 REST API 从 Azure 管理平面配置的。 * 使用 Azure Maps Web SDK 允许针对多个用例对应用程序进行基于配置的设置。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
https://atlas.microsoft.com/.default https://atlas.microsoft.com/.default

subscription-key

这是在Azure 门户或使用 PowerShell、CLI、Azure SDK 或 REST API 创建Azure Maps帐户时预配的共享密钥。

使用此密钥,任何应用程序都可以访问所有 REST API。 换句话说,此密钥可用作颁发密钥的帐户中的主密钥。

对于公开的应用程序,我们建议使用机密客户端应用程序方法来访问Azure Maps REST API,以便安全地存储密钥。

Type: apiKey
In: query

SAS Token

这是一个共享访问签名令牌,通过 Azure 门户、PowerShell、CLI、Azure SDK 或 REST API,通过 Azure 管理平面在Azure Maps资源上列出 SAS 操作创建。

使用此令牌,任何应用程序都有权使用 Azure 基于角色的访问控制进行访问,并精细控制特定令牌的过期、速率和区域 () 。 换句话说,SAS 令牌可用于允许应用程序以比共享密钥更安全的方式控制访问。

对于公开的应用程序,我们建议在 Map 帐户资源 上配置允许的来源的特定列表,以限制呈现滥用,并定期续订 SAS 令牌。

Type: apiKey
In: header

示例

Get the status of an operation which has finished successfully
Get the status of an operation which is still running

Get the status of an operation which has finished successfully

Sample Request

GET https://us.atlas.microsoft.com/datasets/operations/8b1288fa-1958-4a2b-b68e-13a7i5af7d7c?api-version=2.0

Sample Response

Resource-Location: https://us.atlas.microsoft.com/datasets/3e36b996-f6d1-b068-0fcb-dd6b014c3447?api-version=2.0
{
  "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c",
  "created": "2021-04-20T22:43:14.9401559+00:00",
  "status": "Succeeded"
}

Get the status of an operation which is still running

Sample Request

GET https://us.atlas.microsoft.com/datasets/operations/8b1288fa-1958-4a2b-b68e-13a7i5af7d7c?api-version=2.0

Sample Response

{
  "operationId": "8b1288fa-1958-4a2b-b68e-13a7i5af7d7c",
  "created": "2021-04-23T19:14:03.2452596+00:00",
  "status": "Running"
}

定义

名称 说明
ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

LongRunningOperationResult

Long-Running 操作 API 的响应模型。

LroStatus

请求的状态状态。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

LongRunningOperationResult

Long-Running 操作 API 的响应模型。

名称 类型 说明
created

string

创建的时间戳。

error

ErrorDetail

错误详细信息。

operationId

string

此长时间运行的操作的 ID。

status

LroStatus

请求的状态状态。

warning

ErrorDetail

错误详细信息。

LroStatus

请求的状态状态。

名称 类型 说明
Failed

string

请求有一个或多个失败。

NotStarted

string

请求尚未开始处理。

Running

string

请求已开始处理。

Succeeded

string

请求已成功完成。