Class: Google::Apis::CloudfunctionsV2::Function
- Inherits:
-
Object
- Object
- Google::Apis::CloudfunctionsV2::Function
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudfunctions_v2/classes.rb,
lib/google/apis/cloudfunctions_v2/representations.rb,
lib/google/apis/cloudfunctions_v2/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::CloudfunctionsV2::BuildConfig
Describes the Build step of the function that builds a container from the given source.
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
User-provided description of a function.
-
#environment ⇒ String
Describe whether the function is 1st Gen or 2nd Gen.
-
#event_trigger ⇒ Google::Apis::CloudfunctionsV2::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.
-
#satisfies_pzs ⇒ Boolean
(also: #satisfies_pzs?)
Output only.
-
#service_config ⇒ Google::Apis::CloudfunctionsV2::ServiceConfig
Describes the Service being deployed.
-
#state ⇒ String
Output only.
-
#state_messages ⇒ Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2StateMessage>
Output only.
-
#update_time ⇒ String
Output only.
-
#upgrade_info ⇒ Google::Apis::CloudfunctionsV2::UpgradeInfo
Information related to: * A function's eligibility for 1st Gen to 2nd Gen migration and 2nd Gen to CRf detach.
-
#url ⇒ 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.
663 664 665 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 663 def initialize(**args) update!(**args) end |
Instance Attribute Details
#build_config ⇒ Google::Apis::CloudfunctionsV2::BuildConfig
Describes the Build step of the function that builds a container from the
given source.
Corresponds to the JSON property buildConfig
583 584 585 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 583 def build_config @build_config end |
#create_time ⇒ String
Output only. The create timestamp of a Cloud Function. This is only applicable
to 2nd Gen functions.
Corresponds to the JSON property createTime
589 590 591 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 589 def create_time @create_time end |
#description ⇒ String
User-provided description of a function.
Corresponds to the JSON property description
594 595 596 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 594 def description @description end |
#environment ⇒ String
Describe whether the function is 1st Gen or 2nd Gen.
Corresponds to the JSON property environment
599 600 601 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 599 def environment @environment end |
#event_trigger ⇒ Google::Apis::CloudfunctionsV2::EventTrigger
Describes EventTrigger, used to request events to be sent from another service.
Corresponds to the JSON property eventTrigger
604 605 606 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 604 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`
611 612 613 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 611 def kms_key_name @kms_key_name end |
#labels ⇒ Hash<String,String>
Labels associated with this Cloud Function.
Corresponds to the JSON property labels
616 617 618 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 616 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
622 623 624 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 622 def name @name end |
#satisfies_pzs ⇒ Boolean Also known as: satisfies_pzs?
Output only. Reserved for future use.
Corresponds to the JSON property satisfiesPzs
627 628 629 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 627 def satisfies_pzs @satisfies_pzs end |
#service_config ⇒ Google::Apis::CloudfunctionsV2::ServiceConfig
Describes the Service being deployed. Currently Supported : Cloud Run (fully
managed).
Corresponds to the JSON property serviceConfig
634 635 636 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 634 def service_config @service_config end |
#state ⇒ String
Output only. State of the function.
Corresponds to the JSON property state
639 640 641 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 639 def state @state end |
#state_messages ⇒ Array<Google::Apis::CloudfunctionsV2::GoogleCloudFunctionsV2StateMessage>
Output only. State Messages for this Cloud Function.
Corresponds to the JSON property stateMessages
644 645 646 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 644 def @state_messages end |
#update_time ⇒ String
Output only. The last update timestamp of a Cloud Function.
Corresponds to the JSON property updateTime
649 650 651 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 649 def update_time @update_time end |
#upgrade_info ⇒ Google::Apis::CloudfunctionsV2::UpgradeInfo
Information related to: * A function's eligibility for 1st Gen to 2nd Gen
migration and 2nd Gen to CRf detach. * Current state of migration for function
undergoing migration/detach.
Corresponds to the JSON property upgradeInfo
656 657 658 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 656 def upgrade_info @upgrade_info end |
#url ⇒ String
Output only. The deployed url for the function.
Corresponds to the JSON property url
661 662 663 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 661 def url @url end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
# File 'lib/google/apis/cloudfunctions_v2/classes.rb', line 668 def update!(**args) @build_config = args[:build_config] if args.key?(:build_config) @create_time = args[:create_time] if args.key?(:create_time) @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) @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs) @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) @upgrade_info = args[:upgrade_info] if args.key?(:upgrade_info) @url = args[:url] if args.key?(:url) end |