إشعار
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تسجيل الدخول أو تغيير الدلائل.
يتطلب الوصول إلى هذه الصفحة تخويلاً. يمكنك محاولة تغيير الدلائل.
Configure non-entity runtime and data source properties in an existing Data API builder configuration file. Unspecified options leave existing values unchanged. If any provided option is invalid, the entire update fails (all-or-nothing).
Syntax
dab configure [options]
Note
This command does not alter the entities section. Use dab update for entity changes.
Quick glance
-c, --config
Path to the config file. Defaults to dab-config.json unless dab-config.<DAB_ENVIRONMENT>.json exists, where DAB_ENVIRONMENT is an environment variable.
Example
dab configure \
--config ./dab-config.json \
--runtime.rest.enabled true
--data-source.database-type
Database type.
Allowed values:
MSSQLPostgreSQLCosmosDB_NoSQLMySQL
Example
dab configure \
--data-source.database-type PostgreSQL
Resulting config
{
"data-source": {
"database-type": "postgresql"
}
}
--data-source.connection-string
Connection string for the data source.
Example
dab configure \
--data-source.connection-string "Server=myserver;Database=mydb;User Id=myuser;Password=mypassword;"
--data-source.options.database
Database name for Cosmos DB for NoSql.
Example
dab configure \
--data-source.options.database MyCosmosDatabase
--data-source.options.container
Container name for Cosmos DB for NoSql.
Example
dab configure \
--data-source.options.container MyCosmosContainer
--data-source.options.schema
Schema path for Cosmos DB for NoSql.
Example
dab configure \
--data-source.options.schema ./schema.gql
--data-source.options.set-session-context
Enable session context.
Allowed values:
true(default)false
Example
dab configure \
--data-source.options.set-session-context false
Resulting config
{
"data-source": {
"options": {
"set-session-context": false
}
}
}
--runtime.graphql.depth-limit
Max allowed depth of the nested query.
Allowed values:
- $(0,2147483647]$ (inclusive)
-1to remove limit
Example
dab configure \
--runtime.graphql.depth-limit 3
Resulting config
{
"runtime": {
"graphql": {
"depth-limit": 3
}
}
}
--runtime.graphql.enabled
Enable DAB's GraphQL endpoint.
Example
dab configure \
--runtime.graphql.enabled false
--runtime.graphql.path
Customize DAB's GraphQL endpoint path. Prefix path with /.
Example
dab configure \
--runtime.graphql.path /graphql
--runtime.graphql.allow-introspection
Allow or deny GraphQL introspection requests.
Example
dab configure \
--runtime.graphql.allow-introspection false
--runtime.graphql.multiple-mutations.create.enabled
Enable or disable multiple-mutation create operations in the generated GraphQL schema.
Example
dab configure \
--runtime.graphql.multiple-mutations.create.enabled true
--runtime.rest.enabled
Enable DAB's REST endpoint.
Example
dab configure \
--runtime.rest.enabled false
--runtime.rest.path
Customize DAB's REST endpoint path. Prefix path with /.
Example
dab configure \
--runtime.rest.path /myapi
Resulting config
{
"runtime": {
"rest": {
"path": "/myapi"
}
}
}
--runtime.rest.request-body-strict
Prohibit extraneous REST request body fields.
Example
dab configure \
--runtime.rest.request-body-strict true
--runtime.mcp.enabled
Enable DAB's MCP endpoint.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.enabled false
Resulting config
{
"runtime": {
"mcp": {
"enabled": false
}
}
}
--runtime.mcp.path
Customize DAB's MCP endpoint path. Prefix path with /.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.path /mcp2
Resulting config
{
"runtime": {
"mcp": {
"path": "/mcp2"
}
}
}
--runtime.mcp.dml-tools.enabled
Enable DAB's MCP DML tools endpoint.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.dml-tools.enabled false
--runtime.mcp.dml-tools.describe-entities.enabled
Enable DAB's MCP describe entities tool.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.dml-tools.describe-entities.enabled false
--runtime.mcp.dml-tools.create-record.enabled
Enable DAB's MCP create record tool.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.dml-tools.create-record.enabled false
--runtime.mcp.dml-tools.read-records.enabled
Enable DAB's MCP read record tool.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.dml-tools.read-records.enabled false
--runtime.mcp.dml-tools.update-record.enabled
Enable DAB's MCP update record tool.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.dml-tools.update-record.enabled false
--runtime.mcp.dml-tools.delete-record.enabled
Enable DAB's MCP delete record tool.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.dml-tools.delete-record.enabled false
--runtime.mcp.dml-tools.execute-entity.enabled
Enable DAB's MCP execute entity tool.
Note
This option is available only in the v1.7 prerelease CLI (currently RC). Install with dotnet tool install microsoft.dataapibuilder --prerelease.
Example
dab configure \
--runtime.mcp.dml-tools.execute-entity.enabled false
--runtime.cache.enabled
Enable DAB's cache globally. You must also enable caching for each entity.
Example
dab configure \
--runtime.cache.enabled true
Resulting config
{
"runtime": {
"cache": {
"enabled": true
}
}
}
--runtime.cache.ttl-seconds
Customize the DAB cache's global default time to live in seconds.
Example
dab configure \
--runtime.cache.ttl-seconds 30
Resulting config
{
"runtime": {
"cache": {
"enabled": false,
"ttl-seconds": 30
}
}
}
--runtime.host.mode
Set the host running mode of DAB.
Allowed values:
DevelopmentProduction
Example
dab configure \
--runtime.host.mode Development
Resulting config
{
"runtime": {
"host": {
"mode": "development"
}
}
}
--runtime.host.cors.origins
Overwrite allowed origins in CORS. Provide values as a space-separated list.
Example
dab configure \
--runtime.host.cors.origins \
https://contoso.com \
https://fabrikam.com
Resulting config
{
"runtime": {
"host": {
"cors": {
"origins": [
"https://contoso.com",
"https://fabrikam.com"
]
}
}
}
}
--runtime.host.cors.allow-credentials
Set the value for the Access-Control-Allow-Credentials header.
Example
dab configure \
--runtime.host.cors.allow-credentials true
--runtime.host.authentication.provider
Configure the name of authentication provider.
Example
dab configure \
--runtime.host.authentication.provider AppService
--runtime.host.authentication.jwt.audience
Configure the intended recipient(s) of the JWT token.
Example
dab configure \
--runtime.host.authentication.jwt.audience api://my-app
--runtime.host.authentication.jwt.issuer
Configure the entity that issued the JWT token.
Example
dab configure \
--runtime.host.authentication.jwt.issuer https://login.microsoftonline.com/common/v2.0
Resulting config
{
"runtime": {
"host": {
"authentication": {
"provider": "AppService",
"jwt": {
"audience": "api://my-app",
"issuer": "https://login.microsoftonline.com/common/v2.0"
}
}
}
}
}
--azure-key-vault.endpoint
Configure the Azure Key Vault endpoint URL.
Example
dab configure \
--azure-key-vault.endpoint https://my-vault.vault.azure.net
--azure-key-vault.retry-policy.mode
Configure the retry policy mode.
Allowed values:
fixedexponential
Example
dab configure \
--azure-key-vault.retry-policy.mode fixed
--azure-key-vault.retry-policy.max-count
Configure the maximum number of retry attempts.
Example
dab configure \
--azure-key-vault.retry-policy.max-count 5
--azure-key-vault.retry-policy.delay-seconds
Configure the initial delay between retries in seconds.
Example
dab configure \
--azure-key-vault.retry-policy.delay-seconds 2
--azure-key-vault.retry-policy.max-delay-seconds
Configure the maximum delay between retries in seconds (for exponential mode).
Example
dab configure \
--azure-key-vault.retry-policy.max-delay-seconds 30
--azure-key-vault.retry-policy.network-timeout-seconds
Configure the network timeout for requests in seconds.
Example
dab configure \
--azure-key-vault.retry-policy.network-timeout-seconds 20
Resulting config
{
"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
Enable or disable Azure Log Analytics.
Example
dab configure \
--runtime.telemetry.azure-log-analytics.enabled true
--runtime.telemetry.azure-log-analytics.dab-identifier
Configure a DAB identifier string used in Azure Log Analytics.
Example
dab configure \
--runtime.telemetry.azure-log-analytics.dab-identifier MyDab
--runtime.telemetry.azure-log-analytics.flush-interval-seconds
Configure flush interval in seconds for Azure Log Analytics.
Example
dab configure \
--runtime.telemetry.azure-log-analytics.flush-interval-seconds 10
--runtime.telemetry.azure-log-analytics.auth.custom-table-name
Configure custom table name for 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
Configure DCR immutable ID for Azure Log Analytics.
Example
dab configure \
--runtime.telemetry.azure-log-analytics.auth.dcr-immutable-id dcr-123
--runtime.telemetry.azure-log-analytics.auth.dce-endpoint
Configure DCE endpoint for Azure Log Analytics.
Example
dab configure \
--runtime.telemetry.azure-log-analytics.auth.dce-endpoint https://example.eastus-1.ingest.monitor.azure.com
Resulting config
{
"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
Enable or disable file sink logging.
Example
dab configure \
--runtime.telemetry.file.enabled true
--runtime.telemetry.file.path
Configure path for file sink logging.
Example
dab configure \
--runtime.telemetry.file.path C:\\logs\\dab-log.txt
--runtime.telemetry.file.rolling-interval
Configure rolling interval for file sink logging.
Allowed values:
MinuteHourDayMonthYearInfinite
Example
dab configure \
--runtime.telemetry.file.rolling-interval Month
--runtime.telemetry.file.retained-file-count-limit
Configure maximum number of retained files.
Example
dab configure \
--runtime.telemetry.file.retained-file-count-limit 5
--runtime.telemetry.file.file-size-limit-bytes
Configure maximum file size limit in bytes.
Example
dab configure \
--runtime.telemetry.file.file-size-limit-bytes 2097152
Resulting config
{
"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
Display this help screen.
Example
dab configure \
--help
--version
Display version information.
Example
dab configure \
--version