Skip to content

Commit f3e0606

Browse files
feat: [compute] Update Compute Engine API to revision 20240421 (#899) (#5294)
* feat: Update Compute Engine API to revision 20240407 (#890) Source-Link: googleapis/googleapis@018c0e3 Source-Link: googleapis/googleapis-gen@dad8476 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbXB1dGUvLk93bEJvdC55YW1sIiwiaCI6ImRhZDg0NzZjOTRlYjFlY2IyZmQ3MmYyOTY4MjVlOTYyMWVhOGI0NWQifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Update Compute Engine API to revision 20240421 (#899) Source-Link: googleapis/googleapis@55499b5 Source-Link: googleapis/googleapis-gen@cf5049b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbXB1dGUvLk93bEJvdC55YW1sIiwiaCI6ImNmNTA0OWI3MDc5MjgyMDA2NWRiMzhlNzEyN2YzMmVhYjc3MDU5NDQifQ== * 🦉 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 76f05f2 commit f3e0606

File tree

52 files changed

+48106
-5342
lines changed

Some content is hidden

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

52 files changed

+48106
-5342
lines changed

packages/google-cloud-compute/README.md

+21
Large diffs are not rendered by default.

packages/google-cloud-compute/protos/google/cloud/compute/v1/compute.proto

+1,504-31
Large diffs are not rendered by default.

packages/google-cloud-compute/protos/protos.d.ts

+6,373-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-compute/protos/protos.js

+22,013-4,164
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-compute/protos/protos.json

+4,583-1,127
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-compute/samples/README.md

+378
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(instanceGroupManager, project, resizeRequest, zone) {
24+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_async]
25+
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
29+
* TODO(developer): Uncomment these variables before running the sample.
30+
*/
31+
/**
32+
* The name of the managed instance group. The name should conform to RFC1035 or be a resource ID.
33+
*/
34+
// const instanceGroupManager = 'abc123'
35+
/**
36+
* Project ID for this request.
37+
*/
38+
// const project = 'my-project'
39+
/**
40+
* An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
41+
*/
42+
// const requestId = 'abc123'
43+
/**
44+
* The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID.
45+
*/
46+
// const resizeRequest = 'abc123'
47+
/**
48+
* The name of the zone where the managed instance group is located. The name should conform to RFC1035.
49+
*/
50+
// const zone = 'abc123'
51+
52+
// Imports the Compute library
53+
const {InstanceGroupManagerResizeRequestsClient} = require('@google-cloud/compute').v1;
54+
55+
// Instantiates a client
56+
const computeClient = new InstanceGroupManagerResizeRequestsClient();
57+
58+
async function callCancel() {
59+
// Construct request
60+
const request = {
61+
instanceGroupManager,
62+
project,
63+
resizeRequest,
64+
zone,
65+
};
66+
67+
// Run request
68+
const response = await computeClient.cancel(request);
69+
console.log(response);
70+
}
71+
72+
callCancel();
73+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_async]
74+
}
75+
76+
process.on('unhandledRejection', err => {
77+
console.error(err.message);
78+
process.exitCode = 1;
79+
});
80+
main(...process.argv.slice(2));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(instanceGroupManager, project, resizeRequest, zone) {
24+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Delete_async]
25+
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
29+
* TODO(developer): Uncomment these variables before running the sample.
30+
*/
31+
/**
32+
* The name of the managed instance group. The name should conform to RFC1035 or be a resource ID.
33+
*/
34+
// const instanceGroupManager = 'abc123'
35+
/**
36+
* Project ID for this request.
37+
*/
38+
// const project = 'my-project'
39+
/**
40+
* An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
41+
*/
42+
// const requestId = 'abc123'
43+
/**
44+
* The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID.
45+
*/
46+
// const resizeRequest = 'abc123'
47+
/**
48+
* The name of the zone where the managed instance group is located. The name should conform to RFC1035.
49+
*/
50+
// const zone = 'abc123'
51+
52+
// Imports the Compute library
53+
const {InstanceGroupManagerResizeRequestsClient} = require('@google-cloud/compute').v1;
54+
55+
// Instantiates a client
56+
const computeClient = new InstanceGroupManagerResizeRequestsClient();
57+
58+
async function callDelete() {
59+
// Construct request
60+
const request = {
61+
instanceGroupManager,
62+
project,
63+
resizeRequest,
64+
zone,
65+
};
66+
67+
// Run request
68+
const response = await computeClient.delete(request);
69+
console.log(response);
70+
}
71+
72+
callDelete();
73+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Delete_async]
74+
}
75+
76+
process.on('unhandledRejection', err => {
77+
console.error(err.message);
78+
process.exitCode = 1;
79+
});
80+
main(...process.argv.slice(2));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(instanceGroupManager, project, resizeRequest, zone) {
24+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Get_async]
25+
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
29+
* TODO(developer): Uncomment these variables before running the sample.
30+
*/
31+
/**
32+
* The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.
33+
*/
34+
// const instanceGroupManager = 'abc123'
35+
/**
36+
* Project ID for this request.
37+
*/
38+
// const project = 'my-project'
39+
/**
40+
* The name of the resize request. Name should conform to RFC1035 or be a resource ID.
41+
*/
42+
// const resizeRequest = 'abc123'
43+
/**
44+
* Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035.
45+
*/
46+
// const zone = 'abc123'
47+
48+
// Imports the Compute library
49+
const {InstanceGroupManagerResizeRequestsClient} = require('@google-cloud/compute').v1;
50+
51+
// Instantiates a client
52+
const computeClient = new InstanceGroupManagerResizeRequestsClient();
53+
54+
async function callGet() {
55+
// Construct request
56+
const request = {
57+
instanceGroupManager,
58+
project,
59+
resizeRequest,
60+
zone,
61+
};
62+
63+
// Run request
64+
const response = await computeClient.get(request);
65+
console.log(response);
66+
}
67+
68+
callGet();
69+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Get_async]
70+
}
71+
72+
process.on('unhandledRejection', err => {
73+
console.error(err.message);
74+
process.exitCode = 1;
75+
});
76+
main(...process.argv.slice(2));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
20+
21+
'use strict';
22+
23+
function main(instanceGroupManager, instanceGroupManagerResizeRequestResource, project, zone) {
24+
// [START compute_v1_generated_InstanceGroupManagerResizeRequests_Insert_async]
25+
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
29+
* TODO(developer): Uncomment these variables before running the sample.
30+
*/
31+
/**
32+
* The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID.
33+
*/
34+
// const instanceGroupManager = 'abc123'
35+
/**
36+
* The body resource for this request
37+
*/
38+
// const instanceGroupManagerResizeRequestResource = {}
39+
/**
40+
* Project ID for this request.
41+
*/
42+
// const project = 'my-project'
43+
/**
44+
* An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
45+
*/
46+
// const requestId = 'abc123'
47+
/**
48+
* The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035.
49+
*/
50+
// const zone = 'abc123'
51+
52+
// Imports the Compute library
53+
const {InstanceGroupManagerResizeRequestsClient} = require('@google-cloud/compute').v1;
54+
55+
// Instantiates a client
56+
const computeClient = new InstanceGroupManagerResizeRequestsClient();
57+
58+
async function callInsert() {
59+
// Construct request
60+
const request = {
61+
instanceGroupManager,
62+
instanceGroupManagerResizeRequestResource,
63+
project,
64+
zone,
65+
};
66+
67+
// Run request
68+
const response = await computeClient.insert(request);
69+
console.log(response);
70+
}
71+
72+
callInsert();
73+
// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Insert_async]
74+
}
75+
76+
process.on('unhandledRejection', err => {
77+
console.error(err.message);
78+
process.exitCode = 1;
79+
});
80+
main(...process.argv.slice(2));

0 commit comments

Comments
 (0)