# ドメイン予約コマンド

### 概要 <a href="#overview" id="overview"></a>

Keeperコマンダーには、エンタープライズ管理者がドメインを予約して管理するための機能があります。これらのコマンドを使えば、Keeper管理者は自社エンタープライズ用にドメインを確保でき、そのドメインのメールアドレスによるユーザーアカウントは、許可されたエンタープライズ内でのみ作成されるようにできます。

**予約ドメイン**とは、DNSドメイン (例: `company.com`) を特定のKeeperエンタープライズのテナントに登録した状態を指します。予約後は、そのドメインのメールアドレスでは当該エンタープライズ以外がユーザーを作成できず、不正なアカウント作成を防ぎます。

{% hint style="info" %}
ドメイン予約APIは2026年5月に利用可能となる予定です。
{% endhint %}

***

### ユーザーコマンド <a href="#user-commands" id="user-commands"></a>

#### エンタープライズ管理者向けコマンド <a href="#enterprise-administrator-commands" id="enterprise-administrator-commands"></a>

* [`domain list`](#list-domains---list-reserved-domains) – エンタープライズのすべての予約ドメインを表示
* [`domain reserve`](#reserve-domain---reserve-and-manage-domains) – ドメインをエンタープライズに予約および削除

エンタープライズドメインを管理する**Keeper管理者**は、次のコマンドを利用できます。

* [`domain list`](#list-domains---list-reserved-domains) – 自社エンタープライズの予約済みドメインをすべて表示
* [`domain reserve`](#reserve-domain---reserve-and-manage-domains) – エンタープライズへのドメインの予約および削除
* [`domain alias list`](#domain-reservation-workflow-1) – 自社エンタープライズのドメインエイリアスをすべて表示
* [`domain alias create`](#domain-alias-create-create-a-domain-alias) – エンタープライズにドメインエイリアスを作成
* [`domain alias delete`](#domain-alias-delete-delete-a-domain-alias) – エンタープライズのドメインエイリアスを削除

***

### 用語 <a href="#terminology" id="terminology"></a>

次の表に、Keeperのプラットフォームで使うドメイン管理の用語をまとめました。

| 用語集             | 説明                                                                                |
| --------------- | --------------------------------------------------------------------------------- |
| **予約ドメイン**      | エンタープライズによって検証およびクレームされた DNS ドメイン。このエンタープライズのみがこのドメインのメールアドレスを持つユーザーアカウントを作成できます。 |
| **ドメイン検証**      | Keeper が提供するトークンを含む DNS TXT レコードを追加することでドメイン所有権を証明するプロセス。                         |
| **検証トークン**      | 所有権を証明するためにドメインの DNS TXT レコードに追加する必要がある、Keeper によって生成された一意の文字列。                   |
| **エンタープライズ管理者** | Keeper Enterprise における最高レベルの管理権限で、予約ドメインを管理するために必要です。                             |

| 用語              | 説明                                                              |
| --------------- | --------------------------------------------------------------- |
| **予約ドメイン**      | エンタープライズが検証し確保したDNSドメイン。そのドメインのメールアドレスでユーザーを作成できるのは当該エンタープライズのみ |
| **ドメイン検証**      | Keeperが提示するトークンを含むDNSのTXTレコードを置き、ドメイン所有を証明する手順                  |
| **検証トークン**      | Keeperが生成する一意の文字列。ドメインのDNSのTXTレコードに置き、所有を証明する                   |
| **ドメインエイリアス**   | 同一エンタープライズ内の既存の予約ドメインに紐づく追加のドメイン名                               |
| **エンタープライズ管理者** | Keeperエンタープライズで最高レベルの管理権限を持つロール。予約ドメインの管理に必須                    |

***

### ドメイン管理コマンド <a href="#domain-management-commands-1" id="domain-management-commands-1"></a>

<table><thead><tr><th width="206.10546875">コマンド</th><th>エイリアス</th><th>アクション</th><th>説明</th><th>権限</th></tr></thead><tbody><tr><td><a href="#list-domains---list-reserved-domains"><code>domain list</code></a></td><td><code>dl</code></td><td>-</td><td>予約済みドメインの一覧表示</td><td>エンタープライズ管理者</td></tr><tr><td><a href="#step-1-generate-verification-token"><code>domain reserve</code></a></td><td><code>dr</code></td><td><code>token</code></td><td>検証トークンの生成</td><td>エンタープライズ管理者</td></tr><tr><td><a href="#step-2-add-domain-after-verification"><code>domain reserve</code></a></td><td><code>dr</code></td><td><code>add</code></td><td>検証済みドメインの追加</td><td>エンタープライズ管理者</td></tr><tr><td><a href="#step-3-remove-reserved-domain"><code>domain reserve</code></a></td><td><code>dr</code></td><td><code>delete</code></td><td>予約済みドメインの削除</td><td>エンタープライズ管理者</td></tr><tr><td><a href="#domain-alias-list-list-domain-aliases"><code>domain alias list</code></a></td><td><code>dal</code></td><td>-</td><td>ドメインエイリアスの一覧表示</td><td>エンタープライズ管理者</td></tr><tr><td><a href="#domain-alias-create-create-a-domain-alias"><code>domain alias create</code></a></td><td><code>dac</code></td><td>-</td><td>ドメインエイリアスの作成</td><td>エンタープライズ管理者</td></tr><tr><td><a href="#domain-alias-delete-delete-a-domain-alias"><code>domain alias delete</code></a></td><td><code>dad</code></td><td>-</td><td>ドメインエイリアスの削除</td><td>エンタープライズ管理者</td></tr></tbody></table>

#### `domain list` コマンド – 予約済みドメインの一覧表示 <a href="#list-domains---list-reserved-domains" id="list-domains---list-reserved-domains"></a>

自社エンタープライズで現在予約されているドメインをすべて一覧表示します。

**コマンド構文**

```
domain list [--format=FORMAT] [--output=FILE]
```

**エイリアス:** `ld`

**パラメータ**

* `--format`: 出力形式 (`table` または `json`)。デフォルトは `table`
* `--output`: 結果を書き出すファイル名

**必要な権限:** エンタープライズ管理者

**例**

**例1: 表形式で予約済みドメインを表示**

```
My Vault> domain list
Domain Name
--------------------
example.com
company.com
enterprise.net
```

**例2: JSON形式で予約済みドメインを表示**

```
My Vault> domain list --format=json
[
  "example.com",
  "company.com",
  "enterprise.net"
]
```

**例3: ドメイン一覧をファイルに保存**

```
My Vault> domain list --format=json --output=domains.json
Results saved to domains.json
```

**例4: 短縮コマンド (`dl`) の使用**

```
My Vault> dl
Domain Name
-------------
example.com
company.com
```

***

#### `domain reserve` コマンド – ドメインの予約と管理 <a href="#reserve-domain---reserve-and-manage-domains" id="reserve-domain---reserve-and-manage-domains"></a>

対象のエンタープライズについて、ドメインの予約・検証・削除を行います。検証は次の3手順で進めます。

**コマンド構文**

```
domain reserve --action=ACTION --domain=DOMAIN
```

**エイリアス:** `dr`

**パラメータ**

* `--action`: 必須
  * `token` – DNS用の検証トークンを生成
  * `add` – DNS検証後にドメインを追加
  * `delete` – 予約済みドメインを削除
* `--domain`: 必須。管理対象のドメイン名 (例: `example.com`)

**必要な権限:** エンタープライズ管理者

***

### ドメイン予約のワークフロー <a href="#domain-reservation-workflow" id="domain-reservation-workflow"></a>

#### 手順1: 検証トークンの生成 <a href="#step-1-generate-verification-token" id="step-1-generate-verification-token"></a>

ドメイン用のDNS検証トークンを生成します。

**コマンド構文**

```
domain reserve --action token --domain DOMAIN
```

**例**

**例1: ドメイン用トークンの生成**

```
My Vault> domain reserve --action token --domain example.com

Token generated successfully!

Domain: example.com
Token:  abc123def456ghi789

Next steps:
1. Log into your domain registrar or DNS provider
2. Add a TXT record for domain "example.com" with value:
   abc123def456ghi789
3. Wait for DNS propagation (may take a few minutes)
4. Run: domain reserve --action add --domain example.com
```

#### 手順2: 検証後のドメイン追加 <a href="#step-2-add-domain-after-verification" id="step-2-add-domain-after-verification"></a>

DNSにTXTレコードを追加したあと、ドメインを検証して予約します。

**コマンド構文**

```
domain reserve --action add --domain DOMAIN
```

**例**

**例1: 検証済みドメインの追加**

```
My Vault> domain reserve --action add --domain example.com
Domain "example.com" has been reserved for the enterprise
```

#### 手順3: 予約済みドメインの削除 <a href="#step-3-remove-reserved-domain" id="step-3-remove-reserved-domain"></a>

エンタープライズの予約一覧からドメインを削除します。

**省略可能なパラメータ**

* `--force`: 確認プロンプトを省略する場合に指定

**コマンド構文**

```
domain reserve --action delete --domain DOMAIN --force
```

**例**

**例1: --force フラグ付きでドメインを削除 (確認プロンプトを省略)**

```
My Vault> domain reserve --action delete --domain old-company.com --force
Domain "old-company.com" has been removed from the enterprise
```

**例2: --force なしでドメインを削除**

```
My Vault> domain reserve --action delete --domain old-company.com
Are you sure you want to delete domain "old-company.com"? (y/n): y
Domain "old-company.com" has been removed from the enterprise
```

***

### ドメインエイリアスコマンド <a href="#domain-reservation-workflow" id="domain-reservation-workflow"></a>

ドメインエイリアスは、エンタープライズ内の既存の予約ドメインに紐づく別名のドメインです。複数ドメインからのユーザーを同じエンタープライズにまとめられ、ドメインごとに改めて予約しなくてよくなります。

エイリアスを追加するには、もとになるドメインがすでにエンタープライズで予約されている必要があります。操作できるのは、ユーザーの管理権限を持つエンタープライズ管理者です。

#### **`domain alias list` コマンド – ドメインエイリアスの一覧表示**

自社エンタープライズで現在構成されているドメインエイリアスをすべて一覧表示します。

**コマンド構文**

```
domain alias list [--format=FORMAT] [--output=FILE]
```

**エイリアス:** `dal`

**パラメータ**

* `--format`: 出力形式 (`table` または `json`)。デフォルトは `table`
* `--output`: 結果を書き出すファイル名

**必要な権限:** エンタープライズ管理者

**例**

**例1: 表形式でエイリアスを一覧表示**

```
My Vault> domain alias list
Domain        Alias
----------    --------------------
example.com   alias1.com
example.com   alias2.net
```

**例2: JSON形式でエイリアスを一覧表示**

```
My Vault> domain alias list --format=json
[
  { "domain": "example.com", "alias": "alias1.com" },
  { "domain": "example.com", "alias": "alias2.net" }
]
```

**例3: 短縮コマンド (`dal`) の使用**

```
My Vault> dal
Domain        Alias
----------    --------------------
example.com   alias1.com
```

***

#### **`domain alias create` コマンド – ドメインエイリアスの作成**

エンタープライズがすでに予約しているドメインに対して、1件以上のエイリアスを作成します。`--alias` を繰り返すと、1回のコマンドで複数のエイリアスを作成できます。

**コマンド構文**

```
domain alias create --domain=DOMAIN --alias=ALIAS [--alias=ALIAS ...] [--format=FORMAT]
```

**エイリアス:** `dac`

**パラメータ**

* `--domain`: 必須。エイリアスを作成する対象の予約済みドメイン
* `--alias`: 必須。作成するエイリアス (複数は繰り返し指定)
* `--format`: 出力形式 (`text` または `json`)。デフォルトは `text`

**必要な権限:** エンタープライズ管理者

**例**

**例1: ドメインエイリアスの作成**

```
My Vault> domain alias create --domain example.com --alias alias1.com
Created domain alias 'alias1.com' for domain 'example.com'
```

**例3: JSON出力**

```
My Vault> domain alias create --domain example.com --alias alias1.com --format json
[
  {
    "domain": "example.com",
    "alias": "alias1.com",
    "status": 0,
    "status_message": "Success"
  }
]
```

***

#### **`domain alias delete` コマンド – ドメインエイリアスの削除**

予約ドメインから1件以上のエイリアスを削除します。既定では確認プロンプトが表示されます。

**コマンド構文**

```
domain alias delete --domain=DOMAIN --alias=ALIAS [--alias=ALIAS ...] [--format=FORMAT] [--force]
```

**エイリアス:** `dad`

**パラメータ**

* `--domain`: 必須。エイリアスを削除する対象のドメイン
* `--alias`: 必須。削除するエイリアス (複数は繰り返し指定)
* `--format`: 出力形式 (`text` または `json`)。デフォルトは `text`
* `--force`: 確認プロンプトを省略

**必要な権限:** エンタープライズ管理者

**例**

**例1: 確認プロンプト付きでエイリアスを削除**

```
My Vault> domain alias delete --domain example.com --alias alias1.com
Are you sure you want to delete alias(es) [alias1.com] for domain "example.com"? (y/N): y
Deleted domain alias 'alias1.com' for domain 'example.com'
```

**例2: 確認なしでエイリアスを削除**

```
My Vault> domain alias delete --domain example.com --alias alias1.com --force
Deleted domain alias 'alias1.com' for domain 'example.com'
```

***

### DNS構成ガイド <a href="#dns-configuration-guide" id="dns-configuration-guide"></a>

#### ドメイン検証用TXTレコードの追加 <a href="#adding-txt-record-for-domain-verification" id="adding-txt-record-for-domain-verification"></a>

**手順**

1. **トークンの生成**

   ```
   domain reserve --action token --domain example.com
   ```
2. **DNSプロバイダーへのアクセス**
   * ドメイン登録業者またはDNSホスティングプロバイダーにログイン (例: GoDaddy、Cloudflare、Route53、Namecheap)
3. **TXTレコードの追加**
   * **レコード種別:** TXT
   * **ホスト/名前:** `example.com`
   * **値:** `abc123def456ghi789` (実際に発行されたトークンを使用)
4. **ドメインの追加**

   ```
   domain reserve --action add --domain example.com
   ```

***

### ワークフロー全体の例 <a href="#complete-workflow-example" id="complete-workflow-example"></a>

新しいドメインを予約するときの手順を、コマンド例で示したものです。

```
# Step 1: List current domains
My Vault> domain list
Domain Name
-------------
company.com

# Step 2: Generate token for new domain
My Vault> domain reserve --action token --domain newacquisition.com

Token generated successfully!

Domain: newacquisition.com
Token:  def789ghi123jkl456

Next steps:
1. Log into your domain registrar or DNS provider
2. Add a TXT record for domain "newacquisition.com" with value:
   def789ghi123jkl456
3. Wait for DNS propagation (may take a few minutes)
4. Run: domain reserve --action add --domain newacquisition.com

# Step 3: [User adds TXT record to DNS]

# Step 4: Add domain after verification
My Vault> domain reserve --action add --domain newacquisition.com --force
Domain "newacquisition.com" has been reserved for the enterprise

# Step 5: Verify the domain was added
My Vault> domain list
Domain Name
------------
company.com
newacquisition.com
```

***

Keeper Commander の詳細については、次を参照してください： [Commander CLI ドキュメント](/keeperpam/jp/commander-cli/overview.md).

Keeperコマンダーの詳細については、[コマンダーCLIのページ](/keeperpam/jp/commander-cli/overview.md)をご参照ください。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeperpam/jp/commander-cli/command-reference/domain-reservation-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
