Class: Google::Apis::CloudfunctionsV2alpha::Function
- Inherits:
-
Object
- Object
- Google::Apis::CloudfunctionsV2alpha::Function
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudfunctions_v2alpha/classes.rb,
lib/google/apis/cloudfunctions_v2alpha/representations.rb,
lib/google/apis/cloudfunctions_v2alpha/representations.rb
Overview
Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.
Instance Attribute Summary collapse
-
#build_config ⇒ Google::Apis::CloudfunctionsV2alpha::BuildConfig
Describes the Build step of the function that builds a container from the given source.
-
#description ⇒ String
User-provided description of a function.
-
#environment ⇒ String
Describe whether the function is 1st Gen or 2nd Gen.
-
#event_trigger ⇒ Google::Apis::CloudfunctionsV2alpha::EventTrigger
Describes EventTrigger, used to request events to be sent from another service.
-
#kms_key_name ⇒ String
Resource name of a KMS crypto key (managed by the user) used to encrypt/ decrypt function resources.
-
#labels ⇒ Hash<String,String>
Labels associated with this Cloud Function.
-
#name ⇒ String
A user-defined name of the function.
-
#service_config ⇒ Google::Apis::CloudfunctionsV2alpha::ServiceConfig
Describes the Service being deployed.
-
#state ⇒ String
Output only.
-
#state_messages ⇒ Array<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2alphaStateMessage>
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Function
constructor
A new instance of Function.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Function
Returns a new instance of Function.
503 504 505 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 503 def initialize(**args) update!(**args) end |
Instance Attribute Details
#build_config ⇒ Google::Apis::CloudfunctionsV2alpha::BuildConfig
Describes the Build step of the function that builds a container from the
given source.
Corresponds to the JSON property buildConfig
447 448 449 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 447 def build_config @build_config end |
#description ⇒ String
User-provided description of a function.
Corresponds to the JSON property description
452 453 454 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 452 def description @description end |
#environment ⇒ String
Describe whether the function is 1st Gen or 2nd Gen.
Corresponds to the JSON property environment
457 458 459 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 457 def environment @environment end |
#event_trigger ⇒ Google::Apis::CloudfunctionsV2alpha::EventTrigger
Describes EventTrigger, used to request events to be sent from another service.
Corresponds to the JSON property eventTrigger
462 463 464 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 462 def event_trigger @event_trigger end |
#kms_key_name ⇒ String
Resource name of a KMS crypto key (managed by the user) used to encrypt/
decrypt function resources. It must match the pattern projects/
project/
locations/
location/keyRings/
key_ring/cryptoKeys/
crypto_key`.
Corresponds to the JSON property
kmsKeyName`
469 470 471 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 469 def kms_key_name @kms_key_name end |
#labels ⇒ Hash<String,String>
Labels associated with this Cloud Function.
Corresponds to the JSON property labels
474 475 476 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 474 def labels @labels end |
#name ⇒ String
A user-defined name of the function. Function names must be unique globally
and match pattern projects/*/locations/*/functions/*
Corresponds to the JSON property name
480 481 482 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 480 def name @name end |
#service_config ⇒ Google::Apis::CloudfunctionsV2alpha::ServiceConfig
Describes the Service being deployed. Currently Supported : Cloud Run (fully
managed). Next tag: 23
Corresponds to the JSON property serviceConfig
486 487 488 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 486 def service_config @service_config end |
#state ⇒ String
Output only. State of the function.
Corresponds to the JSON property state
491 492 493 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 491 def state @state end |
#state_messages ⇒ Array<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2alphaStateMessage>
Output only. State Messages for this Cloud Function.
Corresponds to the JSON property stateMessages
496 497 498 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 496 def @state_messages end |
#update_time ⇒ String
Output only. The last update timestamp of a Cloud Function.
Corresponds to the JSON property updateTime
501 502 503 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 501 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
508 509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 508 def update!(**args) @build_config = args[:build_config] if args.key?(:build_config) @description = args[:description] if args.key?(:description) @environment = args[:environment] if args.key?(:environment) @event_trigger = args[:event_trigger] if args.key?(:event_trigger) @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @service_config = args[:service_config] if args.key?(:service_config) @state = args[:state] if args.key?(:state) @state_messages = args[:state_messages] if args.key?(:state_messages) @update_time = args[:update_time] if args.key?(:update_time) end |