gcloud_alpha_compute_commitments_create (1)
NAME
- gcloud alpha compute commitments create - create Google Compute Engine commitments
SYNOPSIS
-
gcloud alpha compute commitments create COMMITMENT --plan=PLAN --resources=[RESOURCE=COMMITMENT,...] [--region=REGION] [--type=TYPE; default="general-purpose"] [--allocations-from-file=ALLOCATIONS_FROM_FILE | [--allocation=ALLOCATION : --allocation-zone=ALLOCATION_ZONE --accelerator=[count=COUNT],[type=TYPE] --local-ssd=[interface=INTERFACE],[size=SIZE] --machine-type=MACHINE_TYPE --min-cpu-platform=MIN_CPU_PLATFORM --require-specific-allocation --vm-count=VM_COUNT]] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Create Google Compute Engine commitments.
POSITIONAL ARGUMENTS
-
- COMMITMENT
-
- Name of the commitment to create.
- Name of the commitment to create.
REQUIRED FLAGS
-
- --plan=PLAN
-
Duration of the commitment. PLAN must be one of: 12-month,
36-month.
- --resources=[RESOURCE=COMMITMENT,...]
-
Resources to be included in the commitment commitment:
-
- ---
- MEMORY should include unit (eg. 3072MB or 9GB). If no units are specified, GB is assumed.
- ---
- VCPU is number of committed cores.
-
Ratio between number of VCPU cores and memory must conform to limits described
on:
cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type
OPTIONAL FLAGS
-
- --region=REGION
-
Region of the commitment to create. If not specified, you may be prompted to
select a region.
To avoid prompting when this flag is omitted, you can set the compute/region property:
- $ gcloud config set compute/region REGION
A list of regions can be fetched by running:
- $ gcloud compute regions list
To unset the property, run:
- $ gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable CLOUDSDK_COMPUTE_REGION.
- --type=TYPE; default="general-purpose"
-
Type of commitment. memory-optimized indicates that the commitment is for
memory-optimized VMs. TYPE must be one of: general-purpose,
memory-optimized.
-
Manage the allocations to be created with the commitment. At most one of these
may be specified:
-
- --allocations-from-file=ALLOCATIONS_FROM_FILE
-
The path to a YAML file of multiple allocations' configuration.
-
Manage the allocation to be created with the commitment.
-
- --allocation=ALLOCATION
-
Name of the zonal allocation to operate on. This flag must be specified if any
of the other arguments in this group are specified.
- --allocation-zone=ALLOCATION_ZONE
-
Zone of the zonal allocation to operate on. If not specified and the
compute/zone property isn't set, you may be prompted to select a
zone.
To avoid prompting when this flag is omitted, you can set the compute/zone property:
- $ gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
- $ gcloud compute zones list
To unset the property, run:
- $ gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.
-
Manage the specific SKU allocation properties to create.
-
- --accelerator=[count=COUNT],[type=TYPE]
-
Manage the configuration of the type and number of accelerator cards attached.
-
-
- count
-
The number of pieces of the accelerator to attach to the allocation.
- type
-
The specific type (e.g. nvidia-tesla-k80 for nVidia Tesla K80) of accelerator
to attach to the allocation. Use 'gcloud compute accelerator-types list' to
learn about all available accelerator types.
-
- --local-ssd=[interface=INTERFACE],[size=SIZE]
-
Manage the size and the interface of local SSD to use.
-
- interface
-
The kind of disk interface exposed to the VM for this SSD. Valid values are
scsi and nvme. SCSI is the default and is supported by
more guest operating systems. NVME may provide higher performance.
- size
-
The size of the local SSD in base-2 GB.
-
- --machine-type=MACHINE_TYPE
-
The type of machine (name only) which has fixed number of vCPUs and fixed amount
of memory. This also includes specifying custom machine type following
custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
-
- --min-cpu-platform=MIN_CPU_PLATFORM
-
The minimum cpu platform of the allocation.
- --require-specific-allocation
-
Indicates whether the allocation can be consumed by VMs with "any allocation"
defined. If enabled, then only VMs that target the allocation by name using
--allocation-affinity can consume this allocation. It also indicates that if
true, the existing instances are also accounted in the allocation.
- --vm-count=VM_COUNT
-
The number of resources that are allocated to this allocation.
-
-
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud compute commitments create $ gcloud beta compute commitments create