Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.Gremlin query cancellation
To get the status of Gremlin queries, use HTTP GET or POST to
make a request to the https://your-neptune-endpoint:port/gremlin/status endpoint.
Gremlin query cancellation request parameters
Gremlin query cancellation example
The following is an example of cancelling a query.
- AWS CLI
-
aws neptunedata cancel-gremlin-query \
--endpoint-url https://your-neptune-endpoint:port \
--query-id "fb34cd3e-f37c-4d12-9cf2-03bb741bf54f"
For more information, see cancel-gremlin-query in the AWS CLI Command Reference.
- 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)
For AWS SDK examples in other languages like Java, .NET, and more, see 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"
This example assumes that your AWS credentials are configured in your
environment. Replace us-east-1 with the Region of your
Neptune cluster.
For more information about using awscurl with IAM authentication, see
Using awscurl with temporary credentials to securely connect to a DB cluster with IAM authentication enabled.
- curl
-
curl https://your-neptune-endpoint:port/gremlin/status \
--data-urlencode "cancelQuery" \
--data-urlencode "queryId=fb34cd3e-f37c-4d12-9cf2-03bb741bf54f"
Successful cancellation returns HTTP 200 OK.