在 Amazon Neptune 中使用管理 ARN - Amazon Neptune
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

在 Amazon Neptune 中使用管理 ARN

在 Amazon Web Services 中创建的资源分别使用 Amazon 资源名称 (ARN) 进行唯一标识。对于某些 Amazon Neptune 操作,您必须通过指定 Neptune 资源的 ARN 来唯一标识该资源。

重要

Amazon Neptune 共享 Amazon RDS ARN 的格式,用于使用 管理 API 参考 的管理操作。Neptune 管理 ARN 包含 rds,但不包含 neptune-db。有关标识 Neptune 数据资源的数据面板 ARN,请参阅指定数据资源

为 Neptune 构建 ARN

您可以使用以下语法为 Amazon Neptune 资源构造 ARN。请注意,Neptune 共享 Amazon RDS ARN 的格式。

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

下表显示在构造特定 Neptune 管理资源类型的 ARN 时应使用的格式。

资源类型 ARN 格式
数据库实例

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

例如:

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

数据库群集

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

例如:

arn:aws:rds:us-east-2:123456789012:cluster:my-cluster-1
事件订阅

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

例如:

arn:aws:rds:us-east-2:123456789012:es:my-subscription
数据库参数组

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

例如:

arn:aws:rds:us-east-2:123456789012:pg:my-param-enable-logs
数据库集群参数组

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

例如:

arn:aws:rds:us-east-2:123456789012:cluster-pg:my-cluster-param-timezone
数据库集群快照

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

例如:

arn:aws:rds:us-east-2:123456789012:cluster-snapshot:my-snap-20160809
数据库子网组

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

例如:

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

在 Amazon Neptune 中获取现有 ARN

你可以使用 Amazon Web Services Management Console、 Amazon Command Line Interface ()Amazon CLI或 Neptune API 获取 Neptune 资源的 ARN。

使用获取现有 ARN Amazon Web Services Management Console

要使用控制台获取 ARN,请导航到要获取其 ARN 的资源,然后查看该资源的详细信息。例如,要获取数据库实例的 ARN,请在导航面板中选择实例,然后从列表中选择所需的实例。此 ARN 位于实例详细信息部分。

使用获取现有 ARN Amazon CLI

要使用获取特定 Neptune 资源的 ARN,请使用该资源的describe命令。 Amazon CLI 下表显示了每条 Amazon CLI 命令以及用于获取 ARN 的命令的 ARN 属性。

Amazon CLI 命令 ARN 属性
describe-event-subscriptions EventSubscriptionArn
describe-certificates CertificateArn
describe-db-parameter-groups DB ParameterGroup Arn
describe-db-cluster-parameter-groups 数据库 ClusterParameter GroupArn
describe-db-instances 数据库 InstanceArn
describe-events SourceArn
describe-db-subnet-groups DB SubnetGroup Arn
describe-db-clusters 数据库 ClusterArn
describe-db-cluster-snapshots DB ClusterSnapshot Arn

例如,以下 Amazon CLI 命令获取数据库实例的 ARN。

对于 Linux、OS X 或 Unix:

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

对于 Windows:

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

使用 API 获取现有 ARN

要获取特定 Neptune 资源的 ARN,请调用以下 API 操作并使用如下所示的 ARN 属性。

Neptune API 操作 ARN 属性
DescribeEvent订阅 EventSubscriptionArn
DescribeCertificates CertificateArn
describedB ParameterGroups DB ParameterGroup Arn
describedB 群组 ClusterParameter 数据库 ClusterParameter GroupArn
DescribeDBInstances 数据库 InstanceArn
DescribeEvents SourceArn
describedB SubnetGroups DB SubnetGroup Arn
DescribeDBClusters 数据库 ClusterArn
describedB ClusterSnapshots DB ClusterSnapshot Arn