- NAME
-
- gcloud beta ai indexes create - create a new Vertex AI index
- SYNOPSIS
-
-
gcloud beta ai indexes create
--display-name
=DISPLAY_NAME
--metadata-file
=METADATA_FILE
[--description
=DESCRIPTION
] [--encryption-kms-key-name
=ENCRYPTION_KMS_KEY_NAME
] [--index-update-method
=INDEX_UPDATE_METHOD
] [--labels
=[KEY
=VALUE
,…]] [--metadata-schema-uri
=METADATA_SCHEMA_URI
] [--region
=REGION
] [GCLOUD_WIDE_FLAG …
]
-
- EXAMPLES
-
To create an index under project
example
in regionus-central1
, encrypted with KMS keykms-key-name
, run:gcloud beta ai indexes create --display-name=index --description=test --metadata-file=path/to/your/metadata.json --project=example --region=us-central1 --encryption-kms-key-name=kms-key-name
- REQUIRED FLAGS
-
--display-name
=DISPLAY_NAME
- Display name of the index.
--metadata-file
=METADATA_FILE
- Path to a local JSON file that contains the additional metadata information about the index.
- OPTIONAL FLAGS
-
--description
=DESCRIPTION
- Description of the index.
--encryption-kms-key-name
=ENCRYPTION_KMS_KEY_NAME
-
The Cloud KMS resource identifier of the customer managed encryption key used to
protect a resource. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key.
The key needs to be in the same region as where the compute resource is created.
--index-update-method
=INDEX_UPDATE_METHOD
-
The update method to use with this index. Choose
stream-update
orbatch-update
(case insensitive). If not set, batch update will be used by default.INDEX_UPDATE_METHOD
must be one of:batch-update
-
can update index with
gcloud ai indexes update
usingdatapoints files on Cloud Storage. stream-update
-
can update datapoints with
upsert-datapoints
and`delete-datapointsand will be applied nearly real-time.
--labels
=[KEY
=VALUE
,…]List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (
-), underscores (
_), lowercase characters, and numbers. Values must contain only hyphens (
-), underscores (
_), lowercase characters, and numbers.
--metadata-schema-uri
=METADATA_SCHEMA_URI
- Points to a YAML file stored on Google Cloud Storage describing additional information about index.
Region resource - Cloud region to create index. This represents a Cloud resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.
To set the
projectattribute:
provide the argument
--regionon the command line with a fully specified name;
set the property
ai/regionwith a fully specified name;
- choose one from the prompted list of available regions with a fully specified name;
provide the argument
--projecton the command line;
set the property
core/project.
--region
=REGION
ID of the region or fully qualified identifier for the region.
To set the
regionattribute:
provide the argument
--regionon the command line;
set the property
ai/region;
- choose one from the prompted list of available regions.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - NOTES
-
This command is currently in beta and might change without notice. These
variants are also available:
gcloud ai indexes create
gcloud alpha ai indexes create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-22 UTC.