google-cloud-functions-v1 0.3.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/functions/v1/cloud_functions_service/client.rb +314 -97
- data/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb +149 -37
- data/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb +40 -0
- data/lib/google/cloud/functions/v1/functions_pb.rb +37 -2
- data/lib/google/cloud/functions/v1/operations_pb.rb +4 -2
- data/lib/google/cloud/functions/v1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/functions/v1/functions.rb +208 -5
- data/proto_docs/google/cloud/functions/v1/operations.rb +10 -1
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +4 -4
@@ -23,6 +23,7 @@ module Google
|
|
23
23
|
module V1
|
24
24
|
# Describes a Cloud Function that contains user computation executed in
|
25
25
|
# response to an event. It encapsulate function and triggers configurations.
|
26
|
+
# Next tag: 36
|
26
27
|
# @!attribute [rw] name
|
27
28
|
# @return [::String]
|
28
29
|
# A user-defined name of the function. Function names must be unique
|
@@ -32,7 +33,7 @@ module Google
|
|
32
33
|
# User-provided description of a function.
|
33
34
|
# @!attribute [rw] source_archive_url
|
34
35
|
# @return [::String]
|
35
|
-
# The Google Cloud Storage URL, starting with gs
|
36
|
+
# The Google Cloud Storage URL, starting with `gs://`, pointing to the zip
|
36
37
|
# archive which contains the function.
|
37
38
|
# @!attribute [rw] source_repository
|
38
39
|
# @return [::Google::Cloud::Functions::V1::SourceRepository]
|
@@ -42,7 +43,11 @@ module Google
|
|
42
43
|
# @!attribute [rw] source_upload_url
|
43
44
|
# @return [::String]
|
44
45
|
# The Google Cloud Storage signed URL used for source uploading, generated
|
45
|
-
# by [google.cloud.functions.v1.GenerateUploadUrl]
|
46
|
+
# by calling [google.cloud.functions.v1.GenerateUploadUrl].
|
47
|
+
#
|
48
|
+
# The signature is validated on write methods (Create, Update)
|
49
|
+
# The signature is stripped from the Function object on read methods (Get,
|
50
|
+
# List)
|
46
51
|
# @!attribute [rw] https_trigger
|
47
52
|
# @return [::Google::Cloud::Functions::V1::HttpsTrigger]
|
48
53
|
# An HTTPS endpoint type of source that can be triggered via URL.
|
@@ -66,7 +71,7 @@ module Google
|
|
66
71
|
# function, optional when updating an existing function. For a complete
|
67
72
|
# list of possible choices, see the
|
68
73
|
# [`gcloud` command
|
69
|
-
# reference](/sdk/gcloud/reference/functions/deploy#--runtime).
|
74
|
+
# reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
|
70
75
|
# @!attribute [rw] timeout
|
71
76
|
# @return [::Google::Protobuf::Duration]
|
72
77
|
# The function execution timeout. Execution is considered failed and
|
@@ -93,6 +98,9 @@ module Google
|
|
93
98
|
# @!attribute [rw] environment_variables
|
94
99
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
95
100
|
# Environment variables that shall be available during function execution.
|
101
|
+
# @!attribute [rw] build_environment_variables
|
102
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
103
|
+
# Build environment variables that shall be available during build time.
|
96
104
|
# @!attribute [rw] network
|
97
105
|
# @return [::String]
|
98
106
|
# The VPC Network that this cloud function can connect to. It can be
|
@@ -101,8 +109,8 @@ module Google
|
|
101
109
|
# project. Otherwise, it must belong to a project within the same
|
102
110
|
# organization. The format of this field is either
|
103
111
|
# `projects/{project}/global/networks/{network}` or `{network}`, where
|
104
|
-
#
|
105
|
-
# the short name of the network.
|
112
|
+
# `{project}` is a project id where the network is defined, and `{network}`
|
113
|
+
# is the short name of the network.
|
106
114
|
#
|
107
115
|
# This field is mutually exclusive with `vpc_connector` and will be replaced
|
108
116
|
# by it.
|
@@ -113,6 +121,20 @@ module Google
|
|
113
121
|
# @return [::Integer]
|
114
122
|
# The limit on the maximum number of function instances that may coexist at a
|
115
123
|
# given time.
|
124
|
+
#
|
125
|
+
# In some cases, such as rapid traffic surges, Cloud Functions may, for a
|
126
|
+
# short period of time, create more instances than the specified max
|
127
|
+
# instances limit. If your function cannot tolerate this temporary behavior,
|
128
|
+
# you may want to factor in a safety margin and set a lower max instances
|
129
|
+
# value than your function can tolerate.
|
130
|
+
#
|
131
|
+
# See the [Max
|
132
|
+
# Instances](https://cloud.google.com/functions/docs/max-instances) Guide for
|
133
|
+
# more details.
|
134
|
+
# @!attribute [rw] min_instances
|
135
|
+
# @return [::Integer]
|
136
|
+
# A lower bound for the number function instances that may coexist at a
|
137
|
+
# given time.
|
116
138
|
# @!attribute [rw] vpc_connector
|
117
139
|
# @return [::String]
|
118
140
|
# The VPC Network Connector that this cloud function can connect to. It can
|
@@ -133,10 +155,83 @@ module Google
|
|
133
155
|
# @return [::Google::Cloud::Functions::V1::CloudFunction::IngressSettings]
|
134
156
|
# The ingress settings for the function, controlling what traffic can reach
|
135
157
|
# it.
|
158
|
+
# @!attribute [rw] kms_key_name
|
159
|
+
# @return [::String]
|
160
|
+
# Resource name of a KMS crypto key (managed by the user) used to
|
161
|
+
# encrypt/decrypt function resources.
|
162
|
+
#
|
163
|
+
# It must match the pattern
|
164
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
165
|
+
#
|
166
|
+
# If specified, you must also provide an artifact registry repository using
|
167
|
+
# the `docker_repository` field that was created with the same KMS crypto
|
168
|
+
# key.
|
169
|
+
#
|
170
|
+
# The following service accounts need to be granted Cloud KMS crypto key
|
171
|
+
# encrypter/decrypter roles on the key.
|
172
|
+
#
|
173
|
+
# 1. Google Cloud Functions service account
|
174
|
+
# (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) -
|
175
|
+
# Required to protect the function's image.
|
176
|
+
# 2. Google Storage service account
|
177
|
+
# (service-\\{project_number}@gs-project-accounts.iam.gserviceaccount.com) -
|
178
|
+
# Required to protect the function's source code.
|
179
|
+
# If this service account does not exist, deploying a function without a
|
180
|
+
# KMS key or retrieving the service agent name provisions it. For more
|
181
|
+
# information, see
|
182
|
+
# https://cloud.google.com/storage/docs/projects#service-agents and
|
183
|
+
# https://cloud.google.com/storage/docs/getting-service-agent#gsutil.
|
184
|
+
#
|
185
|
+
# Google Cloud Functions delegates access to service agents to protect
|
186
|
+
# function resources in internal projects that are not accessible by the
|
187
|
+
# end user.
|
188
|
+
# @!attribute [rw] build_worker_pool
|
189
|
+
# @return [::String]
|
190
|
+
# Name of the Cloud Build Custom Worker Pool that should be used to build the
|
191
|
+
# function. The format of this field is
|
192
|
+
# `projects/{project}/locations/{region}/workerPools/{workerPool}` where
|
193
|
+
# `{project}` and `{region}` are the project id and region respectively where
|
194
|
+
# the worker pool is defined and `{workerPool}` is the short name of the
|
195
|
+
# worker pool.
|
196
|
+
#
|
197
|
+
# If the project id is not the same as the function, then the Cloud
|
198
|
+
# Functions Service Agent
|
199
|
+
# (`service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com`) must
|
200
|
+
# be granted the role Cloud Build Custom Workers Builder
|
201
|
+
# (`roles/cloudbuild.customworkers.builder`) in the project.
|
136
202
|
# @!attribute [r] build_id
|
137
203
|
# @return [::String]
|
138
204
|
# Output only. The Cloud Build ID of the latest successful deployment of the
|
139
205
|
# function.
|
206
|
+
# @!attribute [r] build_name
|
207
|
+
# @return [::String]
|
208
|
+
# Output only. The Cloud Build Name of the function deployment.
|
209
|
+
# `projects/<project-number>/locations/<region>/builds/<build-id>`.
|
210
|
+
# @!attribute [rw] secret_environment_variables
|
211
|
+
# @return [::Array<::Google::Cloud::Functions::V1::SecretEnvVar>]
|
212
|
+
# Secret environment variables configuration.
|
213
|
+
# @!attribute [rw] secret_volumes
|
214
|
+
# @return [::Array<::Google::Cloud::Functions::V1::SecretVolume>]
|
215
|
+
# Secret volumes configuration.
|
216
|
+
# @!attribute [rw] source_token
|
217
|
+
# @return [::String]
|
218
|
+
# Input only. An identifier for Firebase function sources. Disclaimer: This field is only
|
219
|
+
# supported for Firebase function deployments.
|
220
|
+
# @!attribute [rw] docker_repository
|
221
|
+
# @return [::String]
|
222
|
+
# User managed repository created in Artifact Registry optionally with a
|
223
|
+
# customer managed encryption key. If specified, deployments will use
|
224
|
+
# Artifact Registry. If unspecified and the deployment is eligible to use
|
225
|
+
# Artifact Registry, GCF will create and use a repository named
|
226
|
+
# 'gcf-artifacts' for every deployed region. This is the repository to which
|
227
|
+
# the function docker image will be pushed after it is built by Cloud Build.
|
228
|
+
#
|
229
|
+
# It must match the pattern
|
230
|
+
# `projects/{project}/locations/{location}/repositories/{repository}`.
|
231
|
+
#
|
232
|
+
# Cross-project repositories are not supported.
|
233
|
+
# Cross-location repositories are not supported.
|
234
|
+
# Repository format must be 'DOCKER'.
|
140
235
|
class CloudFunction
|
141
236
|
include ::Google::Protobuf::MessageExts
|
142
237
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -159,6 +254,15 @@ module Google
|
|
159
254
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
160
255
|
end
|
161
256
|
|
257
|
+
# @!attribute [rw] key
|
258
|
+
# @return [::String]
|
259
|
+
# @!attribute [rw] value
|
260
|
+
# @return [::String]
|
261
|
+
class BuildEnvironmentVariablesEntry
|
262
|
+
include ::Google::Protobuf::MessageExts
|
263
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
264
|
+
end
|
265
|
+
|
162
266
|
# Available egress settings.
|
163
267
|
#
|
164
268
|
# This controls what traffic is diverted through the VPC Access Connector
|
@@ -226,9 +330,32 @@ module Google
|
|
226
330
|
# @!attribute [r] url
|
227
331
|
# @return [::String]
|
228
332
|
# Output only. The deployed url for the function.
|
333
|
+
# @!attribute [rw] security_level
|
334
|
+
# @return [::Google::Cloud::Functions::V1::HttpsTrigger::SecurityLevel]
|
335
|
+
# The security level for the function.
|
229
336
|
class HttpsTrigger
|
230
337
|
include ::Google::Protobuf::MessageExts
|
231
338
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
339
|
+
|
340
|
+
# Available security level settings.
|
341
|
+
#
|
342
|
+
# This controls the methods to enforce security (HTTPS) on a URL.
|
343
|
+
#
|
344
|
+
# If unspecified, SECURE_OPTIONAL will be used.
|
345
|
+
module SecurityLevel
|
346
|
+
# Unspecified.
|
347
|
+
SECURITY_LEVEL_UNSPECIFIED = 0
|
348
|
+
|
349
|
+
# Requests for a URL that match this handler that do not use HTTPS are
|
350
|
+
# automatically redirected to the HTTPS URL with the same path. Query
|
351
|
+
# parameters are reserved for the redirect.
|
352
|
+
SECURE_ALWAYS = 1
|
353
|
+
|
354
|
+
# Both HTTP and HTTPS requests with URLs that match the handler succeed
|
355
|
+
# without redirects. The application can examine the request to determine
|
356
|
+
# which protocol was used and respond accordingly.
|
357
|
+
SECURE_OPTIONAL = 2
|
358
|
+
end
|
232
359
|
end
|
233
360
|
|
234
361
|
# Describes EventTrigger, used to request events be sent from another
|
@@ -305,6 +432,82 @@ module Google
|
|
305
432
|
end
|
306
433
|
end
|
307
434
|
|
435
|
+
# Configuration for a secret environment variable. It has the information
|
436
|
+
# necessary to fetch the secret value from secret manager and expose it as an
|
437
|
+
# environment variable. Secret value is not a part of the configuration. Secret
|
438
|
+
# values are only fetched when a new clone starts.
|
439
|
+
# @!attribute [rw] key
|
440
|
+
# @return [::String]
|
441
|
+
# Name of the environment variable.
|
442
|
+
# @!attribute [rw] project_id
|
443
|
+
# @return [::String]
|
444
|
+
# Project identifier (preferrably project number but can also be the project
|
445
|
+
# ID) of the project that contains the secret. If not set, it will be
|
446
|
+
# populated with the function's project assuming that the secret exists in
|
447
|
+
# the same project as of the function.
|
448
|
+
# @!attribute [rw] secret
|
449
|
+
# @return [::String]
|
450
|
+
# Name of the secret in secret manager (not the full resource name).
|
451
|
+
# @!attribute [rw] version
|
452
|
+
# @return [::String]
|
453
|
+
# Version of the secret (version number or the string 'latest'). It is
|
454
|
+
# recommended to use a numeric version for secret environment variables as
|
455
|
+
# any updates to the secret value is not reflected until new clones start.
|
456
|
+
class SecretEnvVar
|
457
|
+
include ::Google::Protobuf::MessageExts
|
458
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
459
|
+
end
|
460
|
+
|
461
|
+
# Configuration for a secret volume. It has the information necessary to fetch
|
462
|
+
# the secret value from secret manager and make it available as files mounted
|
463
|
+
# at the requested paths within the application container. Secret value is not
|
464
|
+
# a part of the configuration. Every filesystem read operation performs a
|
465
|
+
# lookup in secret manager to retrieve the secret value.
|
466
|
+
# @!attribute [rw] mount_path
|
467
|
+
# @return [::String]
|
468
|
+
# The path within the container to mount the secret volume. For example,
|
469
|
+
# setting the mount_path as `/etc/secrets` would mount the secret value files
|
470
|
+
# under the `/etc/secrets` directory. This directory will also be completely
|
471
|
+
# shadowed and unavailable to mount any other secrets.
|
472
|
+
#
|
473
|
+
# Recommended mount paths: /etc/secrets
|
474
|
+
# Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
|
475
|
+
# @!attribute [rw] project_id
|
476
|
+
# @return [::String]
|
477
|
+
# Project identifier (preferrably project number but can also be the project
|
478
|
+
# ID) of the project that contains the secret. If not set, it will be
|
479
|
+
# populated with the function's project assuming that the secret exists in
|
480
|
+
# the same project as of the function.
|
481
|
+
# @!attribute [rw] secret
|
482
|
+
# @return [::String]
|
483
|
+
# Name of the secret in secret manager (not the full resource name).
|
484
|
+
# @!attribute [rw] versions
|
485
|
+
# @return [::Array<::Google::Cloud::Functions::V1::SecretVolume::SecretVersion>]
|
486
|
+
# List of secret versions to mount for this secret. If empty, the `latest`
|
487
|
+
# version of the secret will be made available in a file named after the
|
488
|
+
# secret under the mount point.
|
489
|
+
class SecretVolume
|
490
|
+
include ::Google::Protobuf::MessageExts
|
491
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
492
|
+
|
493
|
+
# Configuration for a single version.
|
494
|
+
# @!attribute [rw] version
|
495
|
+
# @return [::String]
|
496
|
+
# Version of the secret (version number or the string 'latest'). It is
|
497
|
+
# preferrable to use `latest` version with secret volumes as secret value
|
498
|
+
# changes are reflected immediately.
|
499
|
+
# @!attribute [rw] path
|
500
|
+
# @return [::String]
|
501
|
+
# Relative path of the file under the mount path where the secret value for
|
502
|
+
# this version will be fetched and made available. For example, setting the
|
503
|
+
# mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
|
504
|
+
# secret value file at `/etc/secrets/secret_foo`.
|
505
|
+
class SecretVersion
|
506
|
+
include ::Google::Protobuf::MessageExts
|
507
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
508
|
+
end
|
509
|
+
end
|
510
|
+
|
308
511
|
# Request for the `CreateFunction` method.
|
309
512
|
# @!attribute [rw] location
|
310
513
|
# @return [::String]
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @!attribute [rw] target
|
26
26
|
# @return [::String]
|
27
27
|
# Target of the operation - for example
|
28
|
-
# projects/project-1/locations/region-1/functions/function-1
|
28
|
+
# `projects/project-1/locations/region-1/functions/function-1`
|
29
29
|
# @!attribute [rw] type
|
30
30
|
# @return [::Google::Cloud::Functions::V1::OperationType]
|
31
31
|
# Type of operation.
|
@@ -43,6 +43,15 @@ module Google
|
|
43
43
|
# @return [::String]
|
44
44
|
# The Cloud Build ID of the function created or updated by an API call.
|
45
45
|
# This field is only populated for Create and Update operations.
|
46
|
+
# @!attribute [rw] source_token
|
47
|
+
# @return [::String]
|
48
|
+
# An identifier for Firebase function sources. Disclaimer: This field is only
|
49
|
+
# supported for Firebase function deployments.
|
50
|
+
# @!attribute [rw] build_name
|
51
|
+
# @return [::String]
|
52
|
+
# The Cloud Build Name of the function deployment.
|
53
|
+
# This field is only populated for Create and Update operations.
|
54
|
+
# `projects/<project-number>/locations/<region>/builds/<build-id>`.
|
46
55
|
class OperationMetadataV1
|
47
56
|
include ::Google::Protobuf::MessageExts
|
48
57
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -19,30 +19,53 @@
|
|
19
19
|
|
20
20
|
module Google
|
21
21
|
module Type
|
22
|
-
# Represents
|
22
|
+
# Represents a textual expression in the Common Expression Language (CEL)
|
23
|
+
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
|
24
|
+
# are documented at https://github.com/google/cel-spec.
|
23
25
|
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
26
|
+
# Example (Comparison):
|
27
|
+
#
|
28
|
+
# title: "Summary size limit"
|
29
|
+
# description: "Determines if a summary is less than 100 chars"
|
30
|
+
# expression: "document.summary.size() < 100"
|
31
|
+
#
|
32
|
+
# Example (Equality):
|
33
|
+
#
|
34
|
+
# title: "Requestor is owner"
|
35
|
+
# description: "Determines if requestor is the document owner"
|
36
|
+
# expression: "document.owner == request.auth.claims.email"
|
37
|
+
#
|
38
|
+
# Example (Logic):
|
39
|
+
#
|
40
|
+
# title: "Public documents"
|
41
|
+
# description: "Determine whether the document should be publicly visible"
|
42
|
+
# expression: "document.type != 'private' && document.type != 'internal'"
|
43
|
+
#
|
44
|
+
# Example (Data Manipulation):
|
45
|
+
#
|
46
|
+
# title: "Notification string"
|
47
|
+
# description: "Create a notification string with a timestamp."
|
48
|
+
# expression: "'New message received at ' + string(document.create_time)"
|
49
|
+
#
|
50
|
+
# The exact variables and functions that may be referenced within an expression
|
51
|
+
# are determined by the service that evaluates it. See the service
|
52
|
+
# documentation for additional information.
|
27
53
|
# @!attribute [rw] expression
|
28
54
|
# @return [::String]
|
29
|
-
# Textual representation of an expression in
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# The application context of the containing message determines which
|
33
|
-
# well-known feature set of CEL is supported.
|
55
|
+
# Textual representation of an expression in Common Expression Language
|
56
|
+
# syntax.
|
34
57
|
# @!attribute [rw] title
|
35
58
|
# @return [::String]
|
36
|
-
#
|
59
|
+
# Optional. Title for the expression, i.e. a short string describing
|
37
60
|
# its purpose. This can be used e.g. in UIs which allow to enter the
|
38
61
|
# expression.
|
39
62
|
# @!attribute [rw] description
|
40
63
|
# @return [::String]
|
41
|
-
#
|
64
|
+
# Optional. Description of the expression. This is a longer text which
|
42
65
|
# describes the expression, e.g. when hovered over it in a UI.
|
43
66
|
# @!attribute [rw] location
|
44
67
|
# @return [::String]
|
45
|
-
#
|
68
|
+
# Optional. String indicating the location of the expression for error
|
46
69
|
# reporting, e.g. a file name and a position in the file.
|
47
70
|
class Expr
|
48
71
|
include ::Google::Protobuf::MessageExts
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-functions-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.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: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|