Class: Google::Apis::RunV1::SecurityContext

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

Overview

Cloud Run fully managed: not supported Cloud Run for Anthos: supported SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SecurityContext

Returns a new instance of SecurityContext.



2839
2840
2841
# File 'generated/google/apis/run_v1/classes.rb', line 2839

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

Instance Attribute Details

#run_as_userFixnum

(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Corresponds to the JSON property runAsUser

Returns:

  • (Fixnum)


2837
2838
2839
# File 'generated/google/apis/run_v1/classes.rb', line 2837

def run_as_user
  @run_as_user
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2844
2845
2846
# File 'generated/google/apis/run_v1/classes.rb', line 2844

def update!(**args)
  @run_as_user = args[:run_as_user] if args.key?(:run_as_user)
end