

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon DocumentDB Amazon リソースネーム (ARN) の理解
<a name="documentdb-arns"></a>

で作成したリソース AWS は、それぞれ Amazon リソースネーム (ARN) で一意に識別されます。特定の Amazon DocumentDB (MongoDB 互換) オペレーションでは、ARN を指定して、Amazon DocumentDB リソースを一意に識別する必要があります。例えば、リソースにタグを追加するときは、リソースの ARN を指定する必要があります。

**Topics**
+ [ARN の構築](#documentdb-arns-constructing)
+ [ARN の検索](#documentdb-arns-find)

## Amazon DocumentDB リソースの ARN の設定
<a name="documentdb-arns-constructing"></a>

次の構文を使用して Amazon DocumentDB リソースの ARN を構築できます。Amazon DocumentDB は、Amazon Relational Database Service (Amazon RDS) ARN の形式を共有します。Amazon DocumentDB ARN には `rds` を含み、`docdb` は含みません。

`arn:aws:rds:region:account_number:resource_type:resource_id`


| リージョン名 | リージョン | アベイラビリティーゾーン (コンピューティング) | 
| --- | --- | --- | 
| 米国東部 (オハイオ) | `us-east-2` | 3 | 
| 米国東部 (バージニア北部) | `us-east-1` | 6 | 
| 米国西部 (オレゴン) | `us-west-2` | 4 | 
| アフリカ (ケープタウン) | `af-south-1` | 3 | 
| 南米 (サンパウロ) | `sa-east-1` | 3 | 
| アジアパシフィック (香港) | `ap-east-1` | 3 | 
| アジアパシフィック (ハイデラバード) | `ap-south-2` | 3 | 
| アジアパシフィック (マレーシア) | `ap-southeast-5` | 3 | 
| アジアパシフィック (ムンバイ) | `ap-south-1` | 3 | 
| アジアパシフィック (大阪) | `ap-northeast-3` | 3 | 
| アジアパシフィック (ソウル) | `ap-northeast-2` | 4 | 
| アジアパシフィック (シンガポール) | `ap-southeast-1` | 3 | 
| アジアパシフィック (シドニー) | `ap-southeast-2` | 3 | 
| アジアパシフィック (ジャカルタ) | `ap-southeast-3` | 3 | 
| アジアパシフィック (メルボルン) | `ap-southeast-4` | 3 | 
| アジアパシフィック (タイ) | `ap-southeast-7` | 3 | 
| アジアパシフィック (東京) | `ap-northeast-1` | 3 | 
| カナダ (中部) | `ca-central-1` | 3 | 
| 中国 (北京) リージョン | `cn-north-1` | 3 | 
| 中国 (寧夏) | `cn-northwest-1` | 3 | 
| 欧州 (フランクフルト) | `eu-central-1` | 3 | 
| 欧州 (チューリッヒ) | `eu-central-2` | 3 | 
| 欧州 (アイルランド) | `eu-west-1` | 3 | 
| 欧州 (ロンドン) | `eu-west-2` | 3 | 
| 欧州 (ミラノ) | `eu-south-1` | 3 | 
| 欧州 (パリ) | `eu-west-3` | 3 | 
| 欧州 (スペイン) | `eu-south-2` | 3 | 
| 欧州 (ストックホルム) | `eu-north-1` | 3 | 
| メキシコ (中部) | `mx-central-1` | 3 | 
| 中東 (アラブ首長国連邦) | `me-central-1` | 3 | 
| イスラエル (テルアビブ) | `il-central-1` | 3 | 
| AWS GovCloud (米国西部) | `us-gov-west-1` | 3 | 
| AWS GovCloud (米国東部) | `us-gov-east-1` | 3 | 

**注記**  
Amazon DocumentDB アーキテクチャは、ストレージとコンピューティングを分離します。ストレージレイヤーの場合、Amazon DocumentDB はデータの 6 つのコピーを 3 つの AWS アベイラビリティーゾーン (AZs) にレプリケートします。上記の表にリストされている AZ は、特定のリージョンでコンピューティングインスタンスをプロビジョニングするために使用できる AZ の数です。例えば、ap-northeast-1 で Amazon DocumentDB クラスターを起動している場合、ストレージは 3 つの AZ にわたって 6 つの方法でレプリケートされますが、コンピューティングインスタンスは 2 つの AZ でしか使用できません。

次の表に、特定の Amazon DocumentDB リソースの ARN の構築時に使用する形式を示します。Amazon DocumentDB は Amazon RDS ARN の形式を共有します。Amazon DocumentDB ARN には `rds` を含み、`docdb` は含みません。


| リソースタイプ | ARN 形式/例 | 
| --- | --- | 
|  インスタンス (`db`)  |  `arn:aws:rds:region:account_number:db:resource_id` <pre>arn:aws:rds:us-east-1:1234567890:db:sample-db-instance</pre>  | 
|  クラスター (`cluster`)  |  `arn:aws:rds:region:account_number:cluster:resource_id` <pre>arn:aws:rds:us-east-1:1234567890:cluster:sample-db-cluster</pre>  | 
|  クラスターパラメータグループ (`cluster-pg`)  |  `arn:aws:rds:region:account_number:cluster-pg:resource_id` <pre>arn:aws:rds:us-east-1:1234567890:cluster-pg:sample-db-cluster-parameter-group</pre>  | 
|  セキュリティグループ (`secgrp`)  |  `arn:aws:rds:region:account_number:secgrp:resource_id` <pre>arn:aws:rds:us-east-1:1234567890:secgrp:sample-public-secgrp</pre>  | 
|  クラスタースナップショット (`cluster-snapshot`)  |  `arn:aws:rds:region:account_number:cluster-snapshot:resource_id` <pre>arn:aws:rds:us-east-1:1234567890:cluster-snapshot:sample-db-cluster-snapshot</pre>  | 
|  サブネットグループ (`subgrp`)  |  `arn:aws:rds:region:account_number:subgrp:resource_id` <pre>arn:aws:rds:us-east-1:1234567890:subgrp:sample-subnet-10</pre>  | 

## Amazon DocumentDB リソースの ARN を検索する
<a name="documentdb-arns-find"></a>

Amazon DocumentDB リソースの ARN は、 AWS マネジメントコンソール または を使用して確認できます AWS CLI。

------
#### [ Using the AWS マネジメントコンソール ]

コンソールを使用して ARN を検索するには、ARN を取得するリソースに移動し、そのリソースの詳細を表示します。

例えば、クラスターの詳細ページの **[設定]** タブを選択して、クラスターの ARN を取得できます。ARN は、次のスクリーンショットに示すように、**[設定とステータス]** セクションにあります。

![\[[詳細] ペインの設定およびステータスセクションで ARN を示すスクリーンショット\]](http://docs.aws.amazon.com/ja_jp/documentdb/latest/developerguide/images/documentdb-arn.png)


------
#### [ Using the AWS CLI ]

特定の Amazon DocumentDB リソース AWS CLI の を使用して ARN を取得するには、そのリソースの `describe`オペレーションを使用します。次の表は、各 AWS CLI オペレーションと、ARN を取得するオペレーションで使用される ARN プロパティを示しています。


| AWS CLI コマンド | ARN プロパティ | 
| --- | --- | 
|  `describe-db-instances`  |  `DBInstanceArn`  | 
|  `describe-db-clusters`  |  `DBClusterArn`  | 
|  `describe-db-parameter-groups`  |  `DBParameterGroupArn`  | 
|  `describe-db-cluster-parameter-groups`  |  `DBClusterParameterGroupArn`  | 
|  `describe-db-security-groups`  |  `DBSecurityGroupArn`  | 
|  `describe-db-snapshots`  |  `DBSnapshotArn`  | 
|  `describe-db-cluster-snapshots`  |  `DBClusterSnapshotArn`  | 
|  `describe-db-subnet-groups`  |  `DBSubnetGroupArn`  | 

**Example - クラスターの ARN の検索**  
次の AWS CLI オペレーションでは、クラスター の ARN を検索します`sample-cluster`。  
Linux、macOS、Unix の場合:  

```
aws docdb describe-db-clusters \
    --db-cluster-identifier sample-cluster \
    --query 'DBClusters[*].DBClusterArn'
```
Windows の場合:  

```
aws docdb describe-db-clusters ^
    --db-cluster-identifier sample-cluster \
    --query 'DBClusters[*].DBClusterArn'
```
このオペレーションによる出力は、次のようになります (JSON 形式)。  

```
[
    "arn:aws:rds:us-east-1:123456789012:cluster:sample-cluster"
]
```

**Example - 複数のパラメータグループの ARN の検索**  
Linux、macOS、Unix の場合:  

```
aws docdb describe-db-cluster-parameter-groups \
   --query 'DBClusterParameterGroups[*].DBClusterParameterGroupArn'
```
Windows の場合:  

```
aws docdb describe-db-cluster-parameter-groups ^
   --query 'DBClusterParameterGroups[*].DBClusterParameterGroupArn'
```
このオペレーションによる出力は、次のようになります (JSON 形式)。  

```
[
    "arn:aws:rds:us-east-1:123456789012:cluster-pg:custom3-6-param-grp",
    "arn:aws:rds:us-east-1:123456789012:cluster-pg:default.aurora5.6",
    "arn:aws:rds:us-east-1:123456789012:cluster-pg:default.docdb3.6"
]
```

------