Skip to main content

graphs

Creates, updates, deletes, gets or lists a graphs resource.

Overview

Namegraphs
TypeResource
Idaws.neptune_graph.graphs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the graph. (pattern: <code>g-[a-z0-9]{10}</code>)
namestringThe name of the graph. (pattern: <code>(?!g-)[a-z][a-z0-9](-[a-z0-9]+)</code>)
arnstringThe ARN associated with the graph.
build_numberstringThe build number of the graph.
create_timestring (date-time)The time at which the graph was created.
deletion_protectionbooleanIf true, deletion protection is enabled for the graph.
endpointstringThe graph endpoint.
kms_key_identifierstringThe 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_memoryintegerThe number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.
public_connectivitybooleanIf true, the graph has a public endpoint, otherwise not.
replica_countintegerThe number of replicas for the graph.
source_snapshot_idstringThe 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>)
statusstringThe status of the graph. (CREATING, AVAILABLE, DELETING, RESETTING, UPDATING, SNAPSHOTTING, FAILED, IMPORTING, STARTING, STOPPING, STOPPED)
status_reasonstringThe reason that the graph has this status.
vector_search_configurationobjectSpecifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_graphselectgraph_identifier, regionGets information about a specified graph.
list_graphsselectregionnextToken, maxResultsLists available Neptune Analytics graphs.
create_graphinsertregion, graphName, provisionedMemoryCreates a new Neptune Analytics graph.
update_graphupdategraph_identifier, regionUpdates the configuration of a specified Neptune Analytics graph
delete_graphdeletegraph_identifier, skipSnapshot, regionDeletes the specified graph. Graphs cannot be deleted if delete-protection is enabled.
reset_graphexecgraph_identifier, region, skipSnapshotEmpties the data from a specified Neptune Analytics graph.
execute_queryexecgraphIdentifier, region, queryString, languageExecute 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_snapshotexecsnapshot_identifier, region, graphNameRestores a graph from a snapshot.
start_graphexecgraph_identifier, regionStarts the specific graph.
stop_graphexecgraph_identifier, regionStops 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.

NameDatatypeDescription
graphIdentifierstringThe unique identifier of the Neptune Analytics graph.
graph_identifierstringThe unique identifier of the Neptune Analytics graph.
regionstringAWS region (default: us-east-1)
skipSnapshotbooleanDetermines 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_identifierstringThe ID of the snapshot in question.
maxResultsintegerThe 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.
nextTokenstringPagination 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

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}
}'
;