@@ -83,8 +83,8 @@ class Function(proto.Message):
83
83
unique globally and match pattern
84
84
``projects/*/locations/*/functions/*``
85
85
environment (google.cloud.functions_v2.types.Environment):
86
- Describe whether the function is gen1 or
87
- gen2 .
86
+ Describe whether the function is 1st Gen or
87
+ 2nd Gen .
88
88
description (str):
89
89
User-provided description of a function.
90
90
build_config (google.cloud.functions_v2.types.BuildConfig):
@@ -108,6 +108,15 @@ class Function(proto.Message):
108
108
state_messages (MutableSequence[google.cloud.functions_v2.types.StateMessage]):
109
109
Output only. State Messages for this Cloud
110
110
Function.
111
+ kms_key_name (str):
112
+ Resource name of a KMS crypto key (managed by the user) used
113
+ to encrypt/decrypt function resources.
114
+
115
+ It must match the pattern
116
+ ``projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}``.
117
+ url (str):
118
+ Output only. The deployed url for the
119
+ function.
111
120
"""
112
121
113
122
class State (proto .Enum ):
@@ -187,6 +196,14 @@ class State(proto.Enum):
187
196
number = 9 ,
188
197
message = "StateMessage" ,
189
198
)
199
+ kms_key_name : str = proto .Field (
200
+ proto .STRING ,
201
+ number = 25 ,
202
+ )
203
+ url : str = proto .Field (
204
+ proto .STRING ,
205
+ number = 14 ,
206
+ )
190
207
191
208
192
209
class StateMessage (proto .Message ):
@@ -455,13 +472,23 @@ class BuildConfig(proto.Message):
455
472
environment_variables (MutableMapping[str, str]):
456
473
User-provided build-time environment
457
474
variables for the function
475
+ docker_registry (google.cloud.functions_v2.types.BuildConfig.DockerRegistry):
476
+ Optional. Docker Registry to use for this deployment. This
477
+ configuration is only applicable to 1st Gen functions, 2nd
478
+ Gen functions can only use Artifact Registry.
479
+
480
+ If ``docker_repository`` field is specified, this field will
481
+ be automatically set as ``ARTIFACT_REGISTRY``. If
482
+ unspecified, it currently defaults to
483
+ ``CONTAINER_REGISTRY``. This field may be overridden by the
484
+ backend for eligible deployments.
458
485
docker_repository (str):
459
- Optional. User managed repository created in Artifact
460
- Registry optionally with a customer managed encryption key.
461
- This is the repository to which the function docker image
462
- will be pushed after it is built by Cloud Build. If
463
- unspecified, GCF will create and use a repository named
464
- 'gcf-artifacts' for every deployed region.
486
+ User managed repository created in Artifact Registry
487
+ optionally with a customer managed encryption key. This is
488
+ the repository to which the function docker image will be
489
+ pushed after it is built by Cloud Build. If unspecified, GCF
490
+ will create and use a repository named 'gcf-artifacts' for
491
+ every deployed region.
465
492
466
493
It must match the pattern
467
494
``projects/{project}/locations/{location}/repositories/{repository}``.
@@ -471,6 +498,27 @@ class BuildConfig(proto.Message):
471
498
'DOCKER'.
472
499
"""
473
500
501
+ class DockerRegistry (proto .Enum ):
502
+ r"""Docker Registry to use for storing function Docker images.
503
+
504
+ Values:
505
+ DOCKER_REGISTRY_UNSPECIFIED (0):
506
+ Unspecified.
507
+ CONTAINER_REGISTRY (1):
508
+ Docker images will be stored in multi-regional Container
509
+ Registry repositories named ``gcf``.
510
+ ARTIFACT_REGISTRY (2):
511
+ Docker images will be stored in regional Artifact Registry
512
+ repositories. By default, GCF will create and use
513
+ repositories named ``gcf-artifacts`` in every region in
514
+ which a function is deployed. But the repository to use can
515
+ also be specified by the user using the
516
+ ``docker_repository`` field.
517
+ """
518
+ DOCKER_REGISTRY_UNSPECIFIED = 0
519
+ CONTAINER_REGISTRY = 1
520
+ ARTIFACT_REGISTRY = 2
521
+
474
522
build : str = proto .Field (
475
523
proto .STRING ,
476
524
number = 1 ,
@@ -502,6 +550,11 @@ class BuildConfig(proto.Message):
502
550
proto .STRING ,
503
551
number = 6 ,
504
552
)
553
+ docker_registry : DockerRegistry = proto .Field (
554
+ proto .ENUM ,
555
+ number = 10 ,
556
+ enum = DockerRegistry ,
557
+ )
505
558
docker_repository : str = proto .Field (
506
559
proto .STRING ,
507
560
number = 7 ,
@@ -511,6 +564,7 @@ class BuildConfig(proto.Message):
511
564
class ServiceConfig (proto .Message ):
512
565
r"""Describes the Service being deployed.
513
566
Currently Supported : Cloud Run (fully managed).
567
+ Next tag: 23
514
568
515
569
Attributes:
516
570
service (str):
@@ -530,6 +584,13 @@ class ServiceConfig(proto.Message):
530
584
See
531
585
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
532
586
a full description.
587
+ available_cpu (str):
588
+ The number of CPUs used in a single container
589
+ instance. Default value is calculated from
590
+ available memory. Supports the same values as
591
+ Cloud Run, see
592
+ https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements
593
+ Example: "1" indicates 1 vCPU
533
594
environment_variables (MutableMapping[str, str]):
534
595
Environment variables that shall be available
535
596
during function execution.
@@ -590,6 +651,16 @@ class ServiceConfig(proto.Message):
590
651
Secret volumes configuration.
591
652
revision (str):
592
653
Output only. The name of service revision.
654
+ max_instance_request_concurrency (int):
655
+ Sets the maximum number of concurrent
656
+ requests that each instance can receive.
657
+ Defaults to 1.
658
+ security_level (google.cloud.functions_v2.types.ServiceConfig.SecurityLevel):
659
+ Security level configure whether the function
660
+ only accepts https. This configuration is only
661
+ applicable to 1st Gen functions with Http
662
+ trigger. By default https is optional for 1st
663
+ Gen functions; 2nd Gen functions are https ONLY.
593
664
"""
594
665
595
666
class VpcConnectorEgressSettings (proto .Enum ):
@@ -637,6 +708,33 @@ class IngressSettings(proto.Enum):
637
708
ALLOW_INTERNAL_ONLY = 2
638
709
ALLOW_INTERNAL_AND_GCLB = 3
639
710
711
+ class SecurityLevel (proto .Enum ):
712
+ r"""Available security level settings.
713
+
714
+ This enforces security protocol on function URL.
715
+
716
+ Security level is only ocnfigurable for 1st Gen functions, If
717
+ unspecified, SECURE_OPTIONAL will be used. 2nd Gen functions are
718
+ SECURE_ALWAYS ONLY.
719
+
720
+ Values:
721
+ SECURITY_LEVEL_UNSPECIFIED (0):
722
+ Unspecified.
723
+ SECURE_ALWAYS (1):
724
+ Requests for a URL that match this handler
725
+ that do not use HTTPS are automatically
726
+ redirected to the HTTPS URL with the same path.
727
+ Query parameters are reserved for the redirect.
728
+ SECURE_OPTIONAL (2):
729
+ Both HTTP and HTTPS requests with URLs that
730
+ match the handler succeed without redirects. The
731
+ application can examine the request to determine
732
+ which protocol was used and respond accordingly.
733
+ """
734
+ SECURITY_LEVEL_UNSPECIFIED = 0
735
+ SECURE_ALWAYS = 1
736
+ SECURE_OPTIONAL = 2
737
+
640
738
service : str = proto .Field (
641
739
proto .STRING ,
642
740
number = 1 ,
@@ -649,6 +747,10 @@ class IngressSettings(proto.Enum):
649
747
proto .STRING ,
650
748
number = 13 ,
651
749
)
750
+ available_cpu : str = proto .Field (
751
+ proto .STRING ,
752
+ number = 22 ,
753
+ )
652
754
environment_variables : MutableMapping [str , str ] = proto .MapField (
653
755
proto .STRING ,
654
756
proto .STRING ,
@@ -702,6 +804,15 @@ class IngressSettings(proto.Enum):
702
804
proto .STRING ,
703
805
number = 18 ,
704
806
)
807
+ max_instance_request_concurrency : int = proto .Field (
808
+ proto .INT32 ,
809
+ number = 20 ,
810
+ )
811
+ security_level : SecurityLevel = proto .Field (
812
+ proto .ENUM ,
813
+ number = 21 ,
814
+ enum = SecurityLevel ,
815
+ )
705
816
706
817
707
818
class SecretEnvVar (proto .Message ):
@@ -981,8 +1092,11 @@ class ListFunctionsRequest(proto.Message):
981
1092
reachable locations along with the names of any unreachable
982
1093
locations.
983
1094
page_size (int):
984
- Maximum number of functions to return per
985
- call.
1095
+ Maximum number of functions to return per call. The largest
1096
+ allowed page_size is 1,000, if the page_size is omitted or
1097
+ specified as greater than 1,000 then it will be replaced as
1098
+ 1,000. The size of the list response can be less than
1099
+ specified when used with filters.
986
1100
page_token (str):
987
1101
The value returned by the last ``ListFunctionsResponse``;
988
1102
indicates that this is a continuation of a prior
@@ -1136,12 +1250,34 @@ class GenerateUploadUrlRequest(proto.Message):
1136
1250
Required. The project and location in which the Google Cloud
1137
1251
Storage signed URL should be generated, specified in the
1138
1252
format ``projects/*/locations/*``.
1253
+ kms_key_name (str):
1254
+ Resource name of a KMS crypto key (managed by the user) used
1255
+ to encrypt/decrypt function source code objects in
1256
+ intermediate Cloud Storage buckets. When you generate an
1257
+ upload url and upload your source code, it gets copied to an
1258
+ intermediate Cloud Storage bucket. The source code is then
1259
+ copied to a versioned directory in the sources bucket in the
1260
+ consumer project during the function deployment.
1261
+
1262
+ It must match the pattern
1263
+ ``projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}``.
1264
+
1265
+ The Google Cloud Functions service account
1266
+ (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com)
1267
+ must be granted the role 'Cloud KMS CryptoKey
1268
+ Encrypter/Decrypter
1269
+ (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the
1270
+ Key/KeyRing/Project/Organization (least access preferred).
1139
1271
"""
1140
1272
1141
1273
parent : str = proto .Field (
1142
1274
proto .STRING ,
1143
1275
number = 1 ,
1144
1276
)
1277
+ kms_key_name : str = proto .Field (
1278
+ proto .STRING ,
1279
+ number = 2 ,
1280
+ )
1145
1281
1146
1282
1147
1283
class GenerateUploadUrlResponse (proto .Message ):
0 commit comments