次の方法で共有


configure コマンド

既存のデータ API ビルダー構成ファイルで、エンティティ以外のランタイムとデータ ソースのプロパティを構成します。 未指定のオプションでは、既存の値は変更されません。 指定されたオプションが無効な場合、更新全体が失敗します (すべてまたは何もできません)。

構文

dab configure [options]

このコマンドは、 entities セクションを変更しません。 エンティティの変更には dab update を使用します。

チラッ

Option 概要
-c, --config 構成ファイルへのパス (既定の dab-config.json)。
--data-source.database-type データベースの種類を設定します。
--data-source.connection-string データベース接続文字列を設定します。
--data-source.options.database Cosmos DB for NoSql のデータベース名。
--data-source.options.container NoSql 用 Cosmos DB のコンテナー名。
--data-source.options.schema Cosmos DB for NoSql のスキーマ パス。
--data-source.options.set-session-context セッション コンテキストを有効にします。
--runtime.graphql.depth-limit クエリの最大深度を制限します。
--runtime.graphql.enabled GraphQL エンドポイントを有効または無効にします。
--runtime.graphql.path GraphQL エンドポイント パスをカスタマイズします。
--runtime.graphql.allow-introspection GraphQL のイントロスペクションを許可または拒否します。
--runtime.graphql.multiple-mutations.create.enabled 複数作成の変更を有効にします。
--runtime.rest.enabled REST エンドポイントを有効または無効にします。
--runtime.rest.path REST エンドポイント パスをカスタマイズします。
--runtime.rest.request-body-strict 厳密な REST 要求本文の検証を適用します。
--runtime.mcp.enabled MCP エンドポイントを有効または無効にします。
--runtime.mcp.path MCP エンドポイント パスをカスタマイズします。
--runtime.mcp.dml-tools.enabled すべての MCP DML ツールを有効または無効にします。
--runtime.mcp.dml-tools.describe-entities.enabled describe-entities ツールを有効または無効にします。
--runtime.mcp.dml-tools.create-record.enabled レコード作成ツールを有効または無効にします。
--runtime.mcp.dml-tools.read-records.enabled 読み取りレコード ツールを有効または無効にします。
--runtime.mcp.dml-tools.update-record.enabled 更新レコード ツールを有効または無効にします。
--runtime.mcp.dml-tools.delete-record.enabled レコード削除ツールを有効または無効にします。
--runtime.mcp.dml-tools.execute-entity.enabled execute-entity ツールを有効または無効にします。
--runtime.cache.enabled グローバル キャッシュを有効または無効にします。
--runtime.cache.ttl-seconds グローバル キャッシュ TTL (秒単位)。
--runtime.host.mode ホスト モードの設定: 開発または運用。
--runtime.host.cors.origins 許可された CORS の配信元。
--runtime.host.cors.allow-credentials CORS 許可資格情報を設定します。
--runtime.host.authentication.provider 認証プロバイダー。
--runtime.host.authentication.jwt.audience JWT 対象ユーザーの要求。
--runtime.host.authentication.jwt.issuer JWT 発行者要求。
--azure-key-vault.endpoint Azure Key Vault のベース エンドポイント。
--azure-key-vault.retry-policy.mode 再試行ポリシー モード。
--azure-key-vault.retry-policy.max-count 最大再試行回数。
--azure-key-vault.retry-policy.delay-seconds 再試行間の遅延。
--azure-key-vault.retry-policy.max-delay-seconds 指数再試行の最大遅延。
--azure-key-vault.retry-policy.network-timeout-seconds ネットワーク呼び出しのタイムアウト。
--runtime.telemetry.azure-log-analytics.enabled Azure Log Analytics テレメトリを有効にします。
--runtime.telemetry.azure-log-analytics.dab-identifier ログの配信元を識別します。
--runtime.telemetry.azure-log-analytics.flush-interval-seconds フラッシュの周期を秒単位で指定します。
--runtime.telemetry.azure-log-analytics.auth.custom-table-name カスタム テーブル名。
--runtime.telemetry.azure-log-analytics.auth.dcr-immutable-id データ収集規則 ID。
--runtime.telemetry.azure-log-analytics.auth.dce-endpoint データ収集エンドポイント。
--runtime.telemetry.file.enabled ファイル シンク テレメトリを有効にします。
--runtime.telemetry.file.path ログ ファイルへのパス。
--runtime.telemetry.file.rolling-interval ローリング間隔。
--runtime.telemetry.file.retained-file-count-limit 保持されるファイルの最大数。
--runtime.telemetry.file.file-size-limit-bytes ローリング前のファイルあたりの最大サイズ。
--help このヘルプ画面を表示します。
--version バージョン情報を表示します。

