- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateGraphCommand
Creates a new Neptune Analytics graph.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { NeptuneGraphClient, CreateGraphCommand } from "@aws-sdk/client-neptune-graph"; // ES Modules import
// const { NeptuneGraphClient, CreateGraphCommand } = require("@aws-sdk/client-neptune-graph"); // CommonJS import
const client = new NeptuneGraphClient(config);
const input = { // CreateGraphInput
graphName: "STRING_VALUE", // required
tags: { // TagMap
"<keys>": "STRING_VALUE",
},
publicConnectivity: true || false,
kmsKeyIdentifier: "STRING_VALUE",
vectorSearchConfiguration: { // VectorSearchConfiguration
dimension: Number("int"), // required
},
replicaCount: Number("int"),
deletionProtection: true || false,
provisionedMemory: Number("int"), // required
};
const command = new CreateGraphCommand(input);
const response = await client.send(command);
// { // CreateGraphOutput
// id: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// arn: "STRING_VALUE", // required
// status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED" || "IMPORTING",
// statusReason: "STRING_VALUE",
// createTime: new Date("TIMESTAMP"),
// provisionedMemory: Number("int"),
// endpoint: "STRING_VALUE",
// publicConnectivity: true || false,
// vectorSearchConfiguration: { // VectorSearchConfiguration
// dimension: Number("int"), // required
// },
// replicaCount: Number("int"),
// kmsKeyIdentifier: "STRING_VALUE",
// sourceSnapshotId: "STRING_VALUE",
// deletionProtection: true || false,
// buildNumber: "STRING_VALUE",
// };
CreateGraphCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
graphName Required | string | undefined | A name for the new Neptune Analytics graph to be created. 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. |
provisionedMemory Required | number | undefined | The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 16 |
deletionProtection | boolean | undefined | Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. ( |
kmsKeyIdentifier | string | undefined | Specifies a KMS key to use to encrypt data in the new graph. |
publicConnectivity | boolean | undefined | Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. ( |
replicaCount | number | undefined | The number of replicas in other AZs. Min =0, Max = 2, Default = 1. Additional charges equivalent to the m-NCUs selected for the graph apply for each replica. |
tags | Record<string, string> | undefined | Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy. |
vectorSearchConfiguration | VectorSearchConfiguration | undefined | Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as |
CreateGraphCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
arn Required | string | undefined | The ARN of the graph. |
id Required | string | undefined | The ID of the graph. |
name Required | string | undefined | The graph name. For example: 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. |
buildNumber | string | undefined | The build number of the graph software. |
createTime | Date | undefined | The time when the graph was created. |
deletionProtection | boolean | undefined | A value that indicates whether the graph has deletion protection enabled. The graph can't be deleted when deletion protection is enabled. |
endpoint | string | undefined | The graph endpoint. |
kmsKeyIdentifier | string | undefined | Specifies the KMS key used to encrypt data in the new graph. |
provisionedMemory | number | undefined | The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 16 |
publicConnectivity | boolean | undefined | Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. If enabling public connectivity for the first time, there will be a delay while it is enabled. |
replicaCount | number | undefined | The number of replicas in other AZs. Default: If not specified, the default value is 1. |
sourceSnapshotId | string | undefined | The ID of the source graph. |
status | GraphStatus | undefined | The current status of the graph. |
statusReason | string | undefined | The reason the status was given. |
vectorSearchConfiguration | VectorSearchConfiguration | undefined | The vector-search configuration for the graph, which specifies the vector dimension to use in the vector index, if any. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConflictException | client | Raised when a conflict is encountered. |
InternalServerException | server | A failure occurred on the server. |
ServiceQuotaExceededException | client | A service quota was exceeded. |
ThrottlingException | client | The exception was interrupted by throttling. |
ValidationException | client | A resource could not be validated. |
NeptuneGraphServiceException | Base exception class for all service exceptions from NeptuneGraph service. |