diff --git a/Batch/samples/V1/BatchServiceClient/list_locations.php b/Batch/samples/V1/BatchServiceClient/list_locations.php index afdd8f478b9e..e7a3e0bf7f06 100644 --- a/Batch/samples/V1/BatchServiceClient/list_locations.php +++ b/Batch/samples/V1/BatchServiceClient/list_locations.php @@ -32,6 +32,21 @@ /** * Lists information about the supported locations for this service. * + * This method lists locations based on the resource scope provided in + * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * + * **Global locations**: If `name` is empty, the method lists the + * public locations available to all projects. * **Project-specific + * locations**: If `name` follows the format + * `projects/{project}`, the method lists locations visible to that + * specific project. This includes public, private, or other + * project-specific locations enabled for the project. + * + * For gRPC and client library implementations, the resource name is + * passed as the `name` field. For direct service calls, the resource + * name is + * incorporated into the request path based on the specific service + * implementation and version. + * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: * - It may require correct/in-range values for request initialization. diff --git a/Batch/src/V1/AllocationPolicy/LocationPolicy.php b/Batch/src/V1/AllocationPolicy/LocationPolicy.php index 201fb10fb7d7..5d11d2ba01f7 100644 --- a/Batch/src/V1/AllocationPolicy/LocationPolicy.php +++ b/Batch/src/V1/AllocationPolicy/LocationPolicy.php @@ -14,18 +14,28 @@ class LocationPolicy extends \Google\Protobuf\Internal\Message { /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. + * A list of location names that are allowed for the job's VMs formatted + * as URLs. Each location can be a region or a zone, but you can only + * specify one region or multiple zones in one region per job. For example, + * `["regions/us-central1"]` allow VMs in any zones in region + * `us-central1`, and `["zones/us-central1-a", "zones/us-central1-c"]` + * only allow VMs in zones `us-central1-a` and `us-central1-c`. However, + * `["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"]` causes an error because it contains multiple regions + * (`us-central1` and `us-west1`). + * The specified region or zones must be in the same region in + * which the job is created starting on the following dates: + * + For projects that have successfully submitted before + * July 31, 2026 at least one job that uses the + * `allowedLocations[]` field with any region or zones + * outside of the job's location, the changes are starting + * on _June 30, 2027_. + * + For all other projects, the changes are starting on + * _July 31, 2026_. + * For example, for job `projects/123/locations/us-central1/jobs/jobid`, + * the specified region or zones must be in `us-central1`. Using a + * different region (e.g. `regions/us-west1`) or a zone not in + * `us-central1` (e.g. `zones/us-west1-a`) causes an error. * * Generated from protobuf field repeated string allowed_locations = 1; */ @@ -38,18 +48,28 @@ class LocationPolicy extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string[] $allowed_locations - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. + * A list of location names that are allowed for the job's VMs formatted + * as URLs. Each location can be a region or a zone, but you can only + * specify one region or multiple zones in one region per job. For example, + * `["regions/us-central1"]` allow VMs in any zones in region + * `us-central1`, and `["zones/us-central1-a", "zones/us-central1-c"]` + * only allow VMs in zones `us-central1-a` and `us-central1-c`. However, + * `["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"]` causes an error because it contains multiple regions + * (`us-central1` and `us-west1`). + * The specified region or zones must be in the same region in + * which the job is created starting on the following dates: + * + For projects that have successfully submitted before + * July 31, 2026 at least one job that uses the + * `allowedLocations[]` field with any region or zones + * outside of the job's location, the changes are starting + * on _June 30, 2027_. + * + For all other projects, the changes are starting on + * _July 31, 2026_. + * For example, for job `projects/123/locations/us-central1/jobs/jobid`, + * the specified region or zones must be in `us-central1`. Using a + * different region (e.g. `regions/us-west1`) or a zone not in + * `us-central1` (e.g. `zones/us-west1-a`) causes an error. * } */ public function __construct($data = NULL) { @@ -58,18 +78,28 @@ public function __construct($data = NULL) { } /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. + * A list of location names that are allowed for the job's VMs formatted + * as URLs. Each location can be a region or a zone, but you can only + * specify one region or multiple zones in one region per job. For example, + * `["regions/us-central1"]` allow VMs in any zones in region + * `us-central1`, and `["zones/us-central1-a", "zones/us-central1-c"]` + * only allow VMs in zones `us-central1-a` and `us-central1-c`. However, + * `["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"]` causes an error because it contains multiple regions + * (`us-central1` and `us-west1`). + * The specified region or zones must be in the same region in + * which the job is created starting on the following dates: + * + For projects that have successfully submitted before + * July 31, 2026 at least one job that uses the + * `allowedLocations[]` field with any region or zones + * outside of the job's location, the changes are starting + * on _June 30, 2027_. + * + For all other projects, the changes are starting on + * _July 31, 2026_. + * For example, for job `projects/123/locations/us-central1/jobs/jobid`, + * the specified region or zones must be in `us-central1`. Using a + * different region (e.g. `regions/us-west1`) or a zone not in + * `us-central1` (e.g. `zones/us-west1-a`) causes an error. * * Generated from protobuf field repeated string allowed_locations = 1; * @return RepeatedField @@ -80,18 +110,28 @@ public function getAllowedLocations() } /** - * A list of allowed location names represented by internal URLs. - * Each location can be a region or a zone. - * Only one region or multiple zones in one region is supported now. - * For example, - * ["regions/us-central1"] allow VMs in any zones in region us-central1. - * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs - * in zones us-central1-a and us-central1-c. - * Mixing locations from different regions would cause errors. - * For example, - * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains locations from two distinct regions: - * us-central1 and us-west1. This combination will trigger an error. + * A list of location names that are allowed for the job's VMs formatted + * as URLs. Each location can be a region or a zone, but you can only + * specify one region or multiple zones in one region per job. For example, + * `["regions/us-central1"]` allow VMs in any zones in region + * `us-central1`, and `["zones/us-central1-a", "zones/us-central1-c"]` + * only allow VMs in zones `us-central1-a` and `us-central1-c`. However, + * `["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + * "zones/us-west1-a"]` causes an error because it contains multiple regions + * (`us-central1` and `us-west1`). + * The specified region or zones must be in the same region in + * which the job is created starting on the following dates: + * + For projects that have successfully submitted before + * July 31, 2026 at least one job that uses the + * `allowedLocations[]` field with any region or zones + * outside of the job's location, the changes are starting + * on _June 30, 2027_. + * + For all other projects, the changes are starting on + * _July 31, 2026_. + * For example, for job `projects/123/locations/us-central1/jobs/jobid`, + * the specified region or zones must be in `us-central1`. Using a + * different region (e.g. `regions/us-west1`) or a zone not in + * `us-central1` (e.g. `zones/us-west1-a`) causes an error. * * Generated from protobuf field repeated string allowed_locations = 1; * @param string[] $var diff --git a/Batch/src/V1/Client/BatchServiceClient.php b/Batch/src/V1/Client/BatchServiceClient.php index 53d5839026d8..c1b951c1a8e7 100644 --- a/Batch/src/V1/Client/BatchServiceClient.php +++ b/Batch/src/V1/Client/BatchServiceClient.php @@ -581,6 +581,21 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. * + * This method lists locations based on the resource scope provided in + * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * + * **Global locations**: If `name` is empty, the method lists the + * public locations available to all projects. * **Project-specific + * locations**: If `name` follows the format + * `projects/{project}`, the method lists locations visible to that + * specific project. This includes public, private, or other + * project-specific locations enabled for the project. + * + * For gRPC and client library implementations, the resource name is + * passed as the `name` field. For direct service calls, the resource + * name is + * incorporated into the request path based on the specific service + * implementation and version. + * * The async variant is {@see BatchServiceClient::listLocationsAsync()} . * * @example samples/V1/BatchServiceClient/list_locations.php