AWS neptune documentation change
Summary
Added comprehensive code examples for invoking explain queries using AWS CLI, SDK, awscurl, and curl, similar to the previous example file.
Security assessment
This change adds detailed implementation examples for another Neptune explain query but doesn't address security vulnerabilities or add security documentation. The examples follow the same pattern as the previous file without security-specific content.
Diff
diff --git a/neptune/latest/userguide/access-graph-opencypher-explain-example-3.md b/neptune/latest/userguide/access-graph-opencypher-explain-example-3.md index c9d8ee84e..941f44b3b 100644 --- a//neptune/latest/userguide/access-graph-opencypher-explain-example-3.md +++ b//neptune/latest/userguide/access-graph-opencypher-explain-example-3.md @@ -19,0 +20,60 @@ In the `explain` output below, `DFEPipelineScan` (ID 0) scans for all the node l +To invoke `explain` for this query: + +AWS CLI + + + + aws neptunedata execute-open-cypher-explain-query \ + --endpoint-url https://your-neptune-endpoint:port \ + --open-cypher-query "MATCH (a) RETURN DISTINCT labels(a)" \ + --explain-mode details + +For more information, see [execute-open-cypher-explain-query](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/execute-open-cypher-explain-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_explain_query( + openCypherQuery='MATCH (a) RETURN DISTINCT labels(a)', + explainMode='details' + ) + + print(response['results'].read().decode('utf-8')) + +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=MATCH (a) RETURN DISTINCT labels(a)" \ + -d "explain=details" + +###### 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 \ + -d "query=MATCH (a) RETURN DISTINCT labels(a)" \ + -d "explain=details" + +The `explain` output: + @@ -21 +80,0 @@ In the `explain` output below, `DFEPipelineScan` (ID 0) scans for all the node l - curl -d "query=MATCH (a) RETURN DISTINCT labels(a)" -k https://localhost:8182/openCypher -d "explain=details" ~