Configurar o armazenamento de metadados do projeto
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Com o Vertex ML Metadata, é possível rastrear e analisar os metadados
produzidos pelos fluxos de trabalho de machine learning (ML). Na primeira vez que você executa um
PipelineJob ou cria um experimento no SDK do Vertex, a Vertex AI cria
o MetadataStore
do seu projeto.
Após a criação do armazenamento de metadados, a chave de CMEK usada pelo armazenamento
de metadados é independente da chave de CMEK usada por processos que registram metadados, como uma
execução de pipeline.
Criar um armazenamento de metadados que use uma CMEK
Use as instruções a seguir para criar uma CMEK e configurar um
armazenamento de metadados do Vertex ML Metadata que usa essa CMEK.
Para enviar a solicitação, expanda uma destas opções:
curl (Linux, macOS ou Cloud Shell)
Salve o corpo da solicitação em um arquivo chamado request.json.
Execute o comando a seguir no terminal para criar ou substituir
esse arquivo no diretório atual:
Salve o corpo da solicitação em um arquivo chamado request.json.
Execute o comando a seguir no terminal para criar ou substituir
esse arquivo no diretório atual:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-19 UTC."],[],[],null,["# Configure your project's metadata store\n\nVertex ML Metadata lets you track and analyze the metadata\nproduced by your machine learning (ML) workflows. The first time you run a\nPipelineJob or create an experiment in the Vertex SDK, Vertex AI creates\nyour project's\n.\n\nIf you want your metadata encrypted using a [customer-managed encryption key\n(CMEK)](/vertex-ai/docs/general/cmek), you must create your metadata store using a CMEK *before* you use\nVertex ML Metadata to track or analyze metadata.\n\nAfter the metadata store has been created, the CMEK key that the metadata store\nuses is independent of the CMEK key used by processes that log metadata,\nfor example, a pipeline run.\n\nCreate a metadata store that uses a CMEK\n----------------------------------------\n\nUse the following instructions to create a CMEK and set up a\nVertex ML Metadata metadata store that uses this CMEK.\n\n1. [Use Cloud Key Management Service to configure a customer-managed encryption\n key.](/vertex-ai/docs/general/cmek#configure-cmek)\n\n2. Use the following REST call to create your project's default metadata store\n using your CMEK.\n\n\n Before using any of the request data,\n make the following replacements:\n - \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: Your region.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your [project ID](/resource-manager/docs/creating-managing-projects#identifiers).\n - \u003cvar translate=\"no\"\u003eKEY_RING\u003c/var\u003e: The name of the Cloud Key Management Service key ring that your encryption key is on.\n - \u003cvar translate=\"no\"\u003eKEY_NAME\u003c/var\u003e: The name of the encryption key that you want to use for this metadata store.\n\n\n HTTP method and URL:\n\n ```\n POST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/metadataStores?metadata_store_id=default\n ```\n\n\n Request JSON body:\n\n ```\n {\n \"encryption_spec\": {\n \"kms_key_name\": \"projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING/cryptoKeys/KEY_NAME\"\n },\n }\n ```\n\n To send your request, expand one of these options:\n\n #### curl (Linux, macOS, or Cloud Shell)\n\n | **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\n Save the request body in a file named `request.json`.\n Run the following command in the terminal to create or overwrite\n this file in the current directory: \n\n ```\n cat \u003e request.json \u003c\u003c 'EOF'\n {\n \"encryption_spec\": {\n \"kms_key_name\": \"projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING/cryptoKeys/KEY_NAME\"\n },\n }\n EOF\n ```\n\n\n Then execute the following command to send your REST request:\n\n ```\n curl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/metadataStores?metadata_store_id=default\"\n ```\n\n #### PowerShell (Windows)\n\n | **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\n Save the request body in a file named `request.json`.\n Run the following command in the terminal to create or overwrite\n this file in the current directory: \n\n ```\n @'\n {\n \"encryption_spec\": {\n \"kms_key_name\": \"projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING/cryptoKeys/KEY_NAME\"\n },\n }\n '@ | Out-File -FilePath request.json -Encoding utf8\n ```\n\n\n Then execute the following command to send your REST request:\n\n ```\n $cred = gcloud auth print-access-token\n $headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\n Invoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/metadataStores?metadata_store_id=default\" | Select-Object -Expand Content\n ```\n\n You should receive a JSON response similar to the following:\n\n ```\n {\n \"name\": \"projects/PROJECT_ID/locations/LOCATION_ID/operations/OPERATIONS_ID\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.aiplatform.v1.CreateMetadataStoreOperationMetadata\",\n \"genericMetadata\": {\n \"createTime\": \"2021-05-18T18:47:14.494997Z\",\n \"updateTime\": \"2021-05-18T18:47:14.494997Z\"\n }\n }\n }\n ```\n\n \u003cbr /\u003e"]]