

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

# ARNs 在 Amazon Neptune 中与管理员合作
<a name="tagging-arns"></a>

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

**重要**  
Amazon Neptune 与 Amazon RDS ARNs 的格式相同，用于使用该格式的管理操作。[管理 API 参考](api.md)Neptune 管理 ARNs 包含，不包含`rds`。`neptune-db`有关标识 Neptune 数据资源的数据平面 ARNs ，[请参阅指定](iam-data-resources.md)数据资源。

**Topics**
+ [为 Neptune 构建 ARN](tagging-arns-constructing.md)
+ [在 Amazon Neptune 中获取现有 ARN](#tagging-arns-getting)

# 为 Neptune 构建 ARN
<a name="tagging-arns-constructing"></a>

您可以使用以下语法为 Amazon Neptune 资源构造 ARN。请注意，Neptune 与 Amazon RDS 的格式相同。 ARNs

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

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


****  

| 资源类型 | ARN 格式 | 
| --- | --- | 
| 数据库实例  |  arn: aws: rds:: *<region>* *<account>* `:db:` *<name>* 例如： <pre>arn:aws:rds:us-east-2:123456789012:db:my-instance-1</pre>  | 
| 数据库群集 |  arn: aws: rds:: *<region>* *<account>* `:cluster:` *<name>* 例如： <pre>arn:aws:rds:us-east-2:123456789012:cluster:my-cluster-1</pre>  | 
| 事件订阅  |  arn: aws: rds:: *<region>* *<account>* `:es:` *<name>* 例如： <pre>arn:aws:rds:us-east-2:123456789012:es:my-subscription</pre>  | 
| 数据库参数组  |  arn: aws: rds:: *<region>* *<account>* `:pg:` *<name>* 例如： <pre>arn:aws:rds:us-east-2:123456789012:pg:my-param-enable-logs</pre>  | 
| 数据库集群参数组  |  arn: aws: rds:: *<region>* *<account>* `:cluster-pg:` *<name>* 例如： <pre>arn:aws:rds:us-east-2:123456789012:cluster-pg:my-cluster-param-timezone</pre>  | 
| 数据库集群快照  |  arn: aws:: `rds:` *<region>* *<account>* `:cluster-snapshot:` *<name>* 例如： <pre>arn:aws:rds:us-east-2:123456789012:cluster-snapshot:my-snap-20160809</pre>  | 
| 数据库子网组  |  arn: aws:: `rds:` *<region>* *<account>* `:subgrp:` *<name>* 例如： <pre>arn:aws:rds:us-east-2:123456789012:subgrp:my-subnet-10</pre>  | 

## 在 Amazon Neptune 中获取现有 ARN
<a name="tagging-arns-getting"></a>

你可以使用 AWS 管理控制台、 AWS Command Line Interface ()AWS CLI或 Neptune API 获取 Neptune 资源的 ARN。

### 使用获取现有 ARN AWS 管理控制台
<a name="tagging-arns-console"></a>

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

### 使用获取现有 ARN AWS CLI
<a name="tagging-arns-cli"></a>

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


****  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/neptune/latest/userguide/tagging-arns.html)

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

**Example**  
对于 Linux、OS X 或 Unix：  

```
1. aws neptune describe-db-instances \
2. --db-instance-identifier DBInstanceIdentifier \
3. --region us-west-2
```
对于 Windows：  

```
1. aws neptune describe-db-instances ^
2. --db-instance-identifier DBInstanceIdentifier ^
3. --region us-west-2
```

### 使用 API 获取现有 ARN
<a name="tagging-arns-api"></a>

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


****  
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/neptune/latest/userguide/tagging-arns.html)