Skip to content

Commit

Permalink
feat: [functions] ListFunctions now include metadata which indicates …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Co-authored-by: sofisl <[email protected]>
Co-authored-by: Daniel Bankhead <[email protected]>
  • Loading branch information
5 people authored Jun 6, 2023
1 parent b73a87f commit b6d8778
Show file tree
Hide file tree
Showing 33 changed files with 4,353 additions and 1,171 deletions.
77 changes: 38 additions & 39 deletions packages/google-cloud-functions/README.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -241,9 +241,6 @@ message Function {
// globally and match pattern `projects/*/locations/*/functions/*`
string name = 1;

// Describe whether the function is 1st Gen or 2nd Gen.
Environment environment = 10;

// User-provided description of a function.
string description = 2;

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

// Resource name of a KMS crypto key (managed by the user) used to
// Describe whether the function is 1st Gen or 2nd Gen.
Environment environment = 10;

// Output only. The deployed url for the function.
string url = 14 [(google.api.field_behavior) = OUTPUT_ONLY];

// [Preview] Resource name of a KMS crypto key (managed by the user) used to
// encrypt/decrypt function resources.
//
// It must match the pattern
// `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
string kms_key_name = 25 [(google.api.resource_reference) = {
type: "cloudkms.googleapis.com/CryptoKey"
}];

// Output only. The deployed url for the function.
string url = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
}

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

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

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

// Describes the Service being deployed.
// Currently Supported : Cloud Run (fully managed).
// Next tag: 23
message ServiceConfig {
// Available egress settings.
//
Expand Down Expand Up @@ -537,7 +536,7 @@ message ServiceConfig {
//
// This enforces security protocol on function URL.
//
// Security level is only ocnfigurable for 1st Gen functions, If unspecified,
// Security level is only configurable for 1st Gen functions, If unspecified,
// SECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY.
enum SecurityLevel {
// Unspecified.
Expand Down Expand Up @@ -575,7 +574,7 @@ message ServiceConfig {
// a full description.
string available_memory = 13;

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

// Sets the maximum number of concurrent requests that each instance can
// receive. Defaults to 1.
// [Preview] Sets the maximum number of concurrent requests that each instance
// can receive. Defaults to 1.
int32 max_instance_request_concurrency = 20;

// Security level configure whether the function only accepts https.
Expand Down Expand Up @@ -925,7 +924,7 @@ message GenerateUploadUrlRequest {
}
];

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

// Extra GCF specific location information.
message LocationMetadata {
// The Cloud Function environments this location supports.
repeated Environment environments = 1;
}

// Each Stage of the deployment process
message Stage {
// Possible names for a Stage
Expand Down
Loading

0 comments on commit b6d8778

Please sign in to comment.