gcloud ai models copy

NAME
gcloud ai models copy - copy a model
SYNOPSIS
gcloud 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]
EXAMPLES
To copy a model123 of projectexample from regionus-central1 to regioneurope-west4, run:
gcloudaimodelscopy--source-model=projects/example/locations/us-central1/models/123--region=projects/example/locations/europe-west4
REQUIRED FLAGS
--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}.
OPTIONAL FLAGS
--kms-key-name=KMS_KEY_NAME
The Cloud KMS resource identifier of the customer managed encryption key used toprotect 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 the destination region of the model tobe copied.
Region resource - Cloud region to copy the model into. This represents a Cloudresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.

To set theproject attribute:

  • provide the argument--region on the command line with a fullyspecified name;
  • set the propertyai/region with a fully specified name;
  • choose one from the prompted list of available regions with a fully specifiedname;
  • provide the argument--project on the command line;
  • set the propertycore/project.
--region=REGION
ID of the region or fully qualified identifier for the region.

To set theregion attribute:

  • provide the argument--region on the command line;
  • set the propertyai/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 finalcomponent of the model resource name. This value may be up to 63 characters, andvalid characters are[a-z0-9-]. The first charactercannot be a number or hyphen.
--destination-parent-model=DESTINATION_PARENT_MODEL
Specify this field to copy source_model into this existing Model as a newversion. Format:projects/{project}/locations/{location}/models/{model}.
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
These variants are also available:
gcloudalphaaimodelscopy
gcloudbetaaimodelscopy

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-16 UTC.