Class: Google::Apis::CloudfunctionsV2alpha::Function

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Function

Returns a new instance of Function.



556
557
558
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 556

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

Instance Attribute Details

#build_configGoogle::Apis::CloudfunctionsV2alpha::BuildConfig

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



489
490
491
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 489

def build_config
  @build_config
end

#descriptionString

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

Returns:

  • (String)


494
495
496
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 494

def description
  @description
end

#environmentString

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

Returns:

  • (String)


499
500
501
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 499

def environment
  @environment
end

#event_triggerGoogle::Apis::CloudfunctionsV2alpha::EventTrigger

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



504
505
506
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 504

def event_trigger
  @event_trigger
end

#kms_key_nameString

[Preview] 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)


511
512
513
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 511

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>)


516
517
518
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 516

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)


522
523
524
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 522

def name
  @name
end

#satisfies_pzsBoolean Also known as: satisfies_pzs?

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

Returns:

  • (Boolean)


527
528
529
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 527

def satisfies_pzs
  @satisfies_pzs
end

#service_configGoogle::Apis::CloudfunctionsV2alpha::ServiceConfig

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



534
535
536
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 534

def service_config
  @service_config
end

#stateString

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

Returns:

  • (String)


539
540
541
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 539

def state
  @state
end

#state_messagesArray<Google::Apis::CloudfunctionsV2alpha::GoogleCloudFunctionsV2alphaStateMessage>

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



544
545
546
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 544

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)


549
550
551
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 549

def update_time
  @update_time
end

#urlString

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

Returns:

  • (String)


554
555
556
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 554

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 561

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