Skip to content

Commit ca925d2

Browse files
feat: [Compute] Update Compute Engine v1 API to revision 20260629 (#1213) (#9348)
* feat: Update Compute Engine v1 API to revision 20260629 (#1213) Source-Link: googleapis/googleapis@f63acc6 Source-Link: googleapis/googleapis-gen@cbc7813 Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiY2JjNzgxM2Q0ZGNkMWJkZDcxYmI5MGUyNTYwYjZmY2EyYTgxZmRmNCJ9 * 🦉 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 3f522b3 commit ca925d2

110 files changed

Lines changed: 9980 additions & 300 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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Compute/samples/V1/BackendServicesClient/list_usable.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
use Google\Cloud\Compute\V1\ListUsableBackendServicesRequest;
3030

3131
/**
32-
* Retrieves a list of all usable backend services in the specified project.
32+
* Retrieves a list of all usable backend services for Application Load
33+
* Balancers and Proxy Network Load Balancers in the specified project.
34+
* Backend services for external and internal passthrough Network Load
35+
* Balancers are not included in the response.
3336
*
3437
* @param string $project Project ID for this request.
3538
*/

Compute/samples/V1/RegionBackendServicesClient/list_usable.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
use Google\Cloud\Compute\V1\ListUsableRegionBackendServicesRequest;
3030

3131
/**
32-
* Retrieves a list of all usable backend services in the specified project in
33-
* the given region.
32+
* Retrieves a list of all usable backend services for Application Load
33+
* Balancers and Proxy Network Load Balancers in the specified project in the
34+
* given region. Backend services for external and internal passthrough
35+
* Network Load Balancers are not included in the response.
3436
*
3537
* @param string $project Project ID for this request.
3638
* @param string $region Name of the region scoping this request.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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_Rollouts_Advance_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\OperationResponse;
28+
use Google\Cloud\Compute\V1\AdvanceRolloutRequest;
29+
use Google\Cloud\Compute\V1\Client\RolloutsClient;
30+
use Google\Rpc\Status;
31+
32+
/**
33+
* Advances a Rollout to the next wave, or completes it if no waves remain.
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $rollout Name of the Rollout resource to advance.
37+
*/
38+
function advance_sample(string $project, string $rollout): void
39+
{
40+
// Create a client.
41+
$rolloutsClient = new RolloutsClient();
42+
43+
// Prepare the request message.
44+
$request = (new AdvanceRolloutRequest())
45+
->setProject($project)
46+
->setRollout($rollout);
47+
48+
// Call the API and handle any network failures.
49+
try {
50+
/** @var OperationResponse $response */
51+
$response = $rolloutsClient->advance($request);
52+
$response->pollUntilComplete();
53+
54+
if ($response->operationSucceeded()) {
55+
printf('Operation completed successfully.' . PHP_EOL);
56+
} else {
57+
/** @var Status $error */
58+
$error = $response->getError();
59+
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
60+
}
61+
} catch (ApiException $ex) {
62+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
63+
}
64+
}
65+
66+
/**
67+
* Helper to execute the sample.
68+
*
69+
* This sample has been automatically generated and should be regarded as a code
70+
* template only. It will require modifications to work:
71+
* - It may require correct/in-range values for request initialization.
72+
* - It may require specifying regional endpoints when creating the service client,
73+
* please see the apiEndpoint client configuration option for more details.
74+
*/
75+
function callSample(): void
76+
{
77+
$project = '[PROJECT]';
78+
$rollout = '[ROLLOUT]';
79+
80+
advance_sample($project, $rollout);
81+
}
82+
// [END compute_v1_generated_Rollouts_Advance_sync]
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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_Rollouts_Pause_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\OperationResponse;
28+
use Google\Cloud\Compute\V1\Client\RolloutsClient;
29+
use Google\Cloud\Compute\V1\PauseRolloutRequest;
30+
use Google\Rpc\Status;
31+
32+
/**
33+
* Pauses a Rollout.
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $rollout Name of the Rollout resource to pause.
37+
*/
38+
function pause_sample(string $project, string $rollout): void
39+
{
40+
// Create a client.
41+
$rolloutsClient = new RolloutsClient();
42+
43+
// Prepare the request message.
44+
$request = (new PauseRolloutRequest())
45+
->setProject($project)
46+
->setRollout($rollout);
47+
48+
// Call the API and handle any network failures.
49+
try {
50+
/** @var OperationResponse $response */
51+
$response = $rolloutsClient->pause($request);
52+
$response->pollUntilComplete();
53+
54+
if ($response->operationSucceeded()) {
55+
printf('Operation completed successfully.' . PHP_EOL);
56+
} else {
57+
/** @var Status $error */
58+
$error = $response->getError();
59+
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
60+
}
61+
} catch (ApiException $ex) {
62+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
63+
}
64+
}
65+
66+
/**
67+
* Helper to execute the sample.
68+
*
69+
* This sample has been automatically generated and should be regarded as a code
70+
* template only. It will require modifications to work:
71+
* - It may require correct/in-range values for request initialization.
72+
* - It may require specifying regional endpoints when creating the service client,
73+
* please see the apiEndpoint client configuration option for more details.
74+
*/
75+
function callSample(): void
76+
{
77+
$project = '[PROJECT]';
78+
$rollout = '[ROLLOUT]';
79+
80+
pause_sample($project, $rollout);
81+
}
82+
// [END compute_v1_generated_Rollouts_Pause_sync]
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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_Rollouts_Resume_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\OperationResponse;
28+
use Google\Cloud\Compute\V1\Client\RolloutsClient;
29+
use Google\Cloud\Compute\V1\ResumeRolloutRequest;
30+
use Google\Rpc\Status;
31+
32+
/**
33+
* Resumes a Rollout.
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $rollout Name of the Rollout resource to resume.
37+
*/
38+
function resume_sample(string $project, string $rollout): void
39+
{
40+
// Create a client.
41+
$rolloutsClient = new RolloutsClient();
42+
43+
// Prepare the request message.
44+
$request = (new ResumeRolloutRequest())
45+
->setProject($project)
46+
->setRollout($rollout);
47+
48+
// Call the API and handle any network failures.
49+
try {
50+
/** @var OperationResponse $response */
51+
$response = $rolloutsClient->resume($request);
52+
$response->pollUntilComplete();
53+
54+
if ($response->operationSucceeded()) {
55+
printf('Operation completed successfully.' . PHP_EOL);
56+
} else {
57+
/** @var Status $error */
58+
$error = $response->getError();
59+
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
60+
}
61+
} catch (ApiException $ex) {
62+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
63+
}
64+
}
65+
66+
/**
67+
* Helper to execute the sample.
68+
*
69+
* This sample has been automatically generated and should be regarded as a code
70+
* template only. It will require modifications to work:
71+
* - It may require correct/in-range values for request initialization.
72+
* - It may require specifying regional endpoints when creating the service client,
73+
* please see the apiEndpoint client configuration option for more details.
74+
*/
75+
function callSample(): void
76+
{
77+
$project = '[PROJECT]';
78+
$rollout = '[ROLLOUT]';
79+
80+
resume_sample($project, $rollout);
81+
}
82+
// [END compute_v1_generated_Rollouts_Resume_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_Routers_DeleteNamedSet_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\OperationResponse;
28+
use Google\Cloud\Compute\V1\Client\RoutersClient;
29+
use Google\Cloud\Compute\V1\DeleteNamedSetRouterRequest;
30+
use Google\Rpc\Status;
31+
32+
/**
33+
* Deletes Named Set
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $region Name of the region for this request.
37+
* @param string $router Name of the Router resource where Named Set is defined.
38+
*/
39+
function delete_named_set_sample(string $project, string $region, string $router): void
40+
{
41+
// Create a client.
42+
$routersClient = new RoutersClient();
43+
44+
// Prepare the request message.
45+
$request = (new DeleteNamedSetRouterRequest())
46+
->setProject($project)
47+
->setRegion($region)
48+
->setRouter($router);
49+
50+
// Call the API and handle any network failures.
51+
try {
52+
/** @var OperationResponse $response */
53+
$response = $routersClient->deleteNamedSet($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+
$project = '[PROJECT]';
80+
$region = '[REGION]';
81+
$router = '[ROUTER]';
82+
83+
delete_named_set_sample($project, $region, $router);
84+
}
85+
// [END compute_v1_generated_Routers_DeleteNamedSet_sync]

0 commit comments

Comments
 (0)