View a markdown version of this page

Gremlin 查询取消 - Amazon Neptune

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

Gremlin 查询取消

要获取 Gremlin 查询的状态,请使用 HTTP GETPOST 来向 https://your-neptune-endpoint:port/gremlin/status 终端节点提出请求。

Gremlin 查询取消请求参数

  • cancelQuery – 取消时必需。此参数没有相应的值。

  • queryId – 要取消的正在运行的 Gremlin 查询的 ID。

Gremlin 查询取消示例

以下是取消查询的示例。

AWS CLI
aws neptunedata cancel-gremlin-query \ --endpoint-url https://your-neptune-endpoint:port \ --query-id "fb34cd3e-f37c-4d12-9cf2-03bb741bf54f"

有关更多信息,请参阅《 AWS CLI 命令参考》cancel-gremlin-query中的。

SDK
import boto3 from botocore.config import Config client = boto3.client( 'neptunedata', endpoint_url='https://your-neptune-endpoint:port', config=Config(read_timeout=None, retries={'total_max_attempts': 1}) ) response = client.cancel_gremlin_query( queryId='fb34cd3e-f37c-4d12-9cf2-03bb741bf54f' ) print(response)

有关其他语言(如 Java、.NET 等)的 AWS SDK 示例,请参阅AWS SDK

awscurl
awscurl https://your-neptune-endpoint:port/gremlin/status \ --region us-east-1 \ --service neptune-db \ --data-urlencode "cancelQuery" \ --data-urlencode "queryId=fb34cd3e-f37c-4d12-9cf2-03bb741bf54f"
注意

此示例假设您的 AWS 证书是在您的环境中配置的。us-east-1替换为 Neptune 集群的区域。

有关awscurl与 IAM 身份验证配合使用的更多信息,请参阅将 awscurl 与临时凭证结合使用以安全地连接到启用了 IAM 身份验证的数据库集群

curl
curl https://your-neptune-endpoint:port/gremlin/status \ --data-urlencode "cancelQuery" \ --data-urlencode "queryId=fb34cd3e-f37c-4d12-9cf2-03bb741bf54f"

成功取消返回 HTTP 200 OK。