google-cloud-functions-v2 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/functions/v2/function_service/client.rb +37 -18
- data/lib/google/cloud/functions/v2/function_service/operations.rb +2 -2
- data/lib/google/cloud/functions/v2/function_service/paths.rb +21 -0
- data/lib/google/cloud/functions/v2/function_service/rest/client.rb +37 -18
- data/lib/google/cloud/functions/v2/function_service/rest/operations.rb +2 -2
- data/lib/google/cloud/functions/v2/functions_pb.rb +20 -0
- data/lib/google/cloud/functions/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +9 -3
- data/proto_docs/google/cloud/functions/v2/functions.rb +124 -26
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a81c1d07f91c14470579fea2f02c13b9cdc460546439a3fe7e8bf431bc5795
|
4
|
+
data.tar.gz: 6e832526b2b135a129c99ce511f39317faf39d3cfffb1f3fc82c239fcc844027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e6df6babde60d6e014dc9b40982cddd2f076be628e4474f3093727fd151940b3fe6a0facc29e450a3c52532bd82fafc15598e3d1d1f643647f8d34a3cc02c10
|
7
|
+
data.tar.gz: f5275ce31e58401c21b165779200dfe86f0e37d2357f076550a1ba18c75cf73a973caec3cebef92e91b41e8c05a2fbfbc66773c040033454f8f7c4df96bb59eb
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ for general usage information.
|
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
49
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -294,14 +294,17 @@ module Google
|
|
294
294
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
295
295
|
#
|
296
296
|
# @param parent [::String]
|
297
|
-
# Required. The project and location from which the function should be
|
298
|
-
# specified in the format `projects/*/locations/*`
|
299
|
-
#
|
300
|
-
#
|
301
|
-
#
|
302
|
-
#
|
297
|
+
# Required. The project and location from which the function should be
|
298
|
+
# listed, specified in the format `projects/*/locations/*` If you want to
|
299
|
+
# list functions in all locations, use "-" in place of a location. When
|
300
|
+
# listing functions in all locations, if one or more location(s) are
|
301
|
+
# unreachable, the response will contain functions from all reachable
|
302
|
+
# locations along with the names of any unreachable locations.
|
303
303
|
# @param page_size [::Integer]
|
304
|
-
# Maximum number of functions to return per call.
|
304
|
+
# Maximum number of functions to return per call. The largest allowed
|
305
|
+
# page_size is 1,000, if the page_size is omitted or specified as greater
|
306
|
+
# than 1,000 then it will be replaced as 1,000. The size of the list
|
307
|
+
# response can be less than specified when used with filters.
|
305
308
|
# @param page_token [::String]
|
306
309
|
# The value returned by the last
|
307
310
|
# `ListFunctionsResponse`; indicates that
|
@@ -405,8 +408,8 @@ module Google
|
|
405
408
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
406
409
|
#
|
407
410
|
# @param parent [::String]
|
408
|
-
# Required. The project and location in which the function should be created,
|
409
|
-
# in the format `projects/*/locations/*`
|
411
|
+
# Required. The project and location in which the function should be created,
|
412
|
+
# specified in the format `projects/*/locations/*`
|
410
413
|
# @param function [::Google::Cloud::Functions::V2::Function, ::Hash]
|
411
414
|
# Required. Function to be created.
|
412
415
|
# @param function_id [::String]
|
@@ -715,14 +718,30 @@ module Google
|
|
715
718
|
# @param options [::Gapic::CallOptions, ::Hash]
|
716
719
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
717
720
|
#
|
718
|
-
# @overload generate_upload_url(parent: nil)
|
721
|
+
# @overload generate_upload_url(parent: nil, kms_key_name: nil)
|
719
722
|
# Pass arguments to `generate_upload_url` via keyword arguments. Note that at
|
720
723
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
721
724
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
722
725
|
#
|
723
726
|
# @param parent [::String]
|
724
|
-
# Required. The project and location in which the Google Cloud Storage signed
|
725
|
-
# should be generated, specified in the format `projects/*/locations/*`.
|
727
|
+
# Required. The project and location in which the Google Cloud Storage signed
|
728
|
+
# URL should be generated, specified in the format `projects/*/locations/*`.
|
729
|
+
# @param kms_key_name [::String]
|
730
|
+
# Resource name of a KMS crypto key (managed by the user) used to
|
731
|
+
# encrypt/decrypt function source code objects in intermediate Cloud Storage
|
732
|
+
# buckets. When you generate an upload url and upload your source code, it
|
733
|
+
# gets copied to an intermediate Cloud Storage bucket. The source code is
|
734
|
+
# then copied to a versioned directory in the sources bucket in the consumer
|
735
|
+
# project during the function deployment.
|
736
|
+
#
|
737
|
+
# It must match the pattern
|
738
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
739
|
+
#
|
740
|
+
# The Google Cloud Functions service account
|
741
|
+
# (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be
|
742
|
+
# granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
|
743
|
+
# (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the
|
744
|
+
# Key/KeyRing/Project/Organization (least access preferred).
|
726
745
|
#
|
727
746
|
# @yield [response, operation] Access the result along with the RPC operation
|
728
747
|
# @yieldparam response [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse]
|
@@ -811,8 +830,8 @@ module Google
|
|
811
830
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
812
831
|
#
|
813
832
|
# @param name [::String]
|
814
|
-
# Required. The name of function for which source code Google Cloud Storage
|
815
|
-
# URL should be generated.
|
833
|
+
# Required. The name of function for which source code Google Cloud Storage
|
834
|
+
# signed URL should be generated.
|
816
835
|
#
|
817
836
|
# @yield [response, operation] Access the result along with the RPC operation
|
818
837
|
# @yieldparam response [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse]
|
@@ -897,8 +916,8 @@ module Google
|
|
897
916
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
898
917
|
#
|
899
918
|
# @param parent [::String]
|
900
|
-
# Required. The project and location from which the runtimes should be
|
901
|
-
# specified in the format `projects/*/locations/*`
|
919
|
+
# Required. The project and location from which the runtimes should be
|
920
|
+
# listed, specified in the format `projects/*/locations/*`
|
902
921
|
# @param filter [::String]
|
903
922
|
# The filter for Runtimes that match the filter expression,
|
904
923
|
# following the syntax outlined in https://google.aip.dev/160.
|
@@ -1005,9 +1024,9 @@ module Google
|
|
1005
1024
|
# * (`String`) The path to a service account key file in JSON format
|
1006
1025
|
# * (`Hash`) A service account key as a Hash
|
1007
1026
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1008
|
-
# (see the [googleauth docs](https://
|
1027
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1009
1028
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1010
|
-
# (see the [signet docs](https://
|
1029
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1011
1030
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1012
1031
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1013
1032
|
# * (`nil`) indicating no credentials
|
@@ -620,9 +620,9 @@ module Google
|
|
620
620
|
# * (`String`) The path to a service account key file in JSON format
|
621
621
|
# * (`Hash`) A service account key as a Hash
|
622
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
628
|
# * (`nil`) indicating no credentials
|
@@ -81,6 +81,27 @@ module Google
|
|
81
81
|
"projects/#{project}/locations/#{location}/connectors/#{connector}"
|
82
82
|
end
|
83
83
|
|
84
|
+
##
|
85
|
+
# Create a fully-qualified CryptoKey resource string.
|
86
|
+
#
|
87
|
+
# The resource will be in the following format:
|
88
|
+
#
|
89
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
|
90
|
+
#
|
91
|
+
# @param project [String]
|
92
|
+
# @param location [String]
|
93
|
+
# @param key_ring [String]
|
94
|
+
# @param crypto_key [String]
|
95
|
+
#
|
96
|
+
# @return [::String]
|
97
|
+
def crypto_key_path project:, location:, key_ring:, crypto_key:
|
98
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
99
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
100
|
+
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
|
101
|
+
|
102
|
+
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
|
103
|
+
end
|
104
|
+
|
84
105
|
##
|
85
106
|
# Create a fully-qualified Function resource string.
|
86
107
|
#
|
@@ -264,14 +264,17 @@ module Google
|
|
264
264
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
265
265
|
#
|
266
266
|
# @param parent [::String]
|
267
|
-
# Required. The project and location from which the function should be
|
268
|
-
# specified in the format `projects/*/locations/*`
|
269
|
-
#
|
270
|
-
#
|
271
|
-
#
|
272
|
-
#
|
267
|
+
# Required. The project and location from which the function should be
|
268
|
+
# listed, specified in the format `projects/*/locations/*` If you want to
|
269
|
+
# list functions in all locations, use "-" in place of a location. When
|
270
|
+
# listing functions in all locations, if one or more location(s) are
|
271
|
+
# unreachable, the response will contain functions from all reachable
|
272
|
+
# locations along with the names of any unreachable locations.
|
273
273
|
# @param page_size [::Integer]
|
274
|
-
# Maximum number of functions to return per call.
|
274
|
+
# Maximum number of functions to return per call. The largest allowed
|
275
|
+
# page_size is 1,000, if the page_size is omitted or specified as greater
|
276
|
+
# than 1,000 then it will be replaced as 1,000. The size of the list
|
277
|
+
# response can be less than specified when used with filters.
|
275
278
|
# @param page_token [::String]
|
276
279
|
# The value returned by the last
|
277
280
|
# `ListFunctionsResponse`; indicates that
|
@@ -347,8 +350,8 @@ module Google
|
|
347
350
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
348
351
|
#
|
349
352
|
# @param parent [::String]
|
350
|
-
# Required. The project and location in which the function should be created,
|
351
|
-
# in the format `projects/*/locations/*`
|
353
|
+
# Required. The project and location in which the function should be created,
|
354
|
+
# specified in the format `projects/*/locations/*`
|
352
355
|
# @param function [::Google::Cloud::Functions::V2::Function, ::Hash]
|
353
356
|
# Required. Function to be created.
|
354
357
|
# @param function_id [::String]
|
@@ -567,14 +570,30 @@ module Google
|
|
567
570
|
# @param options [::Gapic::CallOptions, ::Hash]
|
568
571
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
569
572
|
#
|
570
|
-
# @overload generate_upload_url(parent: nil)
|
573
|
+
# @overload generate_upload_url(parent: nil, kms_key_name: nil)
|
571
574
|
# Pass arguments to `generate_upload_url` via keyword arguments. Note that at
|
572
575
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
573
576
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
574
577
|
#
|
575
578
|
# @param parent [::String]
|
576
|
-
# Required. The project and location in which the Google Cloud Storage signed
|
577
|
-
# should be generated, specified in the format `projects/*/locations/*`.
|
579
|
+
# Required. The project and location in which the Google Cloud Storage signed
|
580
|
+
# URL should be generated, specified in the format `projects/*/locations/*`.
|
581
|
+
# @param kms_key_name [::String]
|
582
|
+
# Resource name of a KMS crypto key (managed by the user) used to
|
583
|
+
# encrypt/decrypt function source code objects in intermediate Cloud Storage
|
584
|
+
# buckets. When you generate an upload url and upload your source code, it
|
585
|
+
# gets copied to an intermediate Cloud Storage bucket. The source code is
|
586
|
+
# then copied to a versioned directory in the sources bucket in the consumer
|
587
|
+
# project during the function deployment.
|
588
|
+
#
|
589
|
+
# It must match the pattern
|
590
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
591
|
+
#
|
592
|
+
# The Google Cloud Functions service account
|
593
|
+
# (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be
|
594
|
+
# granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
|
595
|
+
# (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the
|
596
|
+
# Key/KeyRing/Project/Organization (least access preferred).
|
578
597
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
579
598
|
# @yieldparam result [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse]
|
580
599
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -640,8 +659,8 @@ module Google
|
|
640
659
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
641
660
|
#
|
642
661
|
# @param name [::String]
|
643
|
-
# Required. The name of function for which source code Google Cloud Storage
|
644
|
-
# URL should be generated.
|
662
|
+
# Required. The name of function for which source code Google Cloud Storage
|
663
|
+
# signed URL should be generated.
|
645
664
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
646
665
|
# @yieldparam result [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse]
|
647
666
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -703,8 +722,8 @@ module Google
|
|
703
722
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
704
723
|
#
|
705
724
|
# @param parent [::String]
|
706
|
-
# Required. The project and location from which the runtimes should be
|
707
|
-
# specified in the format `projects/*/locations/*`
|
725
|
+
# Required. The project and location from which the runtimes should be
|
726
|
+
# listed, specified in the format `projects/*/locations/*`
|
708
727
|
# @param filter [::String]
|
709
728
|
# The filter for Runtimes that match the filter expression,
|
710
729
|
# following the syntax outlined in https://google.aip.dev/160.
|
@@ -788,9 +807,9 @@ module Google
|
|
788
807
|
# * (`String`) The path to a service account key file in JSON format
|
789
808
|
# * (`Hash`) A service account key as a Hash
|
790
809
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
791
|
-
# (see the [googleauth docs](https://
|
810
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
792
811
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
793
|
-
# (see the [signet docs](https://
|
812
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
794
813
|
# * (`nil`) indicating no credentials
|
795
814
|
# @return [::Object]
|
796
815
|
# @!attribute [rw] scope
|
@@ -411,9 +411,9 @@ module Google
|
|
411
411
|
# * (`String`) The path to a service account key file in JSON format
|
412
412
|
# * (`Hash`) A service account key as a Hash
|
413
413
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
414
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
415
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
416
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
417
|
# * (`nil`) indicating no credentials
|
418
418
|
# @return [::Object]
|
419
419
|
# @!attribute [rw] scope
|
@@ -9,6 +9,7 @@ require 'google/api/field_behavior_pb'
|
|
9
9
|
require 'google/api/resource_pb'
|
10
10
|
require 'google/longrunning/operations_pb'
|
11
11
|
require 'google/protobuf/any_pb'
|
12
|
+
require 'google/protobuf/empty_pb'
|
12
13
|
require 'google/protobuf/field_mask_pb'
|
13
14
|
require 'google/protobuf/timestamp_pb'
|
14
15
|
|
@@ -25,6 +26,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
25
26
|
optional :update_time, :message, 7, "google.protobuf.Timestamp"
|
26
27
|
map :labels, :string, :string, 8
|
27
28
|
repeated :state_messages, :message, 9, "google.cloud.functions.v2.StateMessage"
|
29
|
+
optional :kms_key_name, :string, 25
|
30
|
+
optional :url, :string, 14
|
28
31
|
end
|
29
32
|
add_enum "google.cloud.functions.v2.Function.State" do
|
30
33
|
value :STATE_UNSPECIFIED, 0
|
@@ -79,12 +82,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
79
82
|
optional :source_provenance, :message, 8, "google.cloud.functions.v2.SourceProvenance"
|
80
83
|
optional :worker_pool, :string, 5
|
81
84
|
map :environment_variables, :string, :string, 6
|
85
|
+
optional :docker_registry, :enum, 10, "google.cloud.functions.v2.BuildConfig.DockerRegistry"
|
82
86
|
optional :docker_repository, :string, 7
|
83
87
|
end
|
88
|
+
add_enum "google.cloud.functions.v2.BuildConfig.DockerRegistry" do
|
89
|
+
value :DOCKER_REGISTRY_UNSPECIFIED, 0
|
90
|
+
value :CONTAINER_REGISTRY, 1
|
91
|
+
value :ARTIFACT_REGISTRY, 2
|
92
|
+
end
|
84
93
|
add_message "google.cloud.functions.v2.ServiceConfig" do
|
85
94
|
optional :service, :string, 1
|
86
95
|
optional :timeout_seconds, :int32, 2
|
87
96
|
optional :available_memory, :string, 13
|
97
|
+
optional :available_cpu, :string, 22
|
88
98
|
map :environment_variables, :string, :string, 4
|
89
99
|
optional :max_instance_count, :int32, 5
|
90
100
|
optional :min_instance_count, :int32, 12
|
@@ -97,6 +107,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
97
107
|
repeated :secret_environment_variables, :message, 17, "google.cloud.functions.v2.SecretEnvVar"
|
98
108
|
repeated :secret_volumes, :message, 19, "google.cloud.functions.v2.SecretVolume"
|
99
109
|
optional :revision, :string, 18
|
110
|
+
optional :max_instance_request_concurrency, :int32, 20
|
111
|
+
optional :security_level, :enum, 21, "google.cloud.functions.v2.ServiceConfig.SecurityLevel"
|
100
112
|
end
|
101
113
|
add_enum "google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings" do
|
102
114
|
value :VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED, 0
|
@@ -109,6 +121,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
109
121
|
value :ALLOW_INTERNAL_ONLY, 2
|
110
122
|
value :ALLOW_INTERNAL_AND_GCLB, 3
|
111
123
|
end
|
124
|
+
add_enum "google.cloud.functions.v2.ServiceConfig.SecurityLevel" do
|
125
|
+
value :SECURITY_LEVEL_UNSPECIFIED, 0
|
126
|
+
value :SECURE_ALWAYS, 1
|
127
|
+
value :SECURE_OPTIONAL, 2
|
128
|
+
end
|
112
129
|
add_message "google.cloud.functions.v2.SecretEnvVar" do
|
113
130
|
optional :key, :string, 1
|
114
131
|
optional :project_id, :string, 2
|
@@ -174,6 +191,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
174
191
|
end
|
175
192
|
add_message "google.cloud.functions.v2.GenerateUploadUrlRequest" do
|
176
193
|
optional :parent, :string, 1
|
194
|
+
optional :kms_key_name, :string, 2
|
177
195
|
end
|
178
196
|
add_message "google.cloud.functions.v2.GenerateUploadUrlResponse" do
|
179
197
|
optional :upload_url, :string, 1
|
@@ -263,9 +281,11 @@ module Google
|
|
263
281
|
Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Source").msgclass
|
264
282
|
SourceProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SourceProvenance").msgclass
|
265
283
|
BuildConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.BuildConfig").msgclass
|
284
|
+
BuildConfig::DockerRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.BuildConfig.DockerRegistry").enummodule
|
266
285
|
ServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig").msgclass
|
267
286
|
ServiceConfig::VpcConnectorEgressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings").enummodule
|
268
287
|
ServiceConfig::IngressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.IngressSettings").enummodule
|
288
|
+
ServiceConfig::SecurityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.SecurityLevel").enummodule
|
269
289
|
SecretEnvVar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretEnvVar").msgclass
|
270
290
|
SecretVolume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretVolume").msgclass
|
271
291
|
SecretVolume::SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretVolume.SecretVersion").msgclass
|
@@ -35,7 +35,9 @@ module Google
|
|
35
35
|
# Details about how and where to publish client libraries.
|
36
36
|
# @!attribute [rw] version
|
37
37
|
# @return [::String]
|
38
|
-
# Version of the API to apply these settings to.
|
38
|
+
# Version of the API to apply these settings to. This is the full protobuf
|
39
|
+
# package for the API, ending in the version element.
|
40
|
+
# Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
|
39
41
|
# @!attribute [rw] launch_stage
|
40
42
|
# @return [::Google::Api::LaunchStage]
|
41
43
|
# Launch stage of this version of the API.
|
@@ -111,6 +113,10 @@ module Google
|
|
111
113
|
# Client library settings. If the same version string appears multiple
|
112
114
|
# times in this list, then the last one wins. Settings from earlier
|
113
115
|
# settings with the same version string are discarded.
|
116
|
+
# @!attribute [rw] proto_reference_documentation_uri
|
117
|
+
# @return [::String]
|
118
|
+
# Optional link to proto reference documentation. Example:
|
119
|
+
# https://cloud.google.com/pubsub/lite/docs/reference/rpc
|
114
120
|
class Publishing
|
115
121
|
include ::Google::Protobuf::MessageExts
|
116
122
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -240,8 +246,8 @@ module Google
|
|
240
246
|
# Example of a YAML configuration::
|
241
247
|
#
|
242
248
|
# publishing:
|
243
|
-
#
|
244
|
-
# - selector:
|
249
|
+
# method_settings:
|
250
|
+
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
245
251
|
# long_running:
|
246
252
|
# initial_poll_delay:
|
247
253
|
# seconds: 60 # 1 minute
|
@@ -29,7 +29,7 @@ module Google
|
|
29
29
|
# globally and match pattern `projects/*/locations/*/functions/*`
|
30
30
|
# @!attribute [rw] environment
|
31
31
|
# @return [::Google::Cloud::Functions::V2::Environment]
|
32
|
-
# Describe whether the function is
|
32
|
+
# Describe whether the function is 1st Gen or 2nd Gen.
|
33
33
|
# @!attribute [rw] description
|
34
34
|
# @return [::String]
|
35
35
|
# User-provided description of a function.
|
@@ -57,6 +57,16 @@ module Google
|
|
57
57
|
# @!attribute [r] state_messages
|
58
58
|
# @return [::Array<::Google::Cloud::Functions::V2::StateMessage>]
|
59
59
|
# Output only. State Messages for this Cloud Function.
|
60
|
+
# @!attribute [rw] kms_key_name
|
61
|
+
# @return [::String]
|
62
|
+
# Resource name of a KMS crypto key (managed by the user) used to
|
63
|
+
# encrypt/decrypt function resources.
|
64
|
+
#
|
65
|
+
# It must match the pattern
|
66
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
67
|
+
# @!attribute [r] url
|
68
|
+
# @return [::String]
|
69
|
+
# Output only. The deployed url for the function.
|
60
70
|
class Function
|
61
71
|
include ::Google::Protobuf::MessageExts
|
62
72
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -215,8 +225,8 @@ module Google
|
|
215
225
|
# given source.
|
216
226
|
# @!attribute [r] build
|
217
227
|
# @return [::String]
|
218
|
-
# Output only. The Cloud Build name of the latest successful deployment of
|
219
|
-
# function.
|
228
|
+
# Output only. The Cloud Build name of the latest successful deployment of
|
229
|
+
# the function.
|
220
230
|
# @!attribute [rw] runtime
|
221
231
|
# @return [::String]
|
222
232
|
# The runtime in which to run the function. Required when deploying a new
|
@@ -255,9 +265,19 @@ module Google
|
|
255
265
|
# @!attribute [rw] environment_variables
|
256
266
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
257
267
|
# User-provided build-time environment variables for the function
|
268
|
+
# @!attribute [rw] docker_registry
|
269
|
+
# @return [::Google::Cloud::Functions::V2::BuildConfig::DockerRegistry]
|
270
|
+
# Optional. Docker Registry to use for this deployment. This configuration is
|
271
|
+
# only applicable to 1st Gen functions, 2nd Gen functions can only use
|
272
|
+
# Artifact Registry.
|
273
|
+
#
|
274
|
+
# If `docker_repository` field is specified, this field will be automatically
|
275
|
+
# set as `ARTIFACT_REGISTRY`.
|
276
|
+
# If unspecified, it currently defaults to `CONTAINER_REGISTRY`.
|
277
|
+
# This field may be overridden by the backend for eligible deployments.
|
258
278
|
# @!attribute [rw] docker_repository
|
259
279
|
# @return [::String]
|
260
|
-
#
|
280
|
+
# User managed repository created in Artifact Registry optionally with a
|
261
281
|
# customer managed encryption key. This is the repository to which the
|
262
282
|
# function docker image will be pushed after it is built by Cloud Build.
|
263
283
|
# If unspecified, GCF will create and use a repository named 'gcf-artifacts'
|
@@ -281,10 +301,28 @@ module Google
|
|
281
301
|
include ::Google::Protobuf::MessageExts
|
282
302
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
283
303
|
end
|
304
|
+
|
305
|
+
# Docker Registry to use for storing function Docker images.
|
306
|
+
module DockerRegistry
|
307
|
+
# Unspecified.
|
308
|
+
DOCKER_REGISTRY_UNSPECIFIED = 0
|
309
|
+
|
310
|
+
# Docker images will be stored in multi-regional Container Registry
|
311
|
+
# repositories named `gcf`.
|
312
|
+
CONTAINER_REGISTRY = 1
|
313
|
+
|
314
|
+
# Docker images will be stored in regional Artifact Registry repositories.
|
315
|
+
# By default, GCF will create and use repositories named `gcf-artifacts`
|
316
|
+
# in every region in which a function is deployed. But the repository to
|
317
|
+
# use can also be specified by the user using the `docker_repository`
|
318
|
+
# field.
|
319
|
+
ARTIFACT_REGISTRY = 2
|
320
|
+
end
|
284
321
|
end
|
285
322
|
|
286
323
|
# Describes the Service being deployed.
|
287
324
|
# Currently Supported : Cloud Run (fully managed).
|
325
|
+
# Next tag: 23
|
288
326
|
# @!attribute [r] service
|
289
327
|
# @return [::String]
|
290
328
|
# Output only. Name of the service associated with a Function.
|
@@ -303,6 +341,13 @@ module Google
|
|
303
341
|
# See
|
304
342
|
# https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
|
305
343
|
# a full description.
|
344
|
+
# @!attribute [rw] available_cpu
|
345
|
+
# @return [::String]
|
346
|
+
# The number of CPUs used in a single container instance.
|
347
|
+
# Default value is calculated from available memory.
|
348
|
+
# Supports the same values as Cloud Run, see
|
349
|
+
# https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements
|
350
|
+
# Example: "1" indicates 1 vCPU
|
306
351
|
# @!attribute [rw] environment_variables
|
307
352
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
308
353
|
# Environment variables that shall be available during function execution.
|
@@ -366,6 +411,16 @@ module Google
|
|
366
411
|
# @!attribute [r] revision
|
367
412
|
# @return [::String]
|
368
413
|
# Output only. The name of service revision.
|
414
|
+
# @!attribute [rw] max_instance_request_concurrency
|
415
|
+
# @return [::Integer]
|
416
|
+
# Sets the maximum number of concurrent requests that each instance can
|
417
|
+
# receive. Defaults to 1.
|
418
|
+
# @!attribute [rw] security_level
|
419
|
+
# @return [::Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel]
|
420
|
+
# Security level configure whether the function only accepts https.
|
421
|
+
# This configuration is only applicable to 1st Gen functions with Http
|
422
|
+
# trigger. By default https is optional for 1st Gen functions; 2nd Gen
|
423
|
+
# functions are https ONLY.
|
369
424
|
class ServiceConfig
|
370
425
|
include ::Google::Protobuf::MessageExts
|
371
426
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -413,6 +468,27 @@ module Google
|
|
413
468
|
# Allow HTTP traffic from private VPC sources and through GCLB.
|
414
469
|
ALLOW_INTERNAL_AND_GCLB = 3
|
415
470
|
end
|
471
|
+
|
472
|
+
# Available security level settings.
|
473
|
+
#
|
474
|
+
# This enforces security protocol on function URL.
|
475
|
+
#
|
476
|
+
# Security level is only ocnfigurable for 1st Gen functions, If unspecified,
|
477
|
+
# SECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY.
|
478
|
+
module SecurityLevel
|
479
|
+
# Unspecified.
|
480
|
+
SECURITY_LEVEL_UNSPECIFIED = 0
|
481
|
+
|
482
|
+
# Requests for a URL that match this handler that do not use HTTPS are
|
483
|
+
# automatically redirected to the HTTPS URL with the same path. Query
|
484
|
+
# parameters are reserved for the redirect.
|
485
|
+
SECURE_ALWAYS = 1
|
486
|
+
|
487
|
+
# Both HTTP and HTTPS requests with URLs that match the handler succeed
|
488
|
+
# without redirects. The application can examine the request to determine
|
489
|
+
# which protocol was used and respond accordingly.
|
490
|
+
SECURE_OPTIONAL = 2
|
491
|
+
end
|
416
492
|
end
|
417
493
|
|
418
494
|
# Configuration for a secret environment variable. It has the information
|
@@ -489,8 +565,8 @@ module Google
|
|
489
565
|
# service.
|
490
566
|
# @!attribute [r] trigger
|
491
567
|
# @return [::String]
|
492
|
-
# Output only. The resource name of the Eventarc trigger. The format of this
|
493
|
-
# `projects/{project}/locations/{region}/triggers/{trigger}`.
|
568
|
+
# Output only. The resource name of the Eventarc trigger. The format of this
|
569
|
+
# field is `projects/{project}/locations/{region}/triggers/{trigger}`.
|
494
570
|
# @!attribute [rw] trigger_region
|
495
571
|
# @return [::String]
|
496
572
|
# The region that the trigger will be in. The trigger will only receive
|
@@ -516,14 +592,15 @@ module Google
|
|
516
592
|
# will not be deleted at function deletion.
|
517
593
|
# @!attribute [rw] service_account_email
|
518
594
|
# @return [::String]
|
519
|
-
# Optional. The email of the trigger's service account. The service account
|
520
|
-
# permission to invoke Cloud Run services, the permission is
|
595
|
+
# Optional. The email of the trigger's service account. The service account
|
596
|
+
# must have permission to invoke Cloud Run services, the permission is
|
521
597
|
# `run.routes.invoke`.
|
522
598
|
# If empty, defaults to the Compute Engine default service account:
|
523
599
|
# `{project_number}-compute@developer.gserviceaccount.com`.
|
524
600
|
# @!attribute [rw] retry_policy
|
525
601
|
# @return [::Google::Cloud::Functions::V2::EventTrigger::RetryPolicy]
|
526
|
-
# Optional. If unset, then defaults to ignoring failures (i.e. not retrying
|
602
|
+
# Optional. If unset, then defaults to ignoring failures (i.e. not retrying
|
603
|
+
# them).
|
527
604
|
# @!attribute [rw] channel
|
528
605
|
# @return [::String]
|
529
606
|
# Optional. The name of the channel associated with the trigger in
|
@@ -578,15 +655,18 @@ module Google
|
|
578
655
|
# Request for the `ListFunctions` method.
|
579
656
|
# @!attribute [rw] parent
|
580
657
|
# @return [::String]
|
581
|
-
# Required. The project and location from which the function should be
|
582
|
-
# specified in the format `projects/*/locations/*`
|
583
|
-
#
|
584
|
-
#
|
585
|
-
#
|
586
|
-
#
|
658
|
+
# Required. The project and location from which the function should be
|
659
|
+
# listed, specified in the format `projects/*/locations/*` If you want to
|
660
|
+
# list functions in all locations, use "-" in place of a location. When
|
661
|
+
# listing functions in all locations, if one or more location(s) are
|
662
|
+
# unreachable, the response will contain functions from all reachable
|
663
|
+
# locations along with the names of any unreachable locations.
|
587
664
|
# @!attribute [rw] page_size
|
588
665
|
# @return [::Integer]
|
589
|
-
# Maximum number of functions to return per call.
|
666
|
+
# Maximum number of functions to return per call. The largest allowed
|
667
|
+
# page_size is 1,000, if the page_size is omitted or specified as greater
|
668
|
+
# than 1,000 then it will be replaced as 1,000. The size of the list
|
669
|
+
# response can be less than specified when used with filters.
|
590
670
|
# @!attribute [rw] page_token
|
591
671
|
# @return [::String]
|
592
672
|
# The value returned by the last
|
@@ -627,8 +707,8 @@ module Google
|
|
627
707
|
# Request for the `CreateFunction` method.
|
628
708
|
# @!attribute [rw] parent
|
629
709
|
# @return [::String]
|
630
|
-
# Required. The project and location in which the function should be created,
|
631
|
-
# in the format `projects/*/locations/*`
|
710
|
+
# Required. The project and location in which the function should be created,
|
711
|
+
# specified in the format `projects/*/locations/*`
|
632
712
|
# @!attribute [rw] function
|
633
713
|
# @return [::Google::Cloud::Functions::V2::Function]
|
634
714
|
# Required. Function to be created.
|
@@ -670,8 +750,25 @@ module Google
|
|
670
750
|
# Request of `GenerateSourceUploadUrl` method.
|
671
751
|
# @!attribute [rw] parent
|
672
752
|
# @return [::String]
|
673
|
-
# Required. The project and location in which the Google Cloud Storage signed
|
674
|
-
# should be generated, specified in the format `projects/*/locations/*`.
|
753
|
+
# Required. The project and location in which the Google Cloud Storage signed
|
754
|
+
# URL should be generated, specified in the format `projects/*/locations/*`.
|
755
|
+
# @!attribute [rw] kms_key_name
|
756
|
+
# @return [::String]
|
757
|
+
# Resource name of a KMS crypto key (managed by the user) used to
|
758
|
+
# encrypt/decrypt function source code objects in intermediate Cloud Storage
|
759
|
+
# buckets. When you generate an upload url and upload your source code, it
|
760
|
+
# gets copied to an intermediate Cloud Storage bucket. The source code is
|
761
|
+
# then copied to a versioned directory in the sources bucket in the consumer
|
762
|
+
# project during the function deployment.
|
763
|
+
#
|
764
|
+
# It must match the pattern
|
765
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
766
|
+
#
|
767
|
+
# The Google Cloud Functions service account
|
768
|
+
# (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be
|
769
|
+
# granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
|
770
|
+
# (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the
|
771
|
+
# Key/KeyRing/Project/Organization (least access preferred).
|
675
772
|
class GenerateUploadUrlRequest
|
676
773
|
include ::Google::Protobuf::MessageExts
|
677
774
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -701,8 +798,8 @@ module Google
|
|
701
798
|
# Request of `GenerateDownloadUrl` method.
|
702
799
|
# @!attribute [rw] name
|
703
800
|
# @return [::String]
|
704
|
-
# Required. The name of function for which source code Google Cloud Storage
|
705
|
-
# URL should be generated.
|
801
|
+
# Required. The name of function for which source code Google Cloud Storage
|
802
|
+
# signed URL should be generated.
|
706
803
|
class GenerateDownloadUrlRequest
|
707
804
|
include ::Google::Protobuf::MessageExts
|
708
805
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -721,8 +818,8 @@ module Google
|
|
721
818
|
# Request for the `ListRuntimes` method.
|
722
819
|
# @!attribute [rw] parent
|
723
820
|
# @return [::String]
|
724
|
-
# Required. The project and location from which the runtimes should be
|
725
|
-
# specified in the format `projects/*/locations/*`
|
821
|
+
# Required. The project and location from which the runtimes should be
|
822
|
+
# listed, specified in the format `projects/*/locations/*`
|
726
823
|
# @!attribute [rw] filter
|
727
824
|
# @return [::String]
|
728
825
|
# The filter for Runtimes that match the filter expression,
|
@@ -807,8 +904,9 @@ module Google
|
|
807
904
|
# @return [::Boolean]
|
808
905
|
# Identifies whether the user has requested cancellation
|
809
906
|
# of the operation. Operations that have successfully been cancelled
|
810
|
-
# have [Operation.error][] value with a
|
811
|
-
# corresponding to
|
907
|
+
# have [Operation.error][] value with a
|
908
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to
|
909
|
+
# `Code.CANCELLED`.
|
812
910
|
# @!attribute [rw] api_version
|
813
911
|
# @return [::String]
|
814
912
|
# API version used to start the operation.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-functions-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|