Skip to content

Commit b6d8778

Browse files
gcf-owl-bot[bot]ddelgrosso1sofisld-goog
authored
feat: [functions] ListFunctions now include metadata which indicates whether a function is a GEN_1 or GEN_2 function (#4262)
* feat: added helper methods for long running operations, IAM, and locations docs: clarified that vpcConnector shortname is only returned if the connector is in the same project as the function docs: applied general style guide updates to descriptions PiperOrigin-RevId: 530688922 Source-Link: googleapis/googleapis@a540c8a Source-Link: googleapis/googleapis-gen@dca7c4d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiZGNhN2M0ZGQwM2MwZGI2NGM1NjI2Yzg0YzczMDljZTRlZWU0Yjk2NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: ListFunctions now include metadata which indicates whether a function is a `GEN_1` or `GEN_2` function feat: KMS crypto keys can now be specified when uploading function source code, enabling source code to be encrypted at rest with a user-managed encryption key feat: You can now specify concurrency and cpu of a gen 2 function through the Function API, without needing to modify the underlying Cloud Run service PiperOrigin-RevId: 534929457 Source-Link: googleapis/googleapis@1c8b678 Source-Link: googleapis/googleapis-gen@c1050ce Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiYzEwNTBjZTk3NTM1MTEzNTU3YTBjMTMyYTYyOTEwNzk0YmM2NjIyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: ListFunctions now include metadata which indicates whether a function is a `GEN_1` or `GEN_2` function PiperOrigin-RevId: 535193873 Source-Link: googleapis/googleapis@d6b7eb5 Source-Link: googleapis/googleapis-gen@822ccd0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiODIyY2NkMDljYzFlOWY4YTRhYjAxMjVjYzkzZWZmZTI2YWI4ODJjMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: ListFunctions now include metadata which indicates whether a function is a `GEN_1` or `GEN_2` function feat: KMS crypto keys can now be specified when uploading function source code, enabling source code to be encrypted at rest with a user-managed encryption key feat: You can now specify concurrency and cpu of a gen 2 function through the Function API, without needing to modify the underlying Cloud Run service PiperOrigin-RevId: 536826096 Source-Link: googleapis/googleapis@b9f248e Source-Link: googleapis/googleapis-gen@6c880ea Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiNmM4ODBlYTVhMzliZWFiMDVjOWZiNWNmMjAwYzJmNGQwMWY2ZDQzNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * build: override IAM mixin for functions PiperOrigin-RevId: 537982107 Source-Link: googleapis/googleapis@a924ecc Source-Link: googleapis/googleapis-gen@0981ddc Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiMDk4MWRkYzUyY2IyOTY2OGVjNjVjYzMxYTgxYzU0MWFhZDQ4ZWU2NSJ9 * 🦉 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> Co-authored-by: Denis DelGrosso <85250797+ddelgrosso1@users.noreply.github.com> Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Daniel Bankhead <danielbankhead@google.com>
1 parent b73a87f commit b6d8778

33 files changed

+4353
-1171
lines changed

packages/google-cloud-functions/README.md

Lines changed: 38 additions & 39 deletions
Large diffs are not rendered by default.

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

Lines changed: 108 additions & 97 deletions
Large diffs are not rendered by default.

packages/google-cloud-functions/protos/google/cloud/functions/v1/operations.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-functions/protos/google/cloud/functions/v2/functions.proto

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -241,9 +241,6 @@ message Function {
241241
// globally and match pattern `projects/*/locations/*/functions/*`
242242
string name = 1;
243243

244-
// Describe whether the function is 1st Gen or 2nd Gen.
245-
Environment environment = 10;
246-
247244
// User-provided description of a function.
248245
string description = 2;
249246

@@ -273,17 +270,20 @@ message Function {
273270
repeated StateMessage state_messages = 9
274271
[(google.api.field_behavior) = OUTPUT_ONLY];
275272

276-
// Resource name of a KMS crypto key (managed by the user) used to
273+
// Describe whether the function is 1st Gen or 2nd Gen.
274+
Environment environment = 10;
275+
276+
// Output only. The deployed url for the function.
277+
string url = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
278+
279+
// [Preview] Resource name of a KMS crypto key (managed by the user) used to
277280
// encrypt/decrypt function resources.
278281
//
279282
// It must match the pattern
280283
// `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
281284
string kms_key_name = 25 [(google.api.resource_reference) = {
282285
type: "cloudkms.googleapis.com/CryptoKey"
283286
}];
284-
285-
// Output only. The deployed url for the function.
286-
string url = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
287287
}
288288

289289
// Informational messages about the state of the Cloud Function or Operation.
@@ -467,18 +467,18 @@ message BuildConfig {
467467
// User-provided build-time environment variables for the function
468468
map<string, string> environment_variables = 6;
469469

470-
// Optional. Docker Registry to use for this deployment. This configuration is
471-
// only applicable to 1st Gen functions, 2nd Gen functions can only use
472-
// Artifact Registry.
470+
// Docker Registry to use for this deployment. This configuration is only
471+
// applicable to 1st Gen functions, 2nd Gen functions can only use Artifact
472+
// Registry.
473473
//
474474
// If `docker_repository` field is specified, this field will be automatically
475475
// set as `ARTIFACT_REGISTRY`.
476476
// If unspecified, it currently defaults to `CONTAINER_REGISTRY`.
477477
// This field may be overridden by the backend for eligible deployments.
478-
DockerRegistry docker_registry = 10 [(google.api.field_behavior) = OPTIONAL];
478+
DockerRegistry docker_registry = 10;
479479

480-
// User managed repository created in Artifact Registry optionally with a
481-
// customer managed encryption key. This is the repository to which the
480+
// User managed repository created in Artifact Registry optionally
481+
// with a customer managed encryption key. This is the repository to which the
482482
// function docker image will be pushed after it is built by Cloud Build.
483483
// If unspecified, GCF will create and use a repository named 'gcf-artifacts'
484484
// for every deployed region.
@@ -496,7 +496,6 @@ message BuildConfig {
496496

497497
// Describes the Service being deployed.
498498
// Currently Supported : Cloud Run (fully managed).
499-
// Next tag: 23
500499
message ServiceConfig {
501500
// Available egress settings.
502501
//
@@ -537,7 +536,7 @@ message ServiceConfig {
537536
//
538537
// This enforces security protocol on function URL.
539538
//
540-
// Security level is only ocnfigurable for 1st Gen functions, If unspecified,
539+
// Security level is only configurable for 1st Gen functions, If unspecified,
541540
// SECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY.
542541
enum SecurityLevel {
543542
// Unspecified.
@@ -575,7 +574,7 @@ message ServiceConfig {
575574
// a full description.
576575
string available_memory = 13;
577576

578-
// The number of CPUs used in a single container instance.
577+
// [Preview] The number of CPUs used in a single container instance.
579578
// Default value is calculated from available memory.
580579
// Supports the same values as Cloud Run, see
581580
// https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements
@@ -647,8 +646,8 @@ message ServiceConfig {
647646
// Output only. The name of service revision.
648647
string revision = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
649648

650-
// Sets the maximum number of concurrent requests that each instance can
651-
// receive. Defaults to 1.
649+
// [Preview] Sets the maximum number of concurrent requests that each instance
650+
// can receive. Defaults to 1.
652651
int32 max_instance_request_concurrency = 20;
653652

654653
// Security level configure whether the function only accepts https.
@@ -925,7 +924,7 @@ message GenerateUploadUrlRequest {
925924
}
926925
];
927926

928-
// Resource name of a KMS crypto key (managed by the user) used to
927+
// [Preview] Resource name of a KMS crypto key (managed by the user) used to
929928
// encrypt/decrypt function source code objects in intermediate Cloud Storage
930929
// buckets. When you generate an upload url and upload your source code, it
931930
// gets copied to an intermediate Cloud Storage bucket. The source code is
@@ -1081,6 +1080,12 @@ message OperationMetadata {
10811080
repeated Stage stages = 9;
10821081
}
10831082

1083+
// Extra GCF specific location information.
1084+
message LocationMetadata {
1085+
// The Cloud Function environments this location supports.
1086+
repeated Environment environments = 1;
1087+
}
1088+
10841089
// Each Stage of the deployment process
10851090
message Stage {
10861091
// Possible names for a Stage

0 commit comments

Comments
 (0)