本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
在 Amazon Neptune 中使用管理 ARN
在 Amazon Web Services 中创建的资源分别使用 Amazon 资源名称 (ARN) 进行唯一标识。对于某些 Amazon Neptune 操作,您必须通过指定 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: 例如:
|
数据库群集 |
arn:aws:rds: 例如:
|
事件订阅 |
arn:aws:rds: 例如:
|
数据库参数组 |
arn:aws:rds: 例如:
|
数据库集群参数组 |
arn:aws:rds: 例如:
|
数据库集群快照 |
arn:aws: 例如:
|
数据库子网组 |
arn:aws: 例如:
|
在 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 | 数据库 ParameterGroupArn |
describe-db-cluster-parameter-群组 | 数据库 ClusterParameterGroupArn |
describe-db-instances | 数据库 InstanceArn |
describe-events | SourceArn |
describe-db-subnet-groups | 数据库 SubnetGroupArn |
describe-db-clusters | 数据库 ClusterArn |
describe-db-cluster-snapshots | 数据库 ClusterSnapshotArn |
例如,以下 Amazon CLI 命令获取数据库实例的 ARN。
例
对于 Linux、OS X 或 Unix:
aws neptune describe-db-instances \ --db-instance-identifier
DBInstanceIdentifier
\ --regionus-west-2
对于 Windows:
aws neptune describe-db-instances ^ --db-instance-identifier
DBInstanceIdentifier
^ --regionus-west-2
使用 API 获取现有 ARN
要获取特定 Neptune 资源的 ARN,请调用以下 API 操作并使用如下所示的 ARN 属性。
Neptune API 操作 | ARN 属性 |
---|---|
DescribeEventSubscriptions | EventSubscriptionArn |
DescribeCertificates | CertificateArn |
describedB ParameterGroups | 数据库 ParameterGroupArn |
describedB ClusterParameterGroups | 数据库 ClusterParameterGroupArn |
DescribeDBInstances | 数据库 InstanceArn |
DescribeEvents | SourceArn |
describedB SubnetGroups | 数据库 SubnetGroupArn |
DescribeDBClusters | 数据库 ClusterArn |
describedB ClusterSnapshots | 数据库 ClusterSnapshotArn |