Sanity Library Reference Docs
    Preparing search index...
    • Defines a Dataset to be managed in a Blueprint.

      Parameters

      • parameters: BlueprintDatasetConfig

        The dataset configuration

        Configuration for a Dataset resource.

        • OptionaldatasetName?: string

          The name of the dataset. Must be unique within a project.

          The name of the resource

        • Optionaldescription?: string

          The dataset description

        • name: string

          The name of the resource. Unique within the blueprint. e.g. 'sync-webhook'

        • Optionalproject?: string

          The project ID of the project that contains your Dataset.

          The project attribute must be defined if your blueprint is scoped to an organization.

        • Optionalvisibility?: AclMode

          The visibility to set for the dataset. Defaults to public.

      Returns BlueprintDatasetResource

      The dataset resource

      defineDataset({
      name: 'staging-dataset',
      datasetName: 'staging',
      })
      defineDataset({
      name: 'staging',
      datasetName: 'staging-v2',
      visibility: 'private',
      project: 'my-project-id',
      lifecycle: {deletionPolicy: 'protect'},
      })