Amazon Neptune Graph

2024/03/28 - Amazon Neptune Graph - 7 updated api methods

Changes  Update ImportTaskCancelled waiter to evaluate task state correctly and minor documentation changes.

CreateGraph (updated) Link ¶
Changes (response)
{'status': {'IMPORTING'}}

Creates a new Neptune Analytics graph.

See also: AWS API Documentation

Request Syntax

client.create_graph(
    graphName='string',
    tags={
        'string': 'string'
    },
    publicConnectivity=True|False,
    kmsKeyIdentifier='string',
    vectorSearchConfiguration={
        'dimension': 123
    },
    replicaCount=123,
    deletionProtection=True|False,
    provisionedMemory=123
)
type graphName:

string

param graphName:

[REQUIRED]

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 tags:

dict

param tags:

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.

  • (string) --

    • (string) --

type publicConnectivity:

boolean

param publicConnectivity:

Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. ( true to enable, or false to disable.

type kmsKeyIdentifier:

string

param kmsKeyIdentifier:

Specifies a KMS key to use to encrypt data in the new graph.

type vectorSearchConfiguration:

dict

param 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,535

  • dimension (integer) -- [REQUIRED]

    The number of dimensions.

type replicaCount:

integer

param replicaCount:

The number of replicas in other AZs. Min =0, Max = 2, Default = 1.

type deletionProtection:

boolean

param deletionProtection:

Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. ( true or false).

type provisionedMemory:

integer

param provisionedMemory:

[REQUIRED]

The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 128

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'arn': 'string',
    'status': 'CREATING'|'AVAILABLE'|'DELETING'|'RESETTING'|'UPDATING'|'SNAPSHOTTING'|'FAILED'|'IMPORTING',
    'statusReason': 'string',
    'createTime': datetime(2015, 1, 1),
    'provisionedMemory': 123,
    'endpoint': 'string',
    'publicConnectivity': True|False,
    'vectorSearchConfiguration': {
        'dimension': 123
    },
    'replicaCount': 123,
    'kmsKeyIdentifier': 'string',
    'sourceSnapshotId': 'string',
    'deletionProtection': True|False,
    'buildNumber': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The ID of the graph.

    • name (string) --

      The graph name. For example: my-graph-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.

    • arn (string) --

      The ARN of the graph.

    • status (string) --

      The current status of the graph.

    • statusReason (string) --

      The reason the status was given.

    • createTime (datetime) --

      The time when the graph was created.

    • provisionedMemory (integer) --

      The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.

      Min = 128

    • endpoint (string) --

      The graph endpoint.

    • publicConnectivity (boolean) --

      Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated.

    • vectorSearchConfiguration (dict) --

      The vector-search configuration for the graph, which specifies the vector dimension to use in the vector index, if any.

      • dimension (integer) --

        The number of dimensions.

    • replicaCount (integer) --

      The number of replicas in other AZs.

      Default: If not specified, the default value is 1.

    • kmsKeyIdentifier (string) --

      Specifies the KMS key used to encrypt data in the new graph.

    • sourceSnapshotId (string) --

      The ID of the source graph.

    • deletionProtection (boolean) --

      A value that indicates whether the graph has deletion protection enabled. The graph can't be deleted when deletion protection is enabled.

    • buildNumber (string) --

      The build number of the graph software.

DeleteGraph (updated) Link ¶
Changes (response)
{'status': {'IMPORTING'}}

Deletes the specified graph. Graphs cannot be deleted if delete-protection is enabled.

See also: AWS API Documentation

Request Syntax

client.delete_graph(
    graphIdentifier='string',
    skipSnapshot=True|False
)
type graphIdentifier:

string

param graphIdentifier:

[REQUIRED]

The unique identifier of the Neptune Analytics graph.

type skipSnapshot:

boolean

param skipSnapshot:

[REQUIRED]

Determines 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.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'arn': 'string',
    'status': 'CREATING'|'AVAILABLE'|'DELETING'|'RESETTING'|'UPDATING'|'SNAPSHOTTING'|'FAILED'|'IMPORTING',
    'statusReason': 'string',
    'createTime': datetime(2015, 1, 1),
    'provisionedMemory': 123,
    'endpoint': 'string',
    'publicConnectivity': True|False,
    'vectorSearchConfiguration': {
        'dimension': 123
    },
    'replicaCount': 123,
    'kmsKeyIdentifier': 'string',
    'sourceSnapshotId': 'string',
    'deletionProtection': True|False,
    'buildNumber': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the graph.

    • name (string) --

      The name of the graph.

    • arn (string) --

      The ARN associated with the graph.

    • status (string) --

      The status of the graph.

    • statusReason (string) --

      The reason for the status of the graph.

    • createTime (datetime) --

      The time at which the graph was created.

    • provisionedMemory (integer) --

      The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.

    • endpoint (string) --

      The graph endpoint.

    • publicConnectivity (boolean) --

      If true, the graph has a public endpoint, otherwise not.

    • vectorSearchConfiguration (dict) --

      Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535

      • dimension (integer) --

        The number of dimensions.

    • replicaCount (integer) --

      The number of replicas for the graph.

    • kmsKeyIdentifier (string) --

      The ID of the KMS key used to encrypt and decrypt graph data.

    • sourceSnapshotId (string) --

      The ID of the snapshot from which the graph was created, if the graph was recovered from a snapshot.

    • deletionProtection (boolean) --

      If true, deletion protection was enabled for the graph.

    • buildNumber (string) --

      The build number associated with the graph.

GetGraph (updated) Link ¶
Changes (response)
{'status': {'IMPORTING'}}

Gets information about a specified graph.

See also: AWS API Documentation

Request Syntax

client.get_graph(
    graphIdentifier='string'
)
type graphIdentifier:

string

param graphIdentifier:

[REQUIRED]

The unique identifier of the Neptune Analytics graph.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'arn': 'string',
    'status': 'CREATING'|'AVAILABLE'|'DELETING'|'RESETTING'|'UPDATING'|'SNAPSHOTTING'|'FAILED'|'IMPORTING',
    'statusReason': 'string',
    'createTime': datetime(2015, 1, 1),
    'provisionedMemory': 123,
    'endpoint': 'string',
    'publicConnectivity': True|False,
    'vectorSearchConfiguration': {
        'dimension': 123
    },
    'replicaCount': 123,
    'kmsKeyIdentifier': 'string',
    'sourceSnapshotId': 'string',
    'deletionProtection': True|False,
    'buildNumber': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the graph.

    • name (string) --

      The name of the graph.

    • arn (string) --

      The ARN associated with the graph.

    • status (string) --

      The status of the graph.

    • statusReason (string) --

      The reason that the graph has this status.

    • createTime (datetime) --

      The time at which the graph was created.

    • provisionedMemory (integer) --

      The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.

    • endpoint (string) --

      The graph endpoint.

    • publicConnectivity (boolean) --

      If true, the graph has a public endpoint, otherwise not.

    • vectorSearchConfiguration (dict) --

      Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535

      • dimension (integer) --

        The number of dimensions.

    • replicaCount (integer) --

      The number of replicas for the graph.

    • kmsKeyIdentifier (string) --

      The ID of the KMS key used to encrypt and decrypt graph data.

    • sourceSnapshotId (string) --

      The ID of the snapshot from which the graph was created, if it was created from a snapshot.

    • deletionProtection (boolean) --

      If true, deletion protection is enabled for the graph.

    • buildNumber (string) --

      The build number of the graph.

ListGraphs (updated) Link ¶
Changes (response)
{'graphs': {'status': {'IMPORTING'}}}

Lists available Neptune Analytics graphs.

See also: AWS API Documentation

Request Syntax

client.list_graphs(
    nextToken='string',
    maxResults=123
)
type nextToken:

string

param nextToken:

Pagination 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.

type maxResults:

integer

param maxResults:

The 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.

rtype:

dict

returns:

Response Syntax

{
    'graphs': [
        {
            'id': 'string',
            'name': 'string',
            'arn': 'string',
            'status': 'CREATING'|'AVAILABLE'|'DELETING'|'RESETTING'|'UPDATING'|'SNAPSHOTTING'|'FAILED'|'IMPORTING',
            'provisionedMemory': 123,
            'publicConnectivity': True|False,
            'endpoint': 'string',
            'replicaCount': 123,
            'kmsKeyIdentifier': 'string',
            'deletionProtection': True|False
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • graphs (list) --

      A list of the graphs.

      • (dict) --

        Summary details about a graph.

        • id (string) --

          The unique identifier of the graph.

        • name (string) --

          The name of the graph.

        • arn (string) --

          The ARN associated with the graph.

        • status (string) --

          The status of the graph.

        • provisionedMemory (integer) --

          The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.

        • publicConnectivity (boolean) --

          If true, the graph has a public endpoint, otherwise not.

        • endpoint (string) --

          The graph endpoint.

        • replicaCount (integer) --

          The number of replicas for the graph.

        • kmsKeyIdentifier (string) --

          The ID of the KMS key used to encrypt and decrypt graph data.

        • deletionProtection (boolean) --

          If true, deletion protection is enabled for the graph.

    • nextToken (string) --

      Pagination 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.

ResetGraph (updated) Link ¶
Changes (response)
{'status': {'IMPORTING'}}

Empties the data from a specified Neptune Analytics graph.

See also: AWS API Documentation

Request Syntax

client.reset_graph(
    graphIdentifier='string',
    skipSnapshot=True|False
)
type graphIdentifier:

string

param graphIdentifier:

[REQUIRED]

ID of the graph to reset.

type skipSnapshot:

boolean

param skipSnapshot:

[REQUIRED]

Determines whether a final graph snapshot is created before the graph data is deleted. If set to true, no graph snapshot is created. If set to false, a graph snapshot is created before the data is deleted.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'arn': 'string',
    'status': 'CREATING'|'AVAILABLE'|'DELETING'|'RESETTING'|'UPDATING'|'SNAPSHOTTING'|'FAILED'|'IMPORTING',
    'statusReason': 'string',
    'createTime': datetime(2015, 1, 1),
    'provisionedMemory': 123,
    'endpoint': 'string',
    'publicConnectivity': True|False,
    'vectorSearchConfiguration': {
        'dimension': 123
    },
    'replicaCount': 123,
    'kmsKeyIdentifier': 'string',
    'sourceSnapshotId': 'string',
    'deletionProtection': True|False,
    'buildNumber': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the graph.

    • name (string) --

      The name of the graph.

    • arn (string) --

      The ARN associated with the graph.

    • status (string) --

      The status of the graph.

    • statusReason (string) --

      The reason that the graph has this status.

    • createTime (datetime) --

      The time at which the graph was created.

    • provisionedMemory (integer) --

      The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.

    • endpoint (string) --

      The graph endpoint.

    • publicConnectivity (boolean) --

      If true, the graph has a public endpoint, otherwise not.

    • vectorSearchConfiguration (dict) --

      Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535

      • dimension (integer) --

        The number of dimensions.

    • replicaCount (integer) --

      The number of replicas for the graph.

    • kmsKeyIdentifier (string) --

      The ID of the KMS key used to encrypt and decrypt graph data.

    • sourceSnapshotId (string) --

      The ID of the snapshot from which the graph was created, if any.

    • deletionProtection (boolean) --

      If true, deletion protection is enabled for the graph.

    • buildNumber (string) --

      The build number of the graph.

RestoreGraphFromSnapshot (updated) Link ¶
Changes (response)
{'status': {'IMPORTING'}}

Restores a graph from a snapshot.

See also: AWS API Documentation

Request Syntax

client.restore_graph_from_snapshot(
    snapshotIdentifier='string',
    graphName='string',
    provisionedMemory=123,
    deletionProtection=True|False,
    tags={
        'string': 'string'
    },
    replicaCount=123,
    publicConnectivity=True|False
)
type snapshotIdentifier:

string

param snapshotIdentifier:

[REQUIRED]

The ID of the snapshot in question.

type graphName:

string

param graphName:

[REQUIRED]

A name for the new Neptune Analytics graph to be created from the snapshot.

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 provisionedMemory:

integer

param provisionedMemory:

The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.

Min = 128

type deletionProtection:

boolean

param deletionProtection:

A value that indicates whether the graph has deletion protection enabled. The graph can't be deleted when deletion protection is enabled.

type tags:

dict

param tags:

Adds metadata tags to the snapshot. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.

  • (string) --

    • (string) --

type replicaCount:

integer

param replicaCount:

The number of replicas in other AZs. Min =0, Max = 2, Default =1

type publicConnectivity:

boolean

param publicConnectivity:

Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. ( true to enable, or false to disable).

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'arn': 'string',
    'status': 'CREATING'|'AVAILABLE'|'DELETING'|'RESETTING'|'UPDATING'|'SNAPSHOTTING'|'FAILED'|'IMPORTING',
    'statusReason': 'string',
    'createTime': datetime(2015, 1, 1),
    'provisionedMemory': 123,
    'endpoint': 'string',
    'publicConnectivity': True|False,
    'vectorSearchConfiguration': {
        'dimension': 123
    },
    'replicaCount': 123,
    'kmsKeyIdentifier': 'string',
    'sourceSnapshotId': 'string',
    'deletionProtection': True|False,
    'buildNumber': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the graph.

    • name (string) --

      The name of the graph.

    • arn (string) --

      The ARN associated with the graph.

    • status (string) --

      The status of the graph.

    • statusReason (string) --

      The reason that the graph has this status.

    • createTime (datetime) --

      The time at which the graph was created.

    • provisionedMemory (integer) --

      The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.

    • endpoint (string) --

      The graph endpoint.

    • publicConnectivity (boolean) --

      If true, the graph has a public endpoint, otherwise not.

    • vectorSearchConfiguration (dict) --

      Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535

      • dimension (integer) --

        The number of dimensions.

    • replicaCount (integer) --

      The number of replicas for the graph.

    • kmsKeyIdentifier (string) --

      The ID of the KMS key used to encrypt and decrypt graph data.

    • sourceSnapshotId (string) --

      The ID of the snapshot from which the graph was created, if any.

    • deletionProtection (boolean) --

      If true, deletion protection is enabled for the graph.

    • buildNumber (string) --

      The build number of the graph.

UpdateGraph (updated) Link ¶
Changes (response)
{'status': {'IMPORTING'}}

Updates the configuration of a specified Neptune Analytics graph

See also: AWS API Documentation

Request Syntax

client.update_graph(
    graphIdentifier='string',
    publicConnectivity=True|False,
    provisionedMemory=123,
    deletionProtection=True|False
)
type graphIdentifier:

string

param graphIdentifier:

[REQUIRED]

The unique identifier of the Neptune Analytics graph.

type publicConnectivity:

boolean

param publicConnectivity:

Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. ( true to enable, or false to disable.

type provisionedMemory:

integer

param provisionedMemory:

The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.

Min = 128

type deletionProtection:

boolean

param deletionProtection:

A value that indicates whether the graph has deletion protection enabled. The graph can't be deleted when deletion protection is enabled.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'name': 'string',
    'arn': 'string',
    'status': 'CREATING'|'AVAILABLE'|'DELETING'|'RESETTING'|'UPDATING'|'SNAPSHOTTING'|'FAILED'|'IMPORTING',
    'statusReason': 'string',
    'createTime': datetime(2015, 1, 1),
    'provisionedMemory': 123,
    'endpoint': 'string',
    'publicConnectivity': True|False,
    'vectorSearchConfiguration': {
        'dimension': 123
    },
    'replicaCount': 123,
    'kmsKeyIdentifier': 'string',
    'sourceSnapshotId': 'string',
    'deletionProtection': True|False,
    'buildNumber': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the graph.

    • name (string) --

      The name of the graph.

    • arn (string) --

      The ARN associated with the graph.

    • status (string) --

      The status of the graph.

    • statusReason (string) --

      The reason that the graph has this status.

    • createTime (datetime) --

      The time at which the graph was created.

    • provisionedMemory (integer) --

      The number of memory-optimized Neptune Capacity Units (m-NCUs) allocated to the graph.

    • endpoint (string) --

      The graph endpoint.

    • publicConnectivity (boolean) --

      If true, the graph has a public endpoint, otherwise not.

    • vectorSearchConfiguration (dict) --

      Specifies the number of dimensions for vector embeddings loaded into the graph. Max = 65535

      • dimension (integer) --

        The number of dimensions.

    • replicaCount (integer) --

      The number of replicas for the graph.

    • kmsKeyIdentifier (string) --

      The ID of the KMS key used to encrypt and decrypt graph data.

    • sourceSnapshotId (string) --

      The ID of the snapshot from which the graph was created, if any.

    • deletionProtection (boolean) --

      If true, deletion protection is enabled for the graph.

    • buildNumber (string) --

      The build number of the graph.