- NAME
-
- gcloud alpha fault-testing validations create - create a validation
- SYNOPSIS
-
-
gcloud alpha fault-testing validations create(VALIDATION:--location=LOCATION) (--cloud-sql-failover-instance=CLOUD_SQL_FAILOVER_INSTANCE| [--l7-lb-http-fault-forwarding-rule=L7_LB_HTTP_FAULT_FORWARDING_RULE:--l7-lb-http-fault-backend-service=L7_LB_HTTP_FAULT_BACKEND_SERVICE--l7-lb-http-fault-abort-percentage=L7_LB_HTTP_FAULT_ABORT_PERCENTAGE--l7-lb-http-fault-abort-status-code=L7_LB_HTTP_FAULT_ABORT_STATUS_CODE|--l7-lb-http-fault-delay=L7_LB_HTTP_FAULT_DELAY--l7-lb-http-fault-delay-percentage=L7_LB_HTTP_FAULT_DELAY_PERCENTAGE]) [--description=DESCRIPTION] [--display-name=DISPLAY_NAME] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)Create a new validation. - EXAMPLES
-
To create a validation
test-validation-idin locationasia-east1using Cloud SQL failover instancetest-cloud-sql-instancein projecttest-projectrun:gcloud alpha fault-testing validations create test-validation-id --location=asia-east1 --cloud-sql-failover-instance="projects/test-project/instances/test-cloud-sql-instance" - POSITIONAL ARGUMENTS
-
-
Validation resource - Identifier. Unique identifier for the
Validationdry run. Format:projects/{project_id}/locations/{location}/validations/{validationId}. The arguments in this group can be used to specify the attributes of this resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.To set the
projectattribute:-
provide the argument
validationon the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
This must be specified.
VALIDATION-
ID of the validation or fully qualified identifier for the validation.
To set the
validationattribute:-
provide the argument
validationon the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location=LOCATION-
The location id of the validation resource.
To set the
locationattribute:-
provide the argument
validationon the command line with a fully specified name; -
provide the argument
--locationon the command line.
-
provide the argument
-
provide the argument
-
Validation resource - Identifier. Unique identifier for the
- REQUIRED FLAGS
-
-
The action to be performed by the experiment.
This must be specified.
-
Arguments for the action.
At most one of these can be specified:
- CloudSQLFailover causes a Cloud SQL primary instance to fail over to another instance.
--cloud-sql-failover-instance=CLOUD_SQL_FAILOVER_INSTANCE-
The identifying name of the Cloud SQL instance to fail over. Format:
projects/{project}/instances/{instance} - Injection of HTTP faults into a layer 7 load balancer.
--l7-lb-http-fault-forwarding-rule=L7_LB_HTTP_FAULT_FORWARDING_RULE-
The identifying name of the forwarding rule resource where the faults will be
injected. Format:
projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}orprojects/{project}/global/forwardingRules/{forwarding_rule}This flag argument must be specified if any of the other arguments in this group are specified.
--l7-lb-http-fault-backend-service=L7_LB_HTTP_FAULT_BACKEND_SERVICE-
Optional identifying name of the backend service to inject faults into. Format:
projects/{project}/regions/{region}/backendServices/{backend_service}orprojects/{project}/global/backendServices/{backend_service}If not specified, all backend services connected to the forwarding_rule will be affected. -
Arguments for the fault.
At most one of these can be specified:
- Artificially return a specific HTTP status code for a percentage of requests.
--l7-lb-http-fault-abort-percentage=L7_LB_HTTP_FAULT_ABORT_PERCENTAGE-
Percentage of requests to abort, in the range 0 to 100, inclusive.
This flag argument must be specified if any of the other arguments in this group are specified.
--l7-lb-http-fault-abort-status-code=L7_LB_HTTP_FAULT_ABORT_STATUS_CODE-
HTTP status code to return. In the range 500 to 599, inclusive.
This flag argument must be specified if any of the other arguments in this group are specified.
- Artificially delay HTTP responses for a percentage of requests.
--l7-lb-http-fault-delay=L7_LB_HTTP_FAULT_DELAY-
Delay duration.
This flag argument must be specified if any of the other arguments in this group are specified.
--l7-lb-http-fault-delay-percentage=L7_LB_HTTP_FAULT_DELAY_PERCENTAGE-
Percentage of requests to delay, in the range 0 to 100, inclusive.
This flag argument must be specified if any of the other arguments in this group are specified.
-
Arguments for the action.
-
The action to be performed by the experiment.
- OPTIONAL FLAGS
-
--description=DESCRIPTION-
Notes or details about the
Validationdry run. Minimum length is 0, maximum length is 2000. --display-name=DISPLAY_NAME-
A human-readable name of the
Validationdry run.
- 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 helpfor details. - API REFERENCE
-
This command uses the
faulttesting/v1alphaAPI. The full documentation for this API can be found at: - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha fault-testing validations create
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 2026-05-05 UTC.