Skip to main content

graph_snapshots

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

Overview

Namegraph_snapshots
TypeResource
Idaws.neptune_graph.graph_snapshots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the graph snapshot. (pattern: <code>gs-[a-z0-9]{10}</code>)
namestringThe snapshot name. For example: my-snapshot-1. The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed. (pattern: <code>(?!gs-)[a-z][a-z0-9](-[a-z0-9]+)</code>)
arnstringThe ARN of the graph snapshot.
kms_key_identifierstringThe ID of the KMS key used to encrypt and decrypt the snapshot. (pattern: <code>arn:aws[^:]:kms:[a-zA-Z0-9-]:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>)
snapshot_create_timestring (date-time)The time when the snapshot was created.
source_graph_idstringThe graph identifier for the graph for which a snapshot is to be created. (pattern: <code>g-[a-z0-9]{10}</code>)
statusstringThe status of the graph snapshot. (CREATING, AVAILABLE, DELETING, FAILED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_graph_snapshotselectsnapshot_identifier, regionRetrieves a specified graph snapshot.
list_graph_snapshotsselectregiongraphIdentifier, nextToken, maxResultsLists available snapshots of a specified Neptune Analytics graph.
create_graph_snapshotinsertregion, graphIdentifier, snapshotNameCreates a snapshot of the specific graph.
delete_graph_snapshotdeletesnapshot_identifier, regionDeletes the specified graph snapshot.

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
regionstringAWS region (default: us-east-1)
snapshot_identifierstringID of the graph snapshot to be deleted.
graphIdentifierstringThe unique identifier of the Neptune Analytics graph.
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

Retrieves a specified graph snapshot.

SELECT
id,
name,
arn,
kms_key_identifier,
snapshot_create_time,
source_graph_id,
status
FROM aws.neptune_graph.graph_snapshots
WHERE snapshot_identifier = '{{ snapshot_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a snapshot of the specific graph.

INSERT INTO aws.neptune_graph.graph_snapshots (
graphIdentifier,
snapshotName,
tags,
region
)
SELECT
'{{ graphIdentifier }}' /* required */,
'{{ snapshotName }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
id,
name,
arn,
kms_key_identifier,
snapshot_create_time,
source_graph_id,
status
;

DELETE examples

Deletes the specified graph snapshot.

DELETE FROM aws.neptune_graph.graph_snapshots
WHERE snapshot_identifier = '{{ snapshot_identifier }}' --required
AND region = '{{ region }}' --required
;