Skip to content

Commit fbb1ac4

Browse files
feat: [Compute] Update Compute Engine v1 API to revision 20260213 (#8959)
* feat: Update Compute Engine v1 API to revision 20260213 The breaking change exemption is approved in internal http://b/488396206 Source-Link: googleapis/googleapis@eb5a4e3 Source-Link: googleapis/googleapis-gen@6bd90d0 Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiNmJkOTBkMDIwNWRmN2QzYjk0ZmIxNmU5MDhlZjdmNWYxNWVlZGM2YyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent dd7cb42 commit fbb1ac4

116 files changed

Lines changed: 13532 additions & 116 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Compute/metadata/V1/Compute.php

13.9 KB
Binary file not shown.

Compute/samples/V1/DisksClient/update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/**
3434
* Updates the specified disk with the data included in the request.
3535
* The update is performed only on selected fields included as part
36-
* of update-mask. Only the following fields can be modified: user_license.
36+
* of update-mask.
3737
*
3838
* @param string $disk The disk name for this request.
3939
* @param string $project Project ID for this request.

Compute/samples/V1/GlobalNetworkEndpointGroupsClient/insert.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
* Creates a network endpoint group in the specified project using the
3535
* parameters that are included in the request.
3636
*
37+
* Note: Use the following APIs to manage network endpoint groups:
38+
*
39+
* -
40+
* To manage NEGs with zonal scope (such as zonal NEGs, hybrid connectivity
41+
* NEGs): zonal
42+
* API
43+
* -
44+
* To manage NEGs with regional scope (such as regional internet NEGs,
45+
* serverless NEGs, Private Service Connect NEGs): regional
46+
* API
47+
* -
48+
* To manage NEGs with global scope (such as global internet NEGs):global
49+
* API
50+
*
3751
* @param string $project Project ID for this request.
3852
*/
3953
function insert_sample(string $project): void

Compute/samples/V1/NetworkEndpointGroupsClient/insert.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
* Creates a network endpoint group in the specified project using the
3535
* parameters that are included in the request.
3636
*
37+
* Note: Use the following APIs to manage network endpoint groups:
38+
*
39+
* -
40+
* To manage NEGs with zonal scope (such as zonal NEGs, hybrid connectivity
41+
* NEGs): zonal
42+
* API
43+
* -
44+
* To manage NEGs with regional scope (such as regional internet NEGs,
45+
* serverless NEGs, Private Service Connect NEGs): regional
46+
* API
47+
* -
48+
* To manage NEGs with global scope (such as global internet NEGs):global
49+
* API
50+
*
3751
* @param string $project Project ID for this request.
3852
* @param string $zone The name of the zone where
3953
* you want to create the network endpoint group. It should comply with

Compute/samples/V1/RegionDisksClient/update.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232

3333
/**
3434
* Update the specified disk with the data included in the request. Update is
35-
* performed only on selected fields included as part of update-mask. Only the
36-
* following fields can be modified: user_license.
35+
* performed only on selected fields included as part of update-mask.
3736
*
3837
* @param string $disk The disk name for this request.
3938
* @param string $project Project ID for this request.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START compute_v1_generated_RegionHealthAggregationPolicies_AggregatedList_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\PagedListResponse;
28+
use Google\Cloud\Compute\V1\AggregatedListRegionHealthAggregationPoliciesRequest;
29+
use Google\Cloud\Compute\V1\Client\RegionHealthAggregationPoliciesClient;
30+
31+
/**
32+
* Retrieves the list of all HealthAggregationPolicy resources,
33+
* regional and global, available to the specified project.
34+
*
35+
* To prevent failure, it is recommended that you set the
36+
* `returnPartialSuccess` parameter to `true`.
37+
*
38+
* @param string $project Name of the project scoping this request.
39+
*/
40+
function aggregated_list_sample(string $project): void
41+
{
42+
// Create a client.
43+
$regionHealthAggregationPoliciesClient = new RegionHealthAggregationPoliciesClient();
44+
45+
// Prepare the request message.
46+
$request = (new AggregatedListRegionHealthAggregationPoliciesRequest())
47+
->setProject($project);
48+
49+
// Call the API and handle any network failures.
50+
try {
51+
/** @var PagedListResponse $response */
52+
$response = $regionHealthAggregationPoliciesClient->aggregatedList($request);
53+
54+
foreach ($response as $element) {
55+
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
56+
}
57+
} catch (ApiException $ex) {
58+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
59+
}
60+
}
61+
62+
/**
63+
* Helper to execute the sample.
64+
*
65+
* This sample has been automatically generated and should be regarded as a code
66+
* template only. It will require modifications to work:
67+
* - It may require correct/in-range values for request initialization.
68+
* - It may require specifying regional endpoints when creating the service client,
69+
* please see the apiEndpoint client configuration option for more details.
70+
*/
71+
function callSample(): void
72+
{
73+
$project = '[PROJECT]';
74+
75+
aggregated_list_sample($project);
76+
}
77+
// [END compute_v1_generated_RegionHealthAggregationPolicies_AggregatedList_sync]
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START compute_v1_generated_RegionHealthAggregationPolicies_Delete_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\OperationResponse;
28+
use Google\Cloud\Compute\V1\Client\RegionHealthAggregationPoliciesClient;
29+
use Google\Cloud\Compute\V1\DeleteRegionHealthAggregationPolicyRequest;
30+
use Google\Rpc\Status;
31+
32+
/**
33+
* Deletes the specified HealthAggregationPolicy in the given region.
34+
*
35+
* @param string $healthAggregationPolicy Name of the HealthAggregationPolicy resource to delete.
36+
* @param string $project Project ID for this request.
37+
* @param string $region Name of the region scoping this request.
38+
*/
39+
function delete_sample(string $healthAggregationPolicy, string $project, string $region): void
40+
{
41+
// Create a client.
42+
$regionHealthAggregationPoliciesClient = new RegionHealthAggregationPoliciesClient();
43+
44+
// Prepare the request message.
45+
$request = (new DeleteRegionHealthAggregationPolicyRequest())
46+
->setHealthAggregationPolicy($healthAggregationPolicy)
47+
->setProject($project)
48+
->setRegion($region);
49+
50+
// Call the API and handle any network failures.
51+
try {
52+
/** @var OperationResponse $response */
53+
$response = $regionHealthAggregationPoliciesClient->delete($request);
54+
$response->pollUntilComplete();
55+
56+
if ($response->operationSucceeded()) {
57+
printf('Operation completed successfully.' . PHP_EOL);
58+
} else {
59+
/** @var Status $error */
60+
$error = $response->getError();
61+
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
62+
}
63+
} catch (ApiException $ex) {
64+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
65+
}
66+
}
67+
68+
/**
69+
* Helper to execute the sample.
70+
*
71+
* This sample has been automatically generated and should be regarded as a code
72+
* template only. It will require modifications to work:
73+
* - It may require correct/in-range values for request initialization.
74+
* - It may require specifying regional endpoints when creating the service client,
75+
* please see the apiEndpoint client configuration option for more details.
76+
*/
77+
function callSample(): void
78+
{
79+
$healthAggregationPolicy = '[HEALTH_AGGREGATION_POLICY]';
80+
$project = '[PROJECT]';
81+
$region = '[REGION]';
82+
83+
delete_sample($healthAggregationPolicy, $project, $region);
84+
}
85+
// [END compute_v1_generated_RegionHealthAggregationPolicies_Delete_sync]
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START compute_v1_generated_RegionHealthAggregationPolicies_Get_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\Compute\V1\Client\RegionHealthAggregationPoliciesClient;
28+
use Google\Cloud\Compute\V1\GetRegionHealthAggregationPolicyRequest;
29+
use Google\Cloud\Compute\V1\HealthAggregationPolicy;
30+
31+
/**
32+
* Returns the specified HealthAggregationPolicy resource in the given region.
33+
*
34+
* @param string $healthAggregationPolicy Name of the HealthAggregationPolicy resource to return.
35+
* @param string $project Project ID for this request.
36+
* @param string $region Name of the region scoping this request.
37+
*/
38+
function get_sample(string $healthAggregationPolicy, string $project, string $region): void
39+
{
40+
// Create a client.
41+
$regionHealthAggregationPoliciesClient = new RegionHealthAggregationPoliciesClient();
42+
43+
// Prepare the request message.
44+
$request = (new GetRegionHealthAggregationPolicyRequest())
45+
->setHealthAggregationPolicy($healthAggregationPolicy)
46+
->setProject($project)
47+
->setRegion($region);
48+
49+
// Call the API and handle any network failures.
50+
try {
51+
/** @var HealthAggregationPolicy $response */
52+
$response = $regionHealthAggregationPoliciesClient->get($request);
53+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
54+
} catch (ApiException $ex) {
55+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
56+
}
57+
}
58+
59+
/**
60+
* Helper to execute the sample.
61+
*
62+
* This sample has been automatically generated and should be regarded as a code
63+
* template only. It will require modifications to work:
64+
* - It may require correct/in-range values for request initialization.
65+
* - It may require specifying regional endpoints when creating the service client,
66+
* please see the apiEndpoint client configuration option for more details.
67+
*/
68+
function callSample(): void
69+
{
70+
$healthAggregationPolicy = '[HEALTH_AGGREGATION_POLICY]';
71+
$project = '[PROJECT]';
72+
$region = '[REGION]';
73+
74+
get_sample($healthAggregationPolicy, $project, $region);
75+
}
76+
// [END compute_v1_generated_RegionHealthAggregationPolicies_Get_sync]
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START compute_v1_generated_RegionHealthAggregationPolicies_Insert_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\OperationResponse;
28+
use Google\Cloud\Compute\V1\Client\RegionHealthAggregationPoliciesClient;
29+
use Google\Cloud\Compute\V1\HealthAggregationPolicy;
30+
use Google\Cloud\Compute\V1\InsertRegionHealthAggregationPolicyRequest;
31+
use Google\Rpc\Status;
32+
33+
/**
34+
* Create a HealthAggregationPolicy in the specified project in the given
35+
* region using the parameters that are included in the request.
36+
*
37+
* @param string $project Project ID for this request.
38+
* @param string $region Name of the region scoping this request.
39+
*/
40+
function insert_sample(string $project, string $region): void
41+
{
42+
// Create a client.
43+
$regionHealthAggregationPoliciesClient = new RegionHealthAggregationPoliciesClient();
44+
45+
// Prepare the request message.
46+
$healthAggregationPolicyResource = new HealthAggregationPolicy();
47+
$request = (new InsertRegionHealthAggregationPolicyRequest())
48+
->setHealthAggregationPolicyResource($healthAggregationPolicyResource)
49+
->setProject($project)
50+
->setRegion($region);
51+
52+
// Call the API and handle any network failures.
53+
try {
54+
/** @var OperationResponse $response */
55+
$response = $regionHealthAggregationPoliciesClient->insert($request);
56+
$response->pollUntilComplete();
57+
58+
if ($response->operationSucceeded()) {
59+
printf('Operation completed successfully.' . PHP_EOL);
60+
} else {
61+
/** @var Status $error */
62+
$error = $response->getError();
63+
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
64+
}
65+
} catch (ApiException $ex) {
66+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
67+
}
68+
}
69+
70+
/**
71+
* Helper to execute the sample.
72+
*
73+
* This sample has been automatically generated and should be regarded as a code
74+
* template only. It will require modifications to work:
75+
* - It may require correct/in-range values for request initialization.
76+
* - It may require specifying regional endpoints when creating the service client,
77+
* please see the apiEndpoint client configuration option for more details.
78+
*/
79+
function callSample(): void
80+
{
81+
$project = '[PROJECT]';
82+
$region = '[REGION]';
83+
84+
insert_sample($project, $region);
85+
}
86+
// [END compute_v1_generated_RegionHealthAggregationPolicies_Insert_sync]

0 commit comments

Comments
 (0)