Class: Google::Apis::CloudfunctionsV2beta::Function

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudfunctions_v2beta/classes.rb,
lib/google/apis/cloudfunctions_v2beta/representations.rb,
lib/google/apis/cloudfunctions_v2beta/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Function

Returns a new instance of Function.



758
759
760
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 758

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#build_configGoogle::Apis::CloudfunctionsV2beta::BuildConfig

Describes the Build step of the function that builds a container from the given source. Corresponds to the JSON property buildConfig



673
674
675
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 673

def build_config
  @build_config
end

#create_timeString

Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions. Corresponds to the JSON property createTime

Returns:

  • (String)


679
680
681
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 679

def create_time
  @create_time
end

#descriptionString

User-provided description of a function. Corresponds to the JSON property description

Returns:

  • (String)


684
685
686
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 684

def description
  @description
end

#environmentString

Describe whether the function is 1st Gen or 2nd Gen. Corresponds to the JSON property environment

Returns:

  • (String)


689
690
691
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 689

def environment
  @environment
end

#event_triggerGoogle::Apis::CloudfunctionsV2beta::EventTrigger

Describes EventTrigger, used to request events to be sent from another service. Corresponds to the JSON property eventTrigger



694
695
696
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 694

def event_trigger
  @event_trigger
end

#kms_key_nameString

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 propertykmsKeyName`

Returns:

  • (String)


701
702
703
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 701

def kms_key_name
  @kms_key_name
end

#labelsHash<String,String>

Labels associated with this Cloud Function. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


706
707
708
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 706

def labels
  @labels
end

#nameString

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

Returns:

  • (String)


712
713
714
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 712

def name
  @name
end

#satisfies_pziBoolean Also known as: satisfies_pzi?

Output only. Reserved for future use. Corresponds to the JSON property satisfiesPzi

Returns:

  • (Boolean)


717
718
719
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 717

def satisfies_pzi
  @satisfies_pzi
end

#satisfies_pzsBoolean Also known as: satisfies_pzs?

Output only. Reserved for future use. Corresponds to the JSON property satisfiesPzs

Returns:

  • (Boolean)


723
724
725
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 723

def satisfies_pzs
  @satisfies_pzs
end

#service_configGoogle::Apis::CloudfunctionsV2beta::ServiceConfig

Describes the Service being deployed. Currently Supported : Cloud Run (fully managed). Corresponds to the JSON property serviceConfig



730
731
732
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 730

def service_config
  @service_config
end

#stateString

Output only. State of the function. Corresponds to the JSON property state

Returns:

  • (String)


735
736
737
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 735

def state
  @state
end

#state_messagesArray<Google::Apis::CloudfunctionsV2beta::GoogleCloudFunctionsV2betaStateMessage>

Output only. State Messages for this Cloud Function. Corresponds to the JSON property stateMessages



740
741
742
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 740

def state_messages
  @state_messages
end

#update_timeString

Output only. The last update timestamp of a Cloud Function. Corresponds to the JSON property updateTime

Returns:

  • (String)


745
746
747
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 745

def update_time
  @update_time
end

#upgrade_infoGoogle::Apis::CloudfunctionsV2beta::UpgradeInfo

Information related to: * A function's eligibility for 1st Gen to 2nd Gen migration. * Current state of migration for function undergoing migration. Corresponds to the JSON property upgradeInfo



751
752
753
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 751

def upgrade_info
  @upgrade_info
end

#urlString

Output only. The deployed url for the function. Corresponds to the JSON property url

Returns:

  • (String)


756
757
758
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 756

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
# File 'lib/google/apis/cloudfunctions_v2beta/classes.rb', line 763

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_pzi = args[:satisfies_pzi] if args.key?(:satisfies_pzi)
  @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