Graph
The Graph resource lets you manage AWS NeptuneGraph Graphs and their configuration settings.
Minimal Example
Section titled “Minimal Example”Create a basic NeptuneGraph graph with required properties and some common optional ones.
import AWS from "alchemy/aws/control";
const basicGraph = await AWS.NeptuneGraph.Graph("myBasicGraph", { ProvisionedMemory: 16, GraphName: "MyFirstGraph", PublicConnectivity: true});
Advanced Configuration
Section titled “Advanced Configuration”Create a graph with additional configuration options such as replication count and deletion protection.
const advancedGraph = await AWS.NeptuneGraph.Graph("myAdvancedGraph", { ProvisionedMemory: 32, GraphName: "AdvancedGraph", ReplicaCount: 2, DeletionProtection: true, VectorSearchConfiguration: { vectorSearchType: "ANN", distanceMetric: "cosine" }});
Tagging for Management
Section titled “Tagging for Management”Add tags to your graph for better resource management and cost allocation.
const taggedGraph = await AWS.NeptuneGraph.Graph("myTaggedGraph", { ProvisionedMemory: 64, GraphName: "TaggedGraph", Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "GraphAnalytics" } ]});
Adoption of Existing Resource
Section titled “Adoption of Existing Resource”Configure the graph to adopt an existing resource instead of failing if it already exists.
const existingGraph = await AWS.NeptuneGraph.Graph("existingGraph", { ProvisionedMemory: 16, GraphName: "ExistingGraph", adopt: true});