Configure your project's metadata store

Vertex ML Metadata lets you track and analyze the metadata produced by your machine learning (ML) workflows. The first time you run a PipelineJob or create an experiment in the Vertex SDK, Vertex AI creates your project's MetadataStore.

If you want your metadata encrypted using a customer-managed encryption key (CMEK), you must create your metadata store using a CMEK before you use Vertex ML Metadata to track or analyze metadata.

After the metadata store has been created, the CMEK key that the metadata store uses is independent of the CMEK key used by processes that log metadata, for example, a pipeline run.

Create a metadata store that uses a CMEK

Use the following instructions to create a CMEK and set up a Vertex ML Metadata metadata store that uses this CMEK.

  1. Use Cloud Key Management Service to configure a customer-managed encryption key.

  2. Use the following REST call to create your project's default metadata store using your CMEK.

    Before using any of the request data, make the following replacements:

    • LOCATION_ID: Your region.
    • PROJECT_ID: Your project ID.
    • KEY_RING: The name of the Cloud Key Management Service key ring that your encryption key is on.
    • KEY_NAME: The name of the encryption key that you want to use for this metadata store.

    HTTP method and URL:


    Request JSON body:

      "encryption_spec": {
        "kms_key_name": "projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING/cryptoKeys/KEY_NAME"

    To send your request, expand one of these options:

    You should receive a JSON response similar to the following:

      "name": "projects/PROJECT_ID/locations/LOCATION_ID/operations/OPERATIONS_ID",
      "metadata": {
        "@type": "",
        "genericMetadata": {
          "createTime": "2021-05-18T18:47:14.494997Z",
          "updateTime": "2021-05-18T18:47:14.494997Z"