Class: Google::Apis::RunV2::GoogleCloudRunV2BuildConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/run_v2/classes.rb,
lib/google/apis/run_v2/representations.rb,
lib/google/apis/run_v2/representations.rb

Overview

Describes the Build step of the function that builds a container from the given source.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2BuildConfig

Returns a new instance of GoogleCloudRunV2BuildConfig.



122
123
124
# File 'lib/google/apis/run_v2/classes.rb', line 122

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

Instance Attribute Details

#base_imageString

Optional. The base image used to build the function. Corresponds to the JSON property baseImage

Returns:

  • (String)


70
71
72
# File 'lib/google/apis/run_v2/classes.rb', line 70

def base_image
  @base_image
end

#enable_automatic_updatesBoolean Also known as: enable_automatic_updates?

Optional. Sets whether the function will receive automatic base image updates. Corresponds to the JSON property enableAutomaticUpdates

Returns:

  • (Boolean)


75
76
77
# File 'lib/google/apis/run_v2/classes.rb', line 75

def enable_automatic_updates
  @enable_automatic_updates
end

#environment_variablesHash<String,String>

Optional. User-provided build-time environment variables for the function Corresponds to the JSON property environmentVariables

Returns:

  • (Hash<String,String>)


81
82
83
# File 'lib/google/apis/run_v2/classes.rb', line 81

def environment_variables
  @environment_variables
end

#function_targetString

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". Corresponds to the JSON property functionTarget

Returns:

  • (String)


89
90
91
# File 'lib/google/apis/run_v2/classes.rb', line 89

def function_target
  @function_target
end

#image_uriString

Optional. Artifact Registry URI to store the built image. Corresponds to the JSON property imageUri

Returns:

  • (String)


94
95
96
# File 'lib/google/apis/run_v2/classes.rb', line 94

def image_uri
  @image_uri
end

#nameString

Output only. The Cloud Build name of the latest successful deployment of the function. Corresponds to the JSON property name

Returns:

  • (String)


100
101
102
# File 'lib/google/apis/run_v2/classes.rb', line 100

def name
  @name
end

#service_accountString

Optional. Service account to be used for building the container. The format of this field is projects/projectId/serviceAccounts/serviceAccountEmail`. Corresponds to the JSON propertyserviceAccount`

Returns:

  • (String)


106
107
108
# File 'lib/google/apis/run_v2/classes.rb', line 106

def 
  @service_account
end

#source_locationString

The Cloud Storage bucket URI where the function source code is located. Corresponds to the JSON property sourceLocation

Returns:

  • (String)


111
112
113
# File 'lib/google/apis/run_v2/classes.rb', line 111

def source_location
  @source_location
end

#worker_poolString

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/project/ locations/region/workerPools/workerPoolwhereprojectandregion are the project id and region respectively where the worker pool is defined andworkerPool`is the short name of the worker pool. Corresponds to the JSON propertyworkerPool`

Returns:

  • (String)


120
121
122
# File 'lib/google/apis/run_v2/classes.rb', line 120

def worker_pool
  @worker_pool
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



127
128
129
130
131
132
133
134
135
136
137
# File 'lib/google/apis/run_v2/classes.rb', line 127

def update!(**args)
  @base_image = args[:base_image] if args.key?(:base_image)
  @enable_automatic_updates = args[:enable_automatic_updates] if args.key?(:enable_automatic_updates)
  @environment_variables = args[:environment_variables] if args.key?(:environment_variables)
  @function_target = args[:function_target] if args.key?(:function_target)
  @image_uri = args[:image_uri] if args.key?(:image_uri)
  @name = args[:name] if args.key?(:name)
  @service_account = args[:service_account] if args.key?(:service_account)
  @source_location = args[:source_location] if args.key?(:source_location)
  @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
end