google-cloud-functions-v2 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 gen1 or gen2.
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 the
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
- # Optional. User managed repository created in Artifact Registry optionally with a
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 field is
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 must have
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 them).
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 listed,
582
- # specified in the format `projects/*/locations/*`
583
- # If you want to list functions in all locations, use "-" in place of a
584
- # location. When listing functions in all locations, if one or more
585
- # location(s) are unreachable, the response will contain functions from all
586
- # reachable locations along with the names of any unreachable locations.
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, specified
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 URL
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 signed
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 listed,
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 {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
811
- # corresponding to `Code.CANCELLED`.
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.
@@ -28,12 +28,14 @@ module Google
28
28
  # [API Design Guide](https://cloud.google.com/apis/design/errors).
29
29
  # @!attribute [rw] code
30
30
  # @return [::Integer]
31
- # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
31
+ # The status code, which should be an enum value of
32
+ # [google.rpc.Code][google.rpc.Code].
32
33
  # @!attribute [rw] message
33
34
  # @return [::String]
34
35
  # A developer-facing error message, which should be in English. Any
35
36
  # user-facing error message should be localized and sent in the
36
- # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized by the client.
37
+ # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized
38
+ # by the client.
37
39
  # @!attribute [rw] details
38
40
  # @return [::Array<::Google::Protobuf::Any>]
39
41
  # A list of messages that carry the error details. There is a common set of
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.1.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: 2022-07-29 00:00:00.000000000 Z
11
+ date: 2023-03-23 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.10'
19
+ version: 0.18.0
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.10'
29
+ version: 0.18.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '0.0'
53
+ version: '0.4'
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 2.a
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '0.0'
63
+ version: '0.4'
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 2.a
@@ -70,7 +70,7 @@ dependencies:
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: '0.0'
73
+ version: '0.4'
74
74
  - - "<"
75
75
  - !ruby/object:Gem::Version
76
76
  version: 2.a
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: '0.0'
83
+ version: '0.4'
84
84
  - - "<"
85
85
  - !ruby/object:Gem::Version
86
86
  version: 2.a
@@ -90,14 +90,14 @@ dependencies:
90
90
  requirements:
91
91
  - - "~>"
92
92
  - !ruby/object:Gem::Version
93
- version: 1.26.1
93
+ version: 1.26.3
94
94
  type: :development
95
95
  prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - "~>"
99
99
  - !ruby/object:Gem::Version
100
- version: 1.26.1
100
+ version: 1.26.3
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: minitest
103
103
  requirement: !ruby/object:Gem::Requirement
@@ -211,16 +211,24 @@ files:
211
211
  - README.md
212
212
  - lib/google-cloud-functions-v2.rb
213
213
  - lib/google/cloud/functions/v2.rb
214
+ - lib/google/cloud/functions/v2/bindings_override.rb
214
215
  - lib/google/cloud/functions/v2/function_service.rb
215
216
  - lib/google/cloud/functions/v2/function_service/client.rb
216
217
  - lib/google/cloud/functions/v2/function_service/credentials.rb
217
218
  - lib/google/cloud/functions/v2/function_service/operations.rb
218
219
  - lib/google/cloud/functions/v2/function_service/paths.rb
220
+ - lib/google/cloud/functions/v2/function_service/rest.rb
221
+ - lib/google/cloud/functions/v2/function_service/rest/client.rb
222
+ - lib/google/cloud/functions/v2/function_service/rest/operations.rb
223
+ - lib/google/cloud/functions/v2/function_service/rest/service_stub.rb
219
224
  - lib/google/cloud/functions/v2/functions_pb.rb
220
225
  - lib/google/cloud/functions/v2/functions_services_pb.rb
226
+ - lib/google/cloud/functions/v2/rest.rb
221
227
  - lib/google/cloud/functions/v2/version.rb
222
228
  - proto_docs/README.md
229
+ - proto_docs/google/api/client.rb
223
230
  - proto_docs/google/api/field_behavior.rb
231
+ - proto_docs/google/api/launch_stage.rb
224
232
  - proto_docs/google/api/resource.rb
225
233
  - proto_docs/google/cloud/functions/v2/functions.rb
226
234
  - proto_docs/google/longrunning/operations.rb
@@ -250,8 +258,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
258
  - !ruby/object:Gem::Version
251
259
  version: '0'
252
260
  requirements: []
253
- rubygems_version: 3.3.14
261
+ rubygems_version: 3.4.2
254
262
  signing_key:
255
263
  specification_version: 4
256
- summary: API Client library for the Cloud Functions V2 API
264
+ summary: Manages lightweight user-provided functions executed in response to events.
257
265
  test_files: []