Amazon DocumentDB Amazon リソースネーム (ARN) の理解 - Amazon DocumentDB

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

Amazon DocumentDB Amazon リソースネーム (ARN) の理解

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

Amazon DocumentDB リソースの ARN の構築

次の構文を使用して 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

南米(サンパウロ)

sa-east-1

3

アジアパシフィック (香港)

ap-east-1

3

アジアパシフィック (ハイデラバード)

ap-south-2

3

アジアパシフィック(ムンバイ)

ap-south-1

3

アジアパシフィック(ソウル)

ap-northeast-2

4

アジアパシフィック(シンガポール)

ap-southeast-1

3

アジアパシフィック(シドニー)

ap-southeast-2

3

アジアパシフィック(東京)

ap-northeast-1

3

カナダ(中部)

ca-central-1

3

中国 (北京) リージョン

cn-north-1

3

中国 (寧夏)

cn-northwest-1

3

欧州 (フランクフルト)

eu-central-1

3

欧州 (アイルランド)

eu-west-1

3

欧州 (ロンドン)

eu-west-2

3

欧州 (ミラノ)

eu-south-1

3

欧州 (パリ)

eu-west-3

3

中東 (アラブ首長国連邦)

me-central-1

3

AWS GovCloud (米国西部)

us-gov-west-1

3

AWS GovCloud (米国東部)

us-gov-east-1

3

注記

Amazon DocumentDB アーキテクチャは、ストレージとコンピューティングを分離します。ストレージレイヤーでは、Amazon DocumentDB は 3 AWS つのアベイラビリティーゾーン (AZ) にデータの 6 つのコピーをレプリケートします。上記の表にリストされている 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

arn:aws:rds:us-east-1:1234567890:db:sample-db-instance

クラスター (cluster)

arn:aws:rds:region:account_number:cluster:resource_id

arn:aws:rds:us-east-1:1234567890:cluster:sample-db-cluster

クラスターパラメータグループ (cluster-pg)

arn:aws:rds:region:account_number:cluster-pg:resource_id

arn:aws:rds:us-east-1:1234567890:cluster-pg:sample-db-cluster-parameter-group

セキュリティグループ (secgrp)

arn:aws:rds:region:account_number:secgrp:resource_id

arn:aws:rds:us-east-1:1234567890:secgrp:sample-public-secgrp

クラスタースナップショット (cluster-snapshot)

arn:aws:rds:region:account_number:cluster-snapshot:resource_id

arn:aws:rds:us-east-1:1234567890:cluster-snapshot:sample-db-cluster-snapshot

サブネットグループ (subgrp)

arn:aws:rds:region:account_number:subgrp:resource_id

arn:aws:rds:us-east-1:1234567890:subgrp:sample-subnet-10

Amazon DocumentDB リソース ARN を検索する

Amazon DocumentDB リソースの ARN は、またはを使用して検索できます。 AWS Management Console AWS CLI

Using the AWS Management Console

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

たとえば、次のスクリーンショットのように、クラスターの [詳細] ペインでクラスターの ARN を取得できます。


                     [詳細] ペインの設定およびステータスセクションで ARN を示すスクリーンショット
Using the AWS CLI

を使用して特定の Amazon DocumentDB リソースの ARN を取得するには、describeそのリソースのオペレーションを使用してください。 AWS CLI 次の表は、 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

例 - クラスターの ARN の検索

AWS CLI 次の操作では、sample-clusterクラスターの ARN を検索します。

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" ]
例 - 複数のパラメータグループの 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" ]