.TH "GCLOUD_AI_PERSISTENT\-RESOURCES_CREATE" 1 .SH "NAME" .HP gcloud ai persistent\-resources create \- create a new persistent resource .SH "SYNOPSIS" .HP \f5gcloud ai persistent\-resources create\fR \fB\-\-persistent\-resource\-id\fR=\fIPERSISTENT_RESOURCE_ID\fR (\fB\-\-config\fR=\fICONFIG\fR\ \fB\-\-resource\-pool\-spec\fR=[\fIRESOURCE_POOL_SPEC\fR,...]) [\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR] [\fB\-\-enable\-custom\-service\-account\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-network\fR=\fINETWORK\fR] [\fB\-\-region\fR=\fIREGION\fR] [\fB\-\-kms\-key\fR=\fIKMS_KEY\fR\ :\ \fB\-\-kms\-keyring\fR=\fIKMS_KEYRING\fR\ \fB\-\-kms\-location\fR=\fIKMS_LOCATION\fR\ \fB\-\-kms\-project\fR=\fIKMS_PROJECT\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR] .SH "DESCRIPTION" This command will create a persistent resource on the users project to use with Vertex AI custom training jobs. Persistent resources remain active until they are deleted by the user. .SH "EXAMPLES" To create a PersistentResource under project \f5\fIexample\fR\fR in region \f5\fIus\-central1\fR\fR, run: .RS 2m $ gcloud ai persistent\-resources create \-\-region=us\-central1 \e \-\-project=example \e \-\-resource\-pool\-spec=replica\-count=1,\e machine\-type='n1\-standard\-4' \-\-display\-name=example\-resource .RE .SH "REQUIRED FLAGS" .RS 2m .TP 2m \fB\-\-persistent\-resource\-id\fR=\fIPERSISTENT_RESOURCE_ID\fR User\-specified ID of the Persistent Resource. .TP 2m resource pool specification. At least one of these must be specified: .RS 2m .TP 2m \fB\-\-config\fR=\fICONFIG\fR Path to the Persistent Resource configuration file. This file should be a YAML document containing a list of \f5ResourcePool\fR If an option is specified both in the configuration file **and** via command\-line arguments, the command\-line arguments override the configuration file. Note that keys with underscore are invalid. Example(YAML): .RS 2m resourcePoolSpecs: machineSpec: machineType: n1\-standard\-4 replicaCount: 1 .RE .TP 2m \fB\-\-resource\-pool\-spec\fR=[\fIRESOURCE_POOL_SPEC\fR,...] Defines a resource pool to be created in the Persistent Resource. You can include multiple resource pool specs in order to create a Persistent Resource with multiple resource pools. The spec can contain the following fields: .RS 2m .TP 2m \fBmachine\-type\fR (Required): The type of the machine. see https://cloud.google.com/vertex\-ai/docs/training/configure\-compute#machine\-types for supported types. This field corresponds to the \f5machineSpec.machineType\fR field in \f5ResourcePool\fR API message. .TP 2m \fBreplica\-count\fR (Required if autoscaling not enabled) The number of replicas to use when creating this resource pool. This field corresponds to the replicaCount field in \'ResourcePool' API message. .TP 2m \fBmin\-replica\-count\fR (Optional) The minimum number of replicas that autoscaling will down\-size to for this resource pool. Both min\-replica\-count and max\-replica\-count are required to enable autoscaling on this resource pool. The value for this parameter must be at least 1. .TP 2m \fBmax\-replica\-count\fR (Optional) The maximum number of replicas that autoscaling will create for this resource pool. Both min\-replica\-count and max\-replica\-count are required to enable autoscaling on this resource pool. The maximum value for this parameter is 1000. .TP 2m \fBaccelerator\-type\fR (Optional) The type of GPU to attach to the machines. see https://cloud.google.com/vertex\-ai/docs/training/configure\-compute#specifying_gpus for more requirements. This field corresponds to the \f5machineSpec.acceleratorType\fR field in \f5ResourcePool\fR API message. .TP 2m \fBaccelerator\-count\fR (Required with accelerator\-type) The number of GPUs for each VM in the resource pool to use. The default the value if 1. This field corresponds to the \f5machineSpec.acceleratorCount\fR field in \f5ResourcePool\fR API message. .TP 2m \fBdisk\-type\fR (Optional) The type of disk to use for each machine's boot disk in the resource pool. The default is \f5pd\-standard\fR. This field corresponds to the \f5diskSpec.bootDiskType\fR field in \f5ResourcePool\fR API message. .TP 2m \fBdisk\-size\fR (Optional) The disk size in Gb for each machine's boot disk in the resource pool. The default is \f5100\fR. This field corresponds to the \f5diskSpec.bootDiskSizeGb\fR field in \f5ResourcePool\fR API message. .RE .sp Example: \-\-worker\-pool\-spec=replica\-count=1,machine\-type=n1\-highmem\-2 .RE .RE .sp .SH "OPTIONAL FLAGS" .RS 2m .TP 2m \fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR Display name of the Persistent Resource. .TP 2m \fB\-\-enable\-custom\-service\-account\fR Whether or not to use a custom user\-managed service account with this Persistent Resource. .TP 2m \fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...] List of label KEY=VALUE pairs to add. Keys must start with a lowercase character and contain only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and numbers. Values must contain only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and numbers. .TP 2m \fB\-\-network\fR=\fINETWORK\fR Full name of the Google Compute Engine network to which the Job is peered with. Private services access must already have been configured. If unspecified, the Job is not peered with any network. .TP 2m Region resource \- Cloud region to create a Persistent Resource. 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 \f5project\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-region\fR on the command line with a fully specified name; .IP "\(em" 2m set the property \f5ai/region\fR with a fully specified name; .IP "\(em" 2m choose one from the prompted list of available regions with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-project\fR on the command line; .IP "\(em" 2m set the property \f5core/project\fR. .RE .sp .TP 2m \fB\-\-region\fR=\fIREGION\fR ID of the region or fully qualified identifier for the region. To set the \f5region\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-region\fR on the command line; .IP "\(em" 2m set the property \f5ai/region\fR; .IP "\(em" 2m choose one from the prompted list of available regions. .RE .sp .TP 2m Key resource \- The Cloud KMS (Key Management Service) cryptokey that will be used to protect the persistent resource. The 'Vertex AI Service Agent' service account must hold permission 'Cloud KMS CryptoKey Encrypter/Decrypter'. The arguments in this group can be used to specify the attributes of this resource. .TP 2m \fB\-\-kms\-key\fR=\fIKMS_KEY\fR ID of the key or fully qualified identifier for the key. To set the \f5kms\-key\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-kms\-key\fR on the command line. .RE .sp This flag argument must be specified if any of the other arguments in this group are specified. .TP 2m \fB\-\-kms\-keyring\fR=\fIKMS_KEYRING\fR The KMS keyring of the key. To set the \f5kms\-keyring\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-kms\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-kms\-keyring\fR on the command line. .RE .sp .TP 2m \fB\-\-kms\-location\fR=\fIKMS_LOCATION\fR The Google Cloud location for the key. To set the \f5kms\-location\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-kms\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-kms\-location\fR on the command line. .RE .sp .TP 2m \fB\-\-kms\-project\fR=\fIKMS_PROJECT\fR The Google Cloud project for the key. To set the \f5kms\-project\fR attribute: .RS 2m .IP "\(em" 2m provide the argument \f5\-\-kms\-key\fR on the command line with a fully specified name; .IP "\(em" 2m provide the argument \f5\-\-kms\-project\fR on the command line; .IP "\(em" 2m set the property \f5core/project\fR. .RE .sp .RE .sp .SH "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 \fB$ gcloud help\fR for details. .SH "NOTES" These variants are also available: .RS 2m $ gcloud alpha ai persistent\-resources create .RE .RS 2m $ gcloud beta ai persistent\-resources create .RE