CreateGraphUsingImportTask
Creates a new Neptune Analytics graph and imports data into it, either from Amazon Simple Storage Service (S3) or from a Neptune database or a Neptune database snapshot.
The data can be loaded from files in S3 that in either the Gremlin CSV format or the openCypher load format.
Request Syntax
POST /importtasks HTTP/1.1
Content-type: application/json
{
"deletionProtection": boolean
,
"failOnError": boolean
,
"format": "string
",
"graphName": "string
",
"importOptions": { ... },
"kmsKeyIdentifier": "string
",
"maxProvisionedMemory": number
,
"minProvisionedMemory": number
,
"publicConnectivity": boolean
,
"replicaCount": number
,
"roleArn": "string
",
"source": "string
",
"tags": {
"string
" : "string
"
},
"vectorSearchConfiguration": {
"dimension": number
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- deletionProtection
-
Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (
true
orfalse
).Type: Boolean
Required: No
- failOnError
-
If set to
true
, the task halts when an import error is encountered. If set tofalse
, the task skips the data that caused the error and continues if possible.Type: Boolean
Required: No
- format
-
Specifies the format of S3 data to be imported. Valid values are
CSV
, which identifies the Gremlin CSV format orOPENCYPHER
, which identies the openCypher load format.Type: String
Valid Values:
CSV | OPEN_CYPHER
Required: No
- graphName
-
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.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 63.
Pattern:
(?!g-)[a-z][a-z0-9]*(-[a-z0-9]+)*
Required: Yes
- importOptions
-
Contains options for controlling the import process. For example, if the
failOnError
key is set tofalse
, the import skips problem data and attempts to continue (whereas if set totrue
, the default, or if omitted, the import operation halts immediately when an error is encountered.Type: ImportOptions object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
- kmsKeyIdentifier
-
Specifies a KMS key to use to encrypt data imported into the new graph.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern:
arn:aws(|-cn|-us-gov):kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}
Required: No
- maxProvisionedMemory
-
The maximum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 1024, or the approved upper limit for your account.
If both the minimum and maximum values are specified, the max of the
min-provisioned-memory
andmax-provisioned memory
is used to create the graph. If neither value is specified 128 m-NCUs are used.Type: Integer
Valid Range: Minimum value of 128. Maximum value of 24576.
Required: No
- minProvisionedMemory
-
The minimum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 128
Type: Integer
Valid Range: Minimum value of 128. Maximum value of 24576.
Required: No
- publicConnectivity
-
Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (
true
to enable, orfalse
to disable).Type: Boolean
Required: No
- replicaCount
-
The number of replicas in other AZs to provision on the new graph after import. Default = 0, Min = 0, Max = 2.
Important
Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.
Type: Integer
Valid Range: Minimum value of 0. Maximum value of 2.
Required: No
- roleArn
-
The ARN of the IAM role that will allow access to the data that is to be imported.
Type: String
Pattern:
arn:aws[^:]*:iam::\d{12}:(role|role/service-role)/[\w+=,.@-]*
Required: Yes
- source
-
A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.
Type: String
Required: Yes
-
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.
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 50 items.
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Key Pattern:
(?!aws:)[a-zA-Z+-=._:/]+
Value Length Constraints: Minimum length of 0. Maximum length of 256.
Required: No
- vectorSearchConfiguration
-
Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as
dimension=
value. Max = 65,535Type: VectorSearchConfiguration object
Required: No
Response Syntax
HTTP/1.1 201
Content-type: application/json
{
"format": "string",
"graphId": "string",
"importOptions": { ... },
"roleArn": "string",
"source": "string",
"status": "string",
"taskId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The following data is returned in JSON format by the service.
- format
-
Specifies the format of S3 data to be imported. Valid values are
CSV
, which identifies the Gremlin CSV format orOPENCYPHER
, which identies the openCypher load format.Type: String
Valid Values:
CSV | OPEN_CYPHER
- graphId
-
The unique identifier of the Neptune Analytics graph.
Type: String
Pattern:
g-[a-z0-9]{10}
- importOptions
-
Contains options for controlling the import process. For example, if the
failOnError
key is set tofalse
, the import skips problem data and attempts to continue (whereas if set totrue
, the default, or if omitted, the import operation halts immediately when an error is encountered.Type: ImportOptions object
Note: This object is a Union. Only one member of this object can be specified or returned.
- roleArn
-
The ARN of the IAM role that will allow access to the data that is to be imported.
Type: String
Pattern:
arn:aws[^:]*:iam::\d{12}:(role|role/service-role)/[\w+=,.@-]*
- source
-
A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.
Type: String
- status
-
The status of the import task.
Type: String
Valid Values:
INITIALIZING | EXPORTING | ANALYZING_DATA | IMPORTING | REPROVISIONING | ROLLING_BACK | SUCCEEDED | FAILED | CANCELLING | CANCELLED
- taskId
-
The unique identifier of the import task.
Type: String
Pattern:
t-[a-z0-9]{10}
Errors
For information about the errors that are common to all actions, see Common Errors.
- ConflictException
-
Raised when a conflict is encountered.
HTTP Status Code: 409
- InternalServerException
-
A failure occurred on the server.
HTTP Status Code: 500
- ServiceQuotaExceededException
-
A service quota was exceeded.
HTTP Status Code: 402
- ThrottlingException
-
The exception was interrupted by throttling.
HTTP Status Code: 429
- ValidationException
-
A resource could not be validated.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: