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
500499message 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
10851090message Stage {
10861091 // Possible names for a Stage
0 commit comments