gcloud alpha ai models copy - copy a model
gcloud alpha ai models copy --source-model=SOURCE_MODEL [--kms-key-name=KMS_KEY_NAME] [--region=REGION] [--destination-model-id=DESTINATION_MODEL_ID | --destination-parent-model=DESTINATION_PARENT_MODEL] [GCLOUD_WIDE_FLAG ...]
To copy a model 123 of project example from region us-central1 to region europe-west4, run:
$ gcloud alpha ai models copy \ --source-model=projects/example/locations/us-central1/models/\ 123 --region=projects/example/locations/europe-west4
- --source-model=SOURCE_MODEL
The resource name of the Model to copy. That Model must be in the same Project. Format: projects/{project}/locations/{location}/models/{model}.
- --kms-key-name=KMS_KEY_NAME
The Cloud KMS resource identifier of the customer managed encryption key used to protect the 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.
- Region resource - Cloud region to copy the model into. 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 project attribute:
- —
provide the argument --region on the command line with a fully specified name;
- —
set the property ai/region with a fully specified name;
- —
choose one from the prompted list of available regions with a fully specified name;
- —
provide the argument --project on the command line;
- —
set the property core/project.
- --region=REGION
ID of the region or fully qualified identifier for the region. To set the region attribute:
provide the argument --region on the command line;
set the property ai/region;
choose one from the prompted list of available regions.
- At most one of these can be specified:
- --destination-model-id=DESTINATION_MODEL_ID
Copy source_model into a new Model with this ID. The ID will become the final component of the model resource name. This value may be up to 63 characters, and valid characters are [a-z0-9-]. The first character cannot be a number or hyphen.
- --destination-parent-model=DESTINATION_PARENT_MODEL
Specify this field to copy source_model into this existing Model as a new version. Format: projects/{project}/locations/{location}/models/{model}.
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.
This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist. This variant is also available:
$ gcloud beta ai models copy