graphs
Creates, updates, deletes, gets or lists a graphs resource.
Overview
| Name | graphs |
| Type | Resource |
| Id | aws.neptune_graph.graphs |
Fields
The following fields are returned by SELECT queries:
- get_graph
- list_graphs
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the graph. (pattern: <code>g-[a-z0-9]{10}</code>) |
name | string | The name of the graph. (pattern: <code>(?!g-)[a-z][a-z0-9](-[a-z0-9]+)</code>) |
arn | string | The ARN associated with the graph. |
build_number | string | The build number of the graph. |
create_time | string (date-time) | The time at which the graph was created. |
deletion_protection | boolean | If true, deletion protection is enabled for the graph. |
endpoint | string | The graph endpoint. |
kms_key_identifier | string | The ID of the KMS key used to encrypt and decrypt graph data. (pattern: <code>arn:aws[^:]:kms:[a-zA-Z0-9-]:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>) |
provisioned_memory | integer | The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph. |
public_connectivity | boolean | If true, the graph has a public endpoint, otherwise not. |
replica_count | integer | The number of replicas for the graph. |
source_snapshot_id | string | The ID of the snapshot from which the graph was created, if it was created from a snapshot. (pattern: <code>gs-[a-z0-9]{10}</code>) |
status | string | The status of the graph. (CREATING, AVAILABLE, DELETING, RESETTING, UPDATING, SNAPSHOTTING, FAILED, IMPORTING, STARTING, STOPPING, STOPPED) |
status_reason | string | The reason that the graph has this status. |
vector_search_configuration | object | Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535 |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the graph. (pattern: <code>g-[a-z0-9]{10}</code>) |
name | string | The name of the graph. (pattern: <code>(?!g-)[a-z][a-z0-9](-[a-z0-9]+)</code>) |
arn | string | The ARN associated with the graph. |
deletion_protection | boolean | If true, deletion protection is enabled for the graph. |
endpoint | string | The graph endpoint. |
kms_key_identifier | string | The ID of the KMS key used to encrypt and decrypt graph data. |
provisioned_memory | integer | The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph. |
public_connectivity | boolean | If true, the graph has a public endpoint, otherwise not. |
replica_count | integer | The number of replicas for the graph. |
status | string | The status of the graph. (CREATING, AVAILABLE, DELETING, RESETTING, UPDATING, SNAPSHOTTING, FAILED, IMPORTING, STARTING, STOPPING, STOPPED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_graph | select | graph_identifier, region | Gets information about a specified graph. | |
list_graphs | select | region | nextToken, maxResults | Lists available Neptune Analytics graphs. |
create_graph | insert | region, graphName, provisionedMemory | Creates a new Neptune Analytics graph. | |
update_graph | update | graph_identifier, region | Updates the configuration of a specified Neptune Analytics graph | |
delete_graph | delete | graph_identifier, skipSnapshot, region | Deletes the specified graph. Graphs cannot be deleted if delete-protection is enabled. | |
reset_graph | exec | graph_identifier, region, skipSnapshot | Empties the data from a specified Neptune Analytics graph. | |
execute_query | exec | graphIdentifier, region, queryString, language | Execute an openCypher query. When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have a policy attached that allows one of the following IAM actions in that cluster, depending on the query: neptune-graph:ReadDataViaQuery neptune-graph:WriteDataViaQuery neptune-graph:DeleteDataViaQuery | |
restore_graph_from_snapshot | exec | snapshot_identifier, region, graphName | Restores a graph from a snapshot. | |
start_graph | exec | graph_identifier, region | Starts the specific graph. | |
stop_graph | exec | graph_identifier, region | Stops the specific graph. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
graphIdentifier | string | The unique identifier of the Neptune Analytics graph. |
graph_identifier | string | The unique identifier of the Neptune Analytics graph. |
region | string | AWS region (default: us-east-1) |
skipSnapshot | boolean | Determines whether a final graph snapshot is created before the graph is deleted. If true is specified, no graph snapshot is created. If false is specified, a graph snapshot is created before the graph is deleted. |
snapshot_identifier | string | The ID of the snapshot in question. |
maxResults | integer | The total number of records to return in the command's output. If the total number of records available is more than the value specified, nextToken is provided in the command's output. To resume pagination, provide the nextToken output value in the nextToken argument of a subsequent command. Do not use the nextToken response element directly outside of the Amazon CLI. |
nextToken | string | Pagination token used to paginate output. When this value is provided as input, the service returns results from where the previous response left off. When this value is present in output, it indicates that there are more results to retrieve. |
SELECT examples
- get_graph
- list_graphs
Gets information about a specified graph.
SELECT
id,
name,
arn,
build_number,
create_time,
deletion_protection,
endpoint,
kms_key_identifier,
provisioned_memory,
public_connectivity,
replica_count,
source_snapshot_id,
status,
status_reason,
vector_search_configuration
FROM aws.neptune_graph.graphs
WHERE graph_identifier = '{{ graph_identifier }}' -- required
AND region = '{{ region }}' -- required
;
Lists available Neptune Analytics graphs.
SELECT
id,
name,
arn,
deletion_protection,
endpoint,
kms_key_identifier,
provisioned_memory,
public_connectivity,
replica_count,
status
FROM aws.neptune_graph.graphs
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_graph
- Manifest
Creates a new Neptune Analytics graph.
INSERT INTO aws.neptune_graph.graphs (
graphName,
tags,
publicConnectivity,
kmsKeyIdentifier,
vectorSearchConfiguration,
replicaCount,
deletionProtection,
provisionedMemory,
region
)
SELECT
'{{ graphName }}' /* required */,
'{{ tags }}',
{{ publicConnectivity }},
'{{ kmsKeyIdentifier }}',
'{{ vectorSearchConfiguration }}',
{{ replicaCount }},
{{ deletionProtection }},
{{ provisionedMemory }} /* required */,
'{{ region }}'
RETURNING
id,
name,
arn,
build_number,
create_time,
deletion_protection,
endpoint,
kms_key_identifier,
provisioned_memory,
public_connectivity,
replica_count,
source_snapshot_id,
status,
status_reason,
vector_search_configuration
;
# Description fields are for documentation purposes
- name: graphs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the graphs resource.
- name: graphName
value: "{{ graphName }}"
- name: tags
value: "{{ tags }}"
- name: publicConnectivity
value: {{ publicConnectivity }}
- name: kmsKeyIdentifier
value: "{{ kmsKeyIdentifier }}"
- name: vectorSearchConfiguration
description: |
Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535
value:
dimension: {{ dimension }}
- name: replicaCount
value: {{ replicaCount }}
- name: deletionProtection
value: {{ deletionProtection }}
- name: provisionedMemory
value: {{ provisionedMemory }}
UPDATE examples
- update_graph
Updates the configuration of a specified Neptune Analytics graph
UPDATE aws.neptune_graph.graphs
SET
publicConnectivity = {{ publicConnectivity }},
provisionedMemory = {{ provisionedMemory }},
deletionProtection = {{ deletionProtection }}
WHERE
graph_identifier = '{{ graph_identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
name,
arn,
build_number,
create_time,
deletion_protection,
endpoint,
kms_key_identifier,
provisioned_memory,
public_connectivity,
replica_count,
source_snapshot_id,
status,
status_reason,
vector_search_configuration;
DELETE examples
- delete_graph
Deletes the specified graph. Graphs cannot be deleted if delete-protection is enabled.
DELETE FROM aws.neptune_graph.graphs
WHERE graph_identifier = '{{ graph_identifier }}' --required
AND skipSnapshot = '{{ skipSnapshot }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- reset_graph
- execute_query
- restore_graph_from_snapshot
- start_graph
- stop_graph
Empties the data from a specified Neptune Analytics graph.
EXEC aws.neptune_graph.graphs.reset_graph
@graph_identifier='{{ graph_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"skipSnapshot": {{ skipSnapshot }}
}'
;
Execute an openCypher query. When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have a policy attached that allows one of the following IAM actions in that cluster, depending on the query: neptune-graph:ReadDataViaQuery neptune-graph:WriteDataViaQuery neptune-graph:DeleteDataViaQuery
EXEC aws.neptune_graph.graphs.execute_query
@graphIdentifier='{{ graphIdentifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"queryString": "{{ queryString }}",
"language": "{{ language }}",
"parameters": "{{ parameters }}",
"planCache": "{{ planCache }}",
"explainMode": "{{ explainMode }}",
"queryTimeoutMilliseconds": {{ queryTimeoutMilliseconds }}
}'
;
Restores a graph from a snapshot.
EXEC aws.neptune_graph.graphs.restore_graph_from_snapshot
@snapshot_identifier='{{ snapshot_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"graphName": "{{ graphName }}",
"provisionedMemory": {{ provisionedMemory }},
"deletionProtection": {{ deletionProtection }},
"tags": "{{ tags }}",
"replicaCount": {{ replicaCount }},
"publicConnectivity": {{ publicConnectivity }}
}'
;
Starts the specific graph.
EXEC aws.neptune_graph.graphs.start_graph
@graph_identifier='{{ graph_identifier }}' --required,
@region='{{ region }}' --required
;
Stops the specific graph.
EXEC aws.neptune_graph.graphs.stop_graph
@graph_identifier='{{ graph_identifier }}' --required,
@region='{{ region }}' --required
;