AWS neptune documentation change
Summary
Added comprehensive examples for using query timeout hints with AWS CLI, SDK, awscurl, and curl, replacing a simple curl example with detailed implementation instructions.
Security assessment
This change is purely about improving documentation for query timeout functionality with various client tools. There is no evidence of addressing security vulnerabilities or adding security features. The change enhances usability but doesn't mention security implications.
Diff
diff --git a/neptune/latest/userguide/opencypher-query-hints-timeout-hint.md b/neptune/latest/userguide/opencypher-query-hints-timeout-hint.md index e0d2f5aed..f9145fe6b 100644 --- a//neptune/latest/userguide/opencypher-query-hints-timeout-hint.md +++ b//neptune/latest/userguide/opencypher-query-hints-timeout-hint.md @@ -8,0 +9 @@ Query timeout behavior can be configured on a per-query basis by query-level que +AWS CLI @@ -10 +10,0 @@ Query timeout behavior can be configured on a per-query basis by query-level que - # Using query-level timeout hint @@ -12 +12,47 @@ Query timeout behavior can be configured on a per-query basis by query-level que - % curl https://<endpoint>:<port>/opencypher \ + + aws neptunedata execute-open-cypher-query \ + --endpoint-url https://your-neptune-endpoint:port \ + --open-cypher-query "USING QUERY:TIMEOUTMILLISECONDS 100 MATCH(n) RETURN n LIMIT 1" + +For more information, see [execute-open-cypher-query](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/execute-open-cypher-query.html) 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.execute_open_cypher_query( + openCypherQuery='USING QUERY:TIMEOUTMILLISECONDS 100 MATCH(n) RETURN n LIMIT 1' + ) + + print(response['results']) + +For AWS SDK examples in other languages, see [AWS SDK](./access-graph-opencypher-sdk.html). + +awscurl + + + + awscurl https://your-neptune-endpoint:port/openCypher \ + --region us-east-1 \ + --service neptune-db \ + -X POST \ + -d "query=USING QUERY:TIMEOUTMILLISECONDS 100 MATCH(n) RETURN n LIMIT 1" + +###### Note + +This example assumes that your AWS credentials are configured in your environment. Replace `us-east-1` with the Region of your Neptune cluster. + +curl + + + + curl https://your-neptune-endpoint:port/openCypher \ @@ -21 +67 @@ Query timeout behavior will consider the minimum of cluster-level timeout and qu - % curl https://<endpoint>:<port>/opencypher \ + curl https://your-neptune-endpoint:port/openCypher \ @@ -27 +73 @@ Query timeout behavior will consider the minimum of cluster-level timeout and qu - % curl https://<endpoint>:<port>/opencypher \ + curl https://your-neptune-endpoint:port/openCypher \