- NAME
-
- gcloud beta compute resource-policies create workload-policy - create a Compute Engine workload resource policy
- SYNOPSIS
-
-
gcloud beta compute resource-policies create workload-policy
NAME
--type
=TYPE
[--description
=DESCRIPTION
] [--region
=REGION
] [--accelerator-topology
=ACCELERATOR_TOPOLOGY
|--max-topology-distance
=MAX_TOPOLOGY_DISTANCE
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
(BETA)
Create a Compute Engine workload resource policy. - POSITIONAL ARGUMENTS
-
NAME
- Name of the resource policy to operate on.
- REQUIRED FLAGS
-
--type
=TYPE
-
Type of the workload policy defining the high-level intent of the cluster.
TYPE
must be one of:HIGH_AVAILABILITY
- For workloads that aim to be highly available. Common examples are web / ML serving, or distributed database clusters. Compute Engine spreads VMs at best-effort to improve reliability of the distributed infrastructure.
HIGH_THROUGHPUT
- For high throughput distributed workloads eg. HPC or ML training. Compute Engine collocates VMs at best-effort to reduce network latency between VMs.
- OPTIONAL FLAGS
-
--description
=DESCRIPTION
- An optional, textual description for the backend.
--region
=REGION
-
Region of the resource policy to operate on. If not specified, you might be
prompted to select a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:compute/region
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
-
At most one of these can be specified:
--accelerator-topology
=ACCELERATOR_TOPOLOGY
- Specifies the topology of placement and interconnection performance required to create a slice of VMs with interconnected accelerators.
--max-topology-distance
=MAX_TOPOLOGY_DISTANCE
-
Specifies the topology of placement and interconnection network performance of
the group of VMs (MIG / Multi-MIGs).
MAX_TOPOLOGY_DISTANCE
must be one of:BLOCK
- VMs are placed within the same block of capacity with improved latency compared to Cluster.
CLUSTER
- VMs are placed within the same cluster of capacity with improved latency between them.
SUBBLOCK
- Tightest collocation of VMs that provides minimized network latency. VMs are placed within the same rack of capacity with improved latency compared to Block.
- 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. This variant
is also available:
gcloud alpha compute resource-policies create workload-policy
gcloud beta compute resource-policies create workload-policy
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-03-25 UTC.