Skip to content

Commit e948ad3

Browse files
feat: [Compute] Update Compute Engine v1 API to revision 20251230 (#1144) (#8864)
* feat: Update Compute Engine v1 API to revision 20251230 (#1144) Source-Link: googleapis/googleapis@59405cf Source-Link: googleapis/googleapis-gen@0638a04 Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiMDYzOGEwNGUwOThkYTVkNzYyZjFkMDkzNGE0NGNiYjQzYTk2MjY2MSJ9 * 🦉 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 2158b82 commit e948ad3

File tree

90 files changed

+5801
-0
lines changed

Some content is hidden

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

90 files changed

+5801
-0
lines changed

Compute/metadata/V1/Compute.php

8.21 KB
Binary file not shown.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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_Autoscalers_TestIamPermissions_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\Compute\V1\Client\AutoscalersClient;
28+
use Google\Cloud\Compute\V1\TestIamPermissionsAutoscalerRequest;
29+
use Google\Cloud\Compute\V1\TestPermissionsRequest;
30+
use Google\Cloud\Compute\V1\TestPermissionsResponse;
31+
32+
/**
33+
* Returns permissions that a caller has on the specified resource.
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $resource Name or id of the resource for this request.
37+
* @param string $zone The name of the zone for this request.
38+
*/
39+
function test_iam_permissions_sample(string $project, string $resource, string $zone): void
40+
{
41+
// Create a client.
42+
$autoscalersClient = new AutoscalersClient();
43+
44+
// Prepare the request message.
45+
$testPermissionsRequestResource = new TestPermissionsRequest();
46+
$request = (new TestIamPermissionsAutoscalerRequest())
47+
->setProject($project)
48+
->setResource($resource)
49+
->setTestPermissionsRequestResource($testPermissionsRequestResource)
50+
->setZone($zone);
51+
52+
// Call the API and handle any network failures.
53+
try {
54+
/** @var TestPermissionsResponse $response */
55+
$response = $autoscalersClient->testIamPermissions($request);
56+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
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+
$resource = '[RESOURCE]';
75+
$zone = '[ZONE]';
76+
77+
test_iam_permissions_sample($project, $resource, $zone);
78+
}
79+
// [END compute_v1_generated_Autoscalers_TestIamPermissions_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_HealthChecks_TestIamPermissions_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\Compute\V1\Client\HealthChecksClient;
28+
use Google\Cloud\Compute\V1\TestIamPermissionsHealthCheckRequest;
29+
use Google\Cloud\Compute\V1\TestPermissionsRequest;
30+
use Google\Cloud\Compute\V1\TestPermissionsResponse;
31+
32+
/**
33+
* Returns permissions that a caller has on the specified resource.
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $resource Name or id of the resource for this request.
37+
*/
38+
function test_iam_permissions_sample(string $project, string $resource): void
39+
{
40+
// Create a client.
41+
$healthChecksClient = new HealthChecksClient();
42+
43+
// Prepare the request message.
44+
$testPermissionsRequestResource = new TestPermissionsRequest();
45+
$request = (new TestIamPermissionsHealthCheckRequest())
46+
->setProject($project)
47+
->setResource($resource)
48+
->setTestPermissionsRequestResource($testPermissionsRequestResource);
49+
50+
// Call the API and handle any network failures.
51+
try {
52+
/** @var TestPermissionsResponse $response */
53+
$response = $healthChecksClient->testIamPermissions($request);
54+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
55+
} catch (ApiException $ex) {
56+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
57+
}
58+
}
59+
60+
/**
61+
* Helper to execute the sample.
62+
*
63+
* This sample has been automatically generated and should be regarded as a code
64+
* template only. It will require modifications to work:
65+
* - It may require correct/in-range values for request initialization.
66+
* - It may require specifying regional endpoints when creating the service client,
67+
* please see the apiEndpoint client configuration option for more details.
68+
*/
69+
function callSample(): void
70+
{
71+
$project = '[PROJECT]';
72+
$resource = '[RESOURCE]';
73+
74+
test_iam_permissions_sample($project, $resource);
75+
}
76+
// [END compute_v1_generated_HealthChecks_TestIamPermissions_sync]
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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_RegionAutoscalers_TestIamPermissions_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\Compute\V1\Client\RegionAutoscalersClient;
28+
use Google\Cloud\Compute\V1\TestIamPermissionsRegionAutoscalerRequest;
29+
use Google\Cloud\Compute\V1\TestPermissionsRequest;
30+
use Google\Cloud\Compute\V1\TestPermissionsResponse;
31+
32+
/**
33+
* Returns permissions that a caller has on the specified resource.
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $region The name of the region for this request.
37+
* @param string $resource Name or id of the resource for this request.
38+
*/
39+
function test_iam_permissions_sample(string $project, string $region, string $resource): void
40+
{
41+
// Create a client.
42+
$regionAutoscalersClient = new RegionAutoscalersClient();
43+
44+
// Prepare the request message.
45+
$testPermissionsRequestResource = new TestPermissionsRequest();
46+
$request = (new TestIamPermissionsRegionAutoscalerRequest())
47+
->setProject($project)
48+
->setRegion($region)
49+
->setResource($resource)
50+
->setTestPermissionsRequestResource($testPermissionsRequestResource);
51+
52+
// Call the API and handle any network failures.
53+
try {
54+
/** @var TestPermissionsResponse $response */
55+
$response = $regionAutoscalersClient->testIamPermissions($request);
56+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
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+
$region = '[REGION]';
75+
$resource = '[RESOURCE]';
76+
77+
test_iam_permissions_sample($project, $region, $resource);
78+
}
79+
// [END compute_v1_generated_RegionAutoscalers_TestIamPermissions_sync]
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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_RegionHealthChecks_TestIamPermissions_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\Compute\V1\Client\RegionHealthChecksClient;
28+
use Google\Cloud\Compute\V1\TestIamPermissionsRegionHealthCheckRequest;
29+
use Google\Cloud\Compute\V1\TestPermissionsRequest;
30+
use Google\Cloud\Compute\V1\TestPermissionsResponse;
31+
32+
/**
33+
* Returns permissions that a caller has on the specified resource.
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $region The name of the region for this request.
37+
* @param string $resource Name or id of the resource for this request.
38+
*/
39+
function test_iam_permissions_sample(string $project, string $region, string $resource): void
40+
{
41+
// Create a client.
42+
$regionHealthChecksClient = new RegionHealthChecksClient();
43+
44+
// Prepare the request message.
45+
$testPermissionsRequestResource = new TestPermissionsRequest();
46+
$request = (new TestIamPermissionsRegionHealthCheckRequest())
47+
->setProject($project)
48+
->setRegion($region)
49+
->setResource($resource)
50+
->setTestPermissionsRequestResource($testPermissionsRequestResource);
51+
52+
// Call the API and handle any network failures.
53+
try {
54+
/** @var TestPermissionsResponse $response */
55+
$response = $regionHealthChecksClient->testIamPermissions($request);
56+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
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+
$region = '[REGION]';
75+
$resource = '[RESOURCE]';
76+
77+
test_iam_permissions_sample($project, $region, $resource);
78+
}
79+
// [END compute_v1_generated_RegionHealthChecks_TestIamPermissions_sync]
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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_RegionNotificationEndpoints_TestIamPermissions_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\Compute\V1\Client\RegionNotificationEndpointsClient;
28+
use Google\Cloud\Compute\V1\TestIamPermissionsRegionNotificationEndpointRequest;
29+
use Google\Cloud\Compute\V1\TestPermissionsRequest;
30+
use Google\Cloud\Compute\V1\TestPermissionsResponse;
31+
32+
/**
33+
* Returns permissions that a caller has on the specified resource.
34+
*
35+
* @param string $project Project ID for this request.
36+
* @param string $region The name of the region for this request.
37+
* @param string $resource Name or id of the resource for this request.
38+
*/
39+
function test_iam_permissions_sample(string $project, string $region, string $resource): void
40+
{
41+
// Create a client.
42+
$regionNotificationEndpointsClient = new RegionNotificationEndpointsClient();
43+
44+
// Prepare the request message.
45+
$testPermissionsRequestResource = new TestPermissionsRequest();
46+
$request = (new TestIamPermissionsRegionNotificationEndpointRequest())
47+
->setProject($project)
48+
->setRegion($region)
49+
->setResource($resource)
50+
->setTestPermissionsRequestResource($testPermissionsRequestResource);
51+
52+
// Call the API and handle any network failures.
53+
try {
54+
/** @var TestPermissionsResponse $response */
55+
$response = $regionNotificationEndpointsClient->testIamPermissions($request);
56+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
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+
$region = '[REGION]';
75+
$resource = '[RESOURCE]';
76+
77+
test_iam_permissions_sample($project, $region, $resource);
78+
}
79+
// [END compute_v1_generated_RegionNotificationEndpoints_TestIamPermissions_sync]

0 commit comments

Comments
 (0)