graphs
Creates, updates, deletes or gets a graph resource or lists graphs in a region
Overview
| Name | graphs |
| Type | Resource |
| Description | The AWS::NeptuneGraph::Graph resource creates an Amazon NeptuneGraph Graph. |
| Id | awscc.neptunegraph.graphs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
deletion_protection | boolean | Value that indicates whether the Graph has deletion protection enabled. The graph can't be deleted when deletion protection is enabled._Default_: If not specified, the default value is true. |
graph_name | string | Contains a user-supplied name for the Graph.If you don't specify a name, we generate a unique Graph Name using a combination of Stack Name and a UUID comprising of 4 characters._Important_: If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. |
provisioned_memory | integer | Memory for the Graph. |
public_connectivity | boolean | Specifies whether the Graph can be reached over the internet. Access to all graphs requires IAM authentication.When the Graph is publicly reachable, its Domain Name System (DNS) endpoint resolves to the public IP address from the internet.When the Graph isn't publicly reachable, you need to create a PrivateGraphEndpoint in a given VPC to ensure the DNS name resolves to a private IP address that is reachable from the VPC. _Default_: If not specified, the default value is false. |
replica_count | integer | Specifies the number of replicas you want when finished. All replicas will be provisioned in different availability zones.Replica Count should always be less than or equal to 2._Default_: If not specified, the default value is 1. |
tags | array | The tags associated with this graph. |
vector_search_configuration | object | Vector Search Configuration |
endpoint | string | The connection endpoint for the graph. For example: g-12a3bcdef4.us-east-1.neptune-graph.amazonaws.com |
graph_arn | string | Graph resource ARN |
graph_id | string | The auto-generated id assigned by the service. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
graph_id | string | The auto-generated id assigned by the service. |
region | string | AWS region. |
For more information, see AWS::NeptuneGraph::Graph.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | graphs | INSERT | ProvisionedMemory, region |
delete_resource | graphs | DELETE | Identifier, region |
update_resource | graphs | UPDATE | Identifier, PatchDocument, region |
list_resources | graphs_list_only | SELECT | region |
get_resource | graphs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual graph.
SELECT
region,
deletion_protection,
graph_name,
provisioned_memory,
public_connectivity,
replica_count,
tags,
vector_search_configuration,
endpoint,
graph_arn,
graph_id
FROM awscc.neptunegraph.graphs
WHERE
region = '{{ region }}' AND
Identifier = '{{ graph_id }}';
Lists all graphs in a region.
SELECT
region,
graph_id
FROM awscc.neptunegraph.graphs_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new graph resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.neptunegraph.graphs (
ProvisionedMemory,
region
)
SELECT
'{{ provisioned_memory }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.neptunegraph.graphs (
DeletionProtection,
GraphName,
ProvisionedMemory,
PublicConnectivity,
ReplicaCount,
Tags,
VectorSearchConfiguration,
region
)
SELECT
'{{ deletion_protection }}',
'{{ graph_name }}',
'{{ provisioned_memory }}',
'{{ public_connectivity }}',
'{{ replica_count }}',
'{{ tags }}',
'{{ vector_search_configuration }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: graph
props:
- name: deletion_protection
value: '{{ deletion_protection }}'
- name: graph_name
value: '{{ graph_name }}'
- name: provisioned_memory
value: '{{ provisioned_memory }}'
- name: public_connectivity
value: '{{ public_connectivity }}'
- name: replica_count
value: '{{ replica_count }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: vector_search_configuration
value:
vector_search_dimension: '{{ vector_search_dimension }}'
UPDATE example
Use the following StackQL query and manifest file to update a graph resource, using stack-deploy.
/*+ update */
UPDATE awscc.neptunegraph.graphs
SET PatchDocument = string('{{ {
"DeletionProtection": deletion_protection,
"ProvisionedMemory": provisioned_memory,
"PublicConnectivity": public_connectivity,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ graph_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.neptunegraph.graphs
WHERE
Identifier = '{{ graph_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the graphs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iam:PassRole,
neptune-graph:CreateGraph,
neptune-graph:GetGraph,
neptune-graph:ListTagsForResource,
neptune-graph:TagResource,
kms:DescribeKey,
kms:CreateGrant,
kms:Decrypt,
iam:CreateServiceLinkedRole
neptune-graph:GetGraph,
neptune-graph:ListTagsForResource,
kms:DescribeKey,
kms:CreateGrant,
kms:Decrypt
iam:PassRole,
neptune-graph:GetGraph,
neptune-graph:ListTagsForResource,
neptune-graph:TagResource,
neptune-graph:UntagResource,
neptune-graph:UpdateGraph,
kms:DescribeKey,
kms:CreateGrant,
kms:Decrypt
neptune-graph:DeleteGraph,
neptune-graph:GetGraph,
kms:DescribeKey,
kms:CreateGrant,
kms:Decrypt
neptune-graph:GetGraph,
neptune-graph:ListGraphs,
kms:DescribeKey,
kms:CreateGrant,
kms:Decrypt