-c, --config

構成ファイルへのパス。 dab-config.jsonが存在しない限り、既定値は dab-config.<DAB_ENVIRONMENT>.json で、DAB_ENVIRONMENTは環境変数です。

Example

dab configure \
  --config ./dab-config.json \
  --runtime.rest.enabled true

--data-source.database-type

データベースの種類。

使用できる値:

  • MSSQL
  • PostgreSQL
  • CosmosDB_NoSQL
  • MySQL

Example

dab configure \
  --data-source.database-type PostgreSQL

結果の構成

{
  "data-source": {
    "database-type": "postgresql"
  }
}

--data-source.connection-string

データ ソースの接続文字列。

Example

dab configure \
  --data-source.connection-string "Server=myserver;Database=mydb;User Id=myuser;Password=mypassword;"

--data-source.options.database

Cosmos DB for NoSql のデータベース名。

Example

dab configure \
  --data-source.options.database MyCosmosDatabase

--data-source.options.container

NoSql 用 Cosmos DB のコンテナー名。

Example

dab configure \
  --data-source.options.container MyCosmosContainer

--data-source.options.schema

Cosmos DB for NoSql のスキーマ パス。

Example

dab configure \
  --data-source.options.schema ./schema.gql

--data-source.options.set-session-context

セッション コンテキストを有効にします。

使用できる値:

  • true (既定値)
  • false

Example

dab configure \
  --data-source.options.set-session-context false

結果の構成

{
  "data-source": {
    "options": {
      "set-session-context": false
    }
  }
}

--runtime.graphql.depth-limit

入れ子になったクエリの最大許容深さ。

使用できる値:

  • $(0,2147483647]$ (包括)
  • -1 制限を削除するには

Example

dab configure \
  --runtime.graphql.depth-limit 3

結果の構成

{
  "runtime": {
    "graphql": {
      "depth-limit": 3
    }
  }
}

--runtime.graphql.enabled

DAB の GraphQL エンドポイントを有効にします。

Example

dab configure \
  --runtime.graphql.enabled false

--runtime.graphql.path

DAB の GraphQL エンドポイント パスをカスタマイズします。 /を含むプレフィックス パス。

Example

dab configure \
  --runtime.graphql.path /graphql

--runtime.graphql.allow-introspection

GraphQL のイントロスペクション要求を許可または拒否します。

Example

dab configure \
  --runtime.graphql.allow-introspection false

--runtime.graphql.multiple-mutations.create.enabled

生成された GraphQL スキーマで複数の変更作成操作を有効または無効にします。

Example

dab configure \
  --runtime.graphql.multiple-mutations.create.enabled true

--runtime.rest.enabled

DAB の REST エンドポイントを有効にします。

Example

dab configure \
  --runtime.rest.enabled false

--runtime.rest.path

DAB の REST エンドポイント パスをカスタマイズします。 /を含むプレフィックス パス。

Example

dab configure \
  --runtime.rest.path /myapi

結果の構成

{
  "runtime": {
    "rest": {
      "path": "/myapi"
    }
  }
}

--runtime.rest.request-body-strict

余分な REST 要求本文フィールドを禁止します。

Example

dab configure \
  --runtime.rest.request-body-strict true

--runtime.mcp.enabled

DAB の MCP エンドポイントを有効にします。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

Example

dab configure \
  --runtime.mcp.enabled false

結果の構成

{
  "runtime": {
    "mcp": {
      "enabled": false
    }
  }
}

--runtime.mcp.path

DAB の MCP エンドポイント パスをカスタマイズします。 /を含むプレフィックス パス。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

Example

dab configure \
  --runtime.mcp.path /mcp2

結果の構成

{
  "runtime": {
    "mcp": {
      "path": "/mcp2"
    }
  }
}

--runtime.mcp.dml-tools.enabled

DAB の MCP DML ツール エンドポイントを有効にします。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

MCP DML ツールの詳細については、 SQL MCP Server データ操作言語ツールを参照してください。

Example

dab configure \
  --runtime.mcp.dml-tools.enabled false

--runtime.mcp.dml-tools.describe-entities.enabled

DAB の MCP Describe エンティティ ツールを有効にします。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

Example

dab configure \
  --runtime.mcp.dml-tools.describe-entities.enabled false

--runtime.mcp.dml-tools.create-record.enabled

DAB の MCP レコード作成ツールを有効にします。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

Example

dab configure \
  --runtime.mcp.dml-tools.create-record.enabled false

--runtime.mcp.dml-tools.read-records.enabled

DAB の MCP 読み取りレコード ツールを有効にします。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

Example

dab configure \
  --runtime.mcp.dml-tools.read-records.enabled false

--runtime.mcp.dml-tools.update-record.enabled

DAB の MCP 更新レコード ツールを有効にします。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

Example

dab configure \
  --runtime.mcp.dml-tools.update-record.enabled false

--runtime.mcp.dml-tools.delete-record.enabled

DAB の MCP 削除レコード ツールを有効にします。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

Example

dab configure \
  --runtime.mcp.dml-tools.delete-record.enabled false

--runtime.mcp.dml-tools.execute-entity.enabled

DAB の MCP 実行エンティティ ツールを有効にします。

このオプションは、v1.7 プレリリース CLI (現在 RC) でのみ使用できます。 dotnet tool install microsoft.dataapibuilder --prereleaseを使用してインストールします。

Example

dab configure \
  --runtime.mcp.dml-tools.execute-entity.enabled false

--runtime.cache.enabled

DAB のキャッシュをグローバルに有効にします。 また、エンティティごとにキャッシュを有効にする必要があります。

Example

dab configure \
  --runtime.cache.enabled true

結果の構成

{
  "runtime": {
    "cache": {
      "enabled": true
    }
  }
}

--runtime.cache.ttl-seconds

DAB キャッシュのグローバルな既定の時刻を秒単位で有効にカスタマイズします。

Example

dab configure \
  --runtime.cache.ttl-seconds 30

結果の構成

{
  "runtime": {
    "cache": {
      "enabled": false,
      "ttl-seconds": 30
    }
  }
}

--runtime.host.mode

DAB のホスト実行モードを設定します。

使用できる値:

  • Development
  • Production

Example

dab configure \
  --runtime.host.mode Development

結果の構成

{
  "runtime": {
    "host": {
      "mode": "development"
    }
  }
}

--runtime.host.cors.origins

CORS で許可されている配信元を上書きします。 スペース区切りのリストとして値を指定します。

Example

dab configure \
  --runtime.host.cors.origins \
  https://contoso.com \
  https://fabrikam.com

結果の構成

{
  "runtime": {
    "host": {
      "cors": {
        "origins": [
          "https://contoso.com",
          "https://fabrikam.com"
        ]
      }
    }
  }
}

--runtime.host.cors.allow-credentials

Access-Control-Allow-Credentials ヘッダーの値を設定します。

Example

dab configure \
  --runtime.host.cors.allow-credentials true

--runtime.host.authentication.provider

認証プロバイダーの名前を構成します。

Example

dab configure \
  --runtime.host.authentication.provider AppService

--runtime.host.authentication.jwt.audience

JWT トークンの目的の受信者を構成します。

Example

dab configure \
  --runtime.host.authentication.jwt.audience api://my-app

--runtime.host.authentication.jwt.issuer

JWT トークンを発行したエンティティを構成します。

Example

dab configure \
  --runtime.host.authentication.jwt.issuer https://login.microsoftonline.com/common/v2.0

結果の構成

{
  "runtime": {
    "host": {
      "authentication": {
        "provider": "AppService",
        "jwt": {
          "audience": "api://my-app",
          "issuer": "https://login.microsoftonline.com/common/v2.0"
        }
      }
    }
  }
}

--azure-key-vault.endpoint

Azure Key Vault エンドポイント URL を構成します。

Example

dab configure \
  --azure-key-vault.endpoint https://my-vault.vault.azure.net

--azure-key-vault.retry-policy.mode

再試行ポリシー モードを構成します。

使用できる値:

  • fixed
  • exponential

Example

dab configure \
  --azure-key-vault.retry-policy.mode fixed

--azure-key-vault.retry-policy.max-count

再試行の最大数を構成します。

Example

dab configure \
  --azure-key-vault.retry-policy.max-count 5

--azure-key-vault.retry-policy.delay-seconds

再試行間隔の初期遅延を秒単位で構成します。

Example

dab configure \
  --azure-key-vault.retry-policy.delay-seconds 2

--azure-key-vault.retry-policy.max-delay-seconds

再試行間の最大遅延を秒単位で構成します (指数モードの場合)。

Example

dab configure \
  --azure-key-vault.retry-policy.max-delay-seconds 30

--azure-key-vault.retry-policy.network-timeout-seconds

要求のネットワーク タイムアウトを秒単位で構成します。

Example

dab configure \
  --azure-key-vault.retry-policy.network-timeout-seconds 20

結果の構成

{
  "azure-key-vault": {
    "retry-policy": {
      "mode": "fixed",
      "max-count": 5,
      "delay-seconds": 2,
      "max-delay-seconds": 30,
      "network-timeout-seconds": 20
    }
  }
}

--runtime.telemetry.azure-log-analytics.enabled

Azure Log Analytics を有効または無効にします。

Example

dab configure \
  --runtime.telemetry.azure-log-analytics.enabled true

--runtime.telemetry.azure-log-analytics.dab-identifier

Azure Log Analytics で使用される DAB 識別子文字列を構成します。

Example

dab configure \
  --runtime.telemetry.azure-log-analytics.dab-identifier MyDab

--runtime.telemetry.azure-log-analytics.flush-interval-seconds

Azure Log Analytics のフラッシュ間隔を秒単位で構成します。

Example

dab configure \
  --runtime.telemetry.azure-log-analytics.flush-interval-seconds 10

--runtime.telemetry.azure-log-analytics.auth.custom-table-name

Azure Log Analytics のカスタム テーブル名を構成します。

Example

dab configure \
  --runtime.telemetry.azure-log-analytics.auth.custom-table-name MyDabLogs

--runtime.telemetry.azure-log-analytics.auth.dcr-immutable-id

Azure Log Analytics の DCR 不変 ID を構成します。

Example

dab configure \
  --runtime.telemetry.azure-log-analytics.auth.dcr-immutable-id dcr-123

--runtime.telemetry.azure-log-analytics.auth.dce-endpoint

Azure Log Analytics の DCE エンドポイントを構成します。

Example

dab configure \
  --runtime.telemetry.azure-log-analytics.auth.dce-endpoint https://example.eastus-1.ingest.monitor.azure.com

結果の構成

{
  "runtime": {
    "telemetry": {
      "azure-log-analytics": {
        "enabled": true,
        "auth": {
          "custom-table-name": "MyDabLogs",
          "dcr-immutable-id": "dcr-123",
          "dce-endpoint": "https://example.eastus-1.ingest.monitor.azure.com"
        },
        "dab-identifier": "MyDab",
        "flush-interval-seconds": 10
      }
    }
  }
}

--runtime.telemetry.file.enabled

ファイル シンクのログ記録を有効または無効にします。

Example

dab configure \
  --runtime.telemetry.file.enabled true

--runtime.telemetry.file.path

ファイル シンク ログのパスを構成します。

Example

dab configure \
  --runtime.telemetry.file.path C:\\logs\\dab-log.txt

--runtime.telemetry.file.rolling-interval

ファイル シンク ログのローリング間隔を構成します。

使用できる値:

  • Minute
  • Hour
  • Day
  • Month
  • Year
  • Infinite

Example

dab configure \
  --runtime.telemetry.file.rolling-interval Month

--runtime.telemetry.file.retained-file-count-limit

保持されるファイルの最大数を構成します。

Example

dab configure \
  --runtime.telemetry.file.retained-file-count-limit 5

--runtime.telemetry.file.file-size-limit-bytes

最大ファイル サイズ制限 (バイト単位) を構成します。

Example

dab configure \
  --runtime.telemetry.file.file-size-limit-bytes 2097152

結果の構成

{
  "runtime": {
    "telemetry": {
      "file": {
        "enabled": true,
        "path": "C:\\logs\\dab-log.txt",
        "rolling-interval": "Month",
        "retained-file-count-limit": 5,
        "file-size-limit-bytes": 2097152
      }
    }
  }
}

--help

このヘルプ画面を表示します。

Example

dab configure \
  --help

--version

バージョン情報を表示します。

Example

dab configure \
  --version