

# カスタムエンドポイントの作成
<a name="aurora-custom-endpoint-creating"></a>

AWS マネジメントコンソール、AWS CLI、または Amazon RDS API を使用してカスタムエンドポイントを作成します。

## コンソール
<a name="aurora-create-endpoint.console"></a>

AWS マネジメントコンソール でカスタムエンドポイントを作成するには、クラスターの詳細ページに移動し、[**エンドポイント**] セクションの [`Create custom endpoint`] アクションを選択します。カスタムエンドポイントの名前を選択します。名前はユーザー ID およびリージョンで一意なものを使用します。クラスターが拡張しても変更されない DB インスタンスのリストを選択するには、[**Attach future instances added to this cluster (今後追加されるインスタンスをこのクラスターにアタッチ)**] をオフのままにします。このチェックボックスをオンにすると、カスタムエンドポイントは、クラスターに新しく追加されたインスタンスを動的に追加します。

![エンドポイント識別子、インスタンスタイプ選択、および静的/実行オプションの各フィールドを含むカスタムエンドポイントページを作成します。](http://docs.aws.amazon.com/ja_jp/AmazonRDS/latest/AuroraUserGuide/images/AuroraCreateCustomEndpoint.png)


カスタムエンドポイントタイプを AWS マネジメントコンソール で選択することはできません。AWS マネジメントコンソール で作成するすべてのカスタムエンドポイントは `ANY` タイプになります。

## AWS CLI
<a name="aurora-create-endpoint.cli"></a>

AWS CLI でカスタムエンドポイントを作成するには、[create-db-cluster-endpoint](https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-cluster-endpoint.html) コマンドを実行します。

次のコマンドは、特定のクラスターにアタッチされるカスタムエンドポイントを作成します。当初、エンドポイントはクラスター内のすべての Aurora レプリカインスタンスに関連付けられます。後続のコマンドで、エンドポイントをクラスター内の特定の DB インスタンスのセットに関連付けます。

Linux、macOS、Unix の場合:

```
aws rds create-db-cluster-endpoint --db-cluster-endpoint-identifier custom-endpoint-doc-sample \
  --endpoint-type reader \
  --db-cluster-identifier {{cluster_id}}

aws rds modify-db-cluster-endpoint --db-cluster-endpoint-identifier custom-endpoint-doc-sample \
  --static-members {{instance_name_1}} {{instance_name_2}}
```

Windows の場合:

```
aws rds create-db-cluster-endpoint --db-cluster-endpoint-identifier custom-endpoint-doc-sample ^
  --endpoint-type reader ^
  --db-cluster-identifier {{cluster_id}}

aws rds modify-db-cluster-endpoint --db-cluster-endpoint-identifier custom-endpoint-doc-sample ^
  --static-members {{instance_name_1}} {{instance_name_2}}
```

## RDS API
<a name="aurora-create-endpoint.api"></a>

RDS API でカスタムエンドポイントを作成するには、[CreateDBClusterEndpoint](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBClusterEndpoint.html) オペレーションを実行します。