Amazon Neptune
User Guide (API Version 2017-11-29)

Working with ARNs in Neptune

Resources that are created in Amazon Web Services are each uniquely identified with an Amazon Resource Name (ARN). For certain Amazon Neptune operations, you must uniquely identify a Neptune resource by specifying its ARN.

Important

Amazon Neptune shares the format of Amazon RDS ARNs. Neptune ARNs contain rds and not neptune.

Constructing an ARN for Neptune

You can construct an ARN for an Amazon Neptune resource using the following syntax. Neptune shares the format of Amazon RDS ARNs.

arn:aws:rds:<region>:<account number>:<resourcetype>:<name>

The following table shows the format that you should use when constructing an ARN for a particular Neptune resource type.

Resource Type ARN Format
DB instance

arn:aws:rds:<region>:<account>:db:<name>

For example:

arn:aws:rds:us-east-2:123456789012:db:my-instance-1

DB cluster

arn:aws:rds:<region>:<account>:cluster:<name>

For example:

arn:aws:rds:us-east-2:123456789012:cluster:my-cluster-1
Event subscription

arn:aws:rds:<region>:<account>:es:<name>

For example:

arn:aws:rds:us-east-2:123456789012:es:my-subscription
DB parameter group

arn:aws:rds:<region>:<account>:pg:<name>

For example:

arn:aws:rds:us-east-2:123456789012:pg:my-param-enable-logs
DB cluster parameter group

arn:aws:rds:<region>:<account>:cluster-pg:<name>

For example:

arn:aws:rds:us-east-2:123456789012:cluster-pg:my-cluster-param-timezone
DB snapshot

arn:aws:rds:<region>:<account>:snapshot:<name>

For example:

arn:aws:rds:us-east-2:123456789012:snapshot:my-snap-20130507
DB cluster snapshot

arn:aws:rds:<region>:<account>:cluster-snapshot:<name>

For example:

arn:aws:rds:us-east-2:123456789012:cluster-snapshot:my-snap-20160809
DB subnet group

arn:aws:rds:<region>:<account>:subgrp:<name>

For example:

arn:aws:rds:us-east-2:123456789012:subgrp:my-subnet-10

Getting an Existing ARN

You can get the ARN of a Neptune resource by using the AWS Management Console, AWS Command Line Interface (AWS CLI), or Neptune API.

AWS Management Console

To get an ARN using the console, navigate to the resource that you want an ARN for, and view the details for that resource. For example, to get the ARN for a DB instance, choose Instances in the navigation panel, and choose the instance that you want from the list. The ARN is in the Instance Details section.

AWS CLI

To use the AWS CLI to get an ARN for a particular Neptune resource, use the describe command for that resource. The following table shows each AWS CLI command and the ARN property that is used with the command to get an ARN.

AWS CLI Command ARN Property
describe-event-subscriptions EventSubscriptionArn
describe-certificates CertificateArn
describe-db-parameter-groups DBParameterGroupArn
describe-db-cluster-parameter-groups DBClusterParameterGroupArn
describe-db-instances DBInstanceArn
describe-db-snapshots DBSnapshotArn
describe-events SourceArn
describe-db-subnet-groups DBSubnetGroupArn
describe-db-clusters DBClusterArn
describe-db-cluster-snapshots DBClusterSnapshotArn

For example, the following AWS CLI command gets the ARN for a DB instance.

Example

For Linux, OS X, or Unix:

aws neptune describe-db-instances \ --db-instance-identifier DBInstanceIdentifier \ --region us-west-2

For Windows:

aws neptune describe-db-instances ^ --db-instance-identifier DBInstanceIdentifier ^ --region us-west-2

API

To get an ARN for a particular Neptune resource, call the following Amazon RDS API actions, and use the ARN properties shown.

Neptune API Action ARN Property
DescribeEventSubscriptions EventSubscriptionArn
DescribeCertificates CertificateArn
DescribeDBParameterGroups DBParameterGroupArn
DescribeDBClusterParameterGroups DBClusterParameterGroupArn
DescribeDBInstances DBInstanceArn
DescribeDBSnapshots DBSnapshotArn
DescribeEvents SourceArn
DescribeDBSubnetGroups DBSubnetGroupArn
DescribeDBClusters DBClusterArn
DescribeDBClusterSnapshots DBClusterSnapshotArn