diff --git a/bundle/internal/docs/main.go b/bundle/internal/docs/main.go index b3e95db68d..e4e603b1d2 100644 --- a/bundle/internal/docs/main.go +++ b/bundle/internal/docs/main.go @@ -13,30 +13,6 @@ import ( "github.com/databricks/cli/libs/jsonschema" ) -const ( - rootFileName = "reference.md" - rootHeader = `--- -description: Configuration reference for databricks.yml ---- - -# Configuration reference - -This article provides reference for keys supported by configuration (YAML). See [\_](/dev-tools/bundles/index.md). -` -) - -const ( - resourcesFileName = "resources-reference.md" - resourcesHeader = `--- -description: Resources references for databricks.yml ---- - -# Resources reference - -This article provides reference for keys supported by configuration (YAML). See [\_](/dev-tools/bundles/index.md). -` -) - func main() { if len(os.Args) != 3 { fmt.Println("Usage: go run main.go ") diff --git a/bundle/internal/docs/markdown.go b/bundle/internal/docs/markdown.go index 3bb38ab436..508f63578b 100644 --- a/bundle/internal/docs/markdown.go +++ b/bundle/internal/docs/markdown.go @@ -9,6 +9,94 @@ import ( md "github.com/nao1215/markdown" ) +const ( + rootFileName = "reference.md" + rootHeader = `--- +description: Configuration reference for databricks.yml +--- + +# Configuration reference + +This article provides reference for keys supported by configuration (YAML). See [_](/dev-tools/bundles/index.md). + +For complete bundle examples, see [_](/dev-tools/bundles/resource-examples.md) and the [bundle-examples GitHub repository](https://github.com/databricks/bundle-examples). +` +) + +const ( + resourcesFileName = "resources.md" + resourcesHeader = `--- +description: Learn about resources supported by Databricks Asset Bundles and how to configure them. +--- + +# resources + + allows you to specify information about the resources used by the bundle in the ` + "`" + `resources` + "`" + ` mapping in the bundle configuration. See [resources mapping](/dev-tools/bundles/settings.md#resources) and [resources key reference](/dev-tools/bundles/reference.md#resources). + +This article outlines supported resource types for bundles and provides details and an example for each supported type. For additional examples, see [_](/dev-tools/bundles/resource-examples.md). + +## Supported resources + +The following table lists supported resource types for bundles. Some resources can be created by defining them in a bundle and deploying the bundle, and some resources only support referencing an existing resource to include in the bundle. + +Resources are defined using the corresponding [Databricks REST API](/api/workspace/introduction) object's create operation request payload, where the object's supported fields, expressed as YAML, are the resource's supported properties. Links to documentation for each resource's corresponding payloads are listed in the table. + +.. tip:: The ` + "`" + `databricks bundle validate` + "`" + ` command returns warnings if unknown resource properties are found in bundle configuration files. + + +.. list-table:: + :header-rows: 1 + + * - Resource + - Create support + - Corresponding REST API object + + * - [cluster](#cluster) + - ✓ + - [Cluster object](/api/workspace/clusters/create) + + * - [dashboard](#dashboard) + - + - [Dashboard object](/api/workspace/lakeview/create) + + * - [experiment](#experiment) + - ✓ + - [Experiment object](/api/workspace/experiments/createexperiment) + + * - [job](#job) + - ✓ + - [Job object](/api/workspace/jobs/create) + + * - [model (legacy)](#model-legacy) + - ✓ + - [Model (legacy) object](/api/workspace/modelregistry/createmodel) + + * - [model_serving_endpoint](#model-serving-endpoint) + - ✓ + - [Model serving endpoint object](/api/workspace/servingendpoints/create) + + * - [pipeline](#pipeline) + - ✓ + - [Pipeline object]](/api/workspace/pipelines/create) + + * - [quality_monitor](#quality-monitor) + - ✓ + - [Quality monitor object](/api/workspace/qualitymonitors/create) + + * - [registered_model](#registered-model) () + - ✓ + - [Registered model object](/api/workspace/registeredmodels/create) + + * - [schema](#schema) () + - ✓ + - [Schema object](/api/workspace/schemas/create) + + * - [volume](#volume) () + - ✓ + - [Volume object](/api/workspace/volumes/create) +` +) + func buildMarkdown(nodes []rootNode, outputFile, header string) error { f, err := os.Create(outputFile) if err != nil {