Creates and runs virtual machines on Google Cloud Platform.
Service: compute.googleapis.com
When facing errors, refer to this catalog alongside using our client libraries. If you're using your own libraries, keep this guide handy for debugging and error resolution. To know more about the error response structure, visit the error overview page.
Error codes
The following table lists HTTP status codes and associated errors that you might encounter when interacting with our API. Each status code corresponds to one or more reasons and descriptions to help you troubleshoot and handle errors effectively in your application. Within the descriptions, variables denoted by curly braces ({}
) represent placeholders for values that are specific to your request.
Reason | HTTP Status Code | Description |
---|---|---|
PERMISSIONS_ERROR |
403 |
Required '{permission}' permission for '{resource}' |
INVALID_FIELD_VALUE |
400 |
Invalid value for field '{field}': '{value}'. {reason} |
FIELD_SIZE_TOO_LARGE |
400 |
Value for field '{field}' is too large: maximum size {max_size} {size_unit}; actual size {actual_size}. |
MISSING_REQUIRED_FIELD |
400 |
Required field '{field}' not specified |
PROJECT_NOT_FOUND |
404 |
The resource '{project}' was not found |
NETWORK_NOT_FOUND |
404 |
Network '{network_name}' was not found in project '{project}' in scope '{scope}' (type':' '{scope_type}'). |
SERVICE_UNAVAILABLE_FOR_LOCATION |
500 |
'{service_name}' in location '{scope_name}' cannot accept requests. Please try again later. |
CROSS_LOCATION_REQUEST |
403 |
Request in scope '{request_scope}' sent to api endpoint in '{endpoint_scope}'. |
RESOURCE_NOT_FOUND |
404 |
The resource '{resource}' was not found |
EXTERNAL_RESOURCE_NOT_FOUND |
404 |
The resource '{resource}' of type '{resource_type}' was not found. |
RESOURCE_ALREADY_EXISTS |
409 |
The resource '{resource}' already exists |
RESOURCE_NOT_READY |
400 |
The resource '{resource}' is not ready |
RESOURCE_NOT_READY_WITH_DETAILS |
400 |
The resource '{resource}' is not ready. {reason} |
RESOURCE_IN_USE_BY_ANOTHER_RESOURCE |
400 |
The {resource_type} resource '{resource}' is already being used by '{conflicting_resource}' |
RATE_LIMIT_EXCEEDED |
403 |
Quota exceeded for quota metric '{quota_metric}' and limit '{quota_limit}' of service '{service}' for consumer '{consumer}'. |
QUOTA_EXCEEDED |
403 |
Quota '{quota_metric}' exceeded. Limit: {quota_limit_value} |
LIMIT_EXCEEDED |
403 |
Exceeded limit '{limit_metric}' on resource '{resource}'. Limit: {limit_value} |
RESOURCE_POOL_EXHAUSTED |
503 |
The global or regional {resource_type} resource pool is exhausted |
ZONE_RESOURCE_POOL_EXHAUSTED |
503 |
The zone '{zone}' does not have enough resources available to fulfill the request. Try a different zone, or try again later. For more information, see our Troubleshooting documentation. |
ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS |
503 |
The zone '{zone}' does not have enough resources available to fulfill the request. {details} For more information, see our Troubleshooting documentation. |
REGION_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS |
503 |
The region '{region}' does not have enough resources available to fulfill the request: '{details}' For more information, see our Troubleshooting documentation. |
MACHINE_TYPE_UNSUPPORTED |
400 |
The specified machine type '{machine_type}' does not exist in zone '{zone}'. See the documentation for a list of available machine types by zone. For more information, see our Troubleshooting documentation. |
SSL_CERTIFICATE_MISSING_CN |
400 |
The SSL certificate is missing a Common Name(CN) or Subject Alternative Name(SAN). |
SSL_CERTIFICATE_COULD_NOT_PARSE_CERT |
400 |
The SSL certificate could not be parsed. |
SSL_CERTIFICATE_COULD_NOT_PARSE_KEY |
400 |
The SSL key could not be parsed. |
SSL_CERTIFICATE_UNSUPPORTED_KEY_SIZE |
400 |
The SSL key size is unsupported. The loadbalancer supports RSA-2048 and ECDSA P-256 certificates. |
SSL_CERTIFICATE_RSA_PUBLIC_EXPONENT_TOO_LARGE |
400 |
The RSA public exponent is too large. |
TOO_MANY_FIREWALL_ATOMS |
400 |
The network contains too many large firewalls. |
INSTANCE_IN_MULTIPLE_LOAD_BALANCED_IGS |
400 |
Validation failed for instance '{instance}': instance may belong to at most one load-balanced instance group. |
INCOMPATIBLE_BACKEND_SERVICES |
400 |
Validation failed for instance group '{instance_group}': backend services '{backend_service_1}' and '{backend_service_2}' point to the same instance group but the backends have incompatible {incompatible_parameter}. {incompatibility_explanation} |
IP_IN_USE_BY_ANOTHER_RESOURCE |
400 |
IP '{ip_address}' is already being used by another resource. |
IP_SPACE_EXHAUSTED |
400 |
IP space of '{network_or_subnetwork}' is exhausted. |
IP_SPACE_EXHAUSTED_WITH_DETAILS |
400 |
IP space of '{network_or_subnetwork}' is exhausted. Insufficient free IP addresses in the IP range '{ip_range}'. Consider expanding the current IP range or selecting an alternative IP range. If this is a secondary range, consider adding an additional secondary range. |
IP_OUT_OF_RANGE |
400 |
Requested IP '{ip_address}' is outside the valid CIDR range '{ip_range}' for resource '{resource}'. |
INSTANCE_GROUP_NETWORK_VALIDATION_ERROR |
400 |
Validation failed for Instance Group '{instance_group}': load balanced instance group requires all instances to be part of the same network and subnetwork. |
WRONG_NETWORK |
400 |
Resource '{resource}' is expected to be in the network '{expected_network}' but is in the network '{actual_network}'. |
WRONG_SUBNETWORK |
400 |
Resource '{resource}' is expected to be in the subnetwork '{expected_subnetwork}' but is in the subnetwork '{actual_subnetwork}'. |
PREVIEW_FEATURE_UNSUPPORTED |
400 |
Invalid preview feature name: {feature_name}. Currently, only the alpha-api-access preview feature can be enabled or disabled. |
PREVIEW_FEATURE_ROLLOUT_PLAN_UNSUPPORTED |
400 |
Invalid rollout plan. Currently, only PredefinedRolloutPlan ROLLOUT_PLAN_FAST_ROLLOUT is supported. |
PREVIEW_FEATURE_ACTIVATION_STATUS_INVALID |
400 |
Invalid activation status: {activation_status}. A preview feature can only be enabled or disabled. |
INCOMPATIBLE_RESERVATION_AFFINITY |
400 |
You must configure the reservation affinity in the '{resource_type_1}' resource '{resource_name_1}' to match the reservation affinity of '{resource_type_2}' resource '{resource_name_2}'. View the details of the each resource to determine its reservation affinity then try again. For more information, see our Troubleshooting documentation. |
INCOMPATIBLE_NODE_AFFINITY |
400 |
You must configure the node affinity in the '{resource_type_1}' resource '{resource_name_1}' to match the node affinity of '{resource_type_2}' resource '{resource_name_2}'. View the details of the each resource to determine its node affinity then try again. For more information, see our Troubleshooting documentation. |
INCOMPATIBLE_INSTANCE_PROVISIONING_MODEL |
400 |
The '{resource_type_1}' resource '{resource_name_1}' has a '{resource_provisioning_model}' provisioning model. But the '{resource_type_2}' resource only supports instances with the '{supported_provisioning_models}' provisioning models. |
INCOMPATIBLE_DISK_REPLICA_ZONES |
400 |
A regional disk attached to the '{resource_type_1}' resource '{resource_name_1}' is replicated in zones {replica_zones}. You must configure the '{resource_type_2}' resource '{resource_name_2}' in the same zones. |
REGIONAL_DISK_REQUIRED |
400 |
A disk attached to the '{resource_type_1}' resource '{resource_name_1}' is either a zonal disk or a local disk. But '{resource_type_2}' resource only supports regional disks. For more information, see our Troubleshooting documentation. |
INSTANCE_NAME_ALREADY_IN_USE_IN_BOTH_ZONES |
400 |
Instance name '{instance_name}' already in use in both zones '{zones}'. To create an HA Controller the instance name must be used in only one of the zones. |
INCOMPATIBLE_DISK_INTERFACE_FOR_MACHINE_TYPE |
400 |
The specified disk interface '{disk_interface}' is not compatible with the specified machine type '{machine_type}'. See the documentation for compatible disk interfaces for each machine series. For more information, see our Troubleshooting documentation. |
FIREWALL_POLICY_CONCURRENT_OPERATIONS_LIMIT_EXCEEDED |
429 |
Firewall Policy concurrent operation limit exceeded for resource '{resource}'. Limit {limit} per firewall policy. Please wait for other operations to be done and try again later. |