Class: AWSCDK::Greengrass::CfnFunctionDefinitionVersion::RunAsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrass::CfnFunctionDefinitionVersion::RunAsProperty
- Defined in:
- greengrass/cfn_function_definition_version.rb
Overview
The user and group permissions used to run the Lambda function.
This setting overrides the default access identity that's specified for the group (by default, ggc_user and ggc_group). You can override the user, group, or both. For more information, see Run as in the Developer Guide .
Running as the root user increases risks to your data and device. Do not run as root (UID/GID=0) unless your business case requires it. For more information and requirements, see Running a Lambda Function as Root .
In an CloudFormation template, RunAs is a property of the Execution property type.
Instance Attribute Summary collapse
-
#gid ⇒ Numeric?
readonly
The group ID whose permissions are used to run the Lambda function.
-
#uid ⇒ Numeric?
readonly
The user ID whose permissions are used to run the Lambda function.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gid: nil, uid: nil) ⇒ RunAsProperty
constructor
A new instance of RunAsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(gid: nil, uid: nil) ⇒ RunAsProperty
Returns a new instance of RunAsProperty.
920 921 922 923 924 925 |
# File 'greengrass/cfn_function_definition_version.rb', line 920 def initialize(gid: nil, uid: nil) @gid = gid Jsii::Type.check_type(@gid, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "gid") unless @gid.nil? @uid = uid Jsii::Type.check_type(@uid, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "uid") unless @uid.nil? end |
Instance Attribute Details
#gid ⇒ Numeric? (readonly)
The group ID whose permissions are used to run the Lambda function.
You can use the getent group command on your core device to look up the group ID.
933 934 935 |
# File 'greengrass/cfn_function_definition_version.rb', line 933 def gid @gid end |
#uid ⇒ Numeric? (readonly)
The user ID whose permissions are used to run the Lambda function.
You can use the getent passwd command on your core device to look up the user ID.
940 941 942 |
# File 'greengrass/cfn_function_definition_version.rb', line 940 def uid @uid end |
Class Method Details
.jsii_properties ⇒ Object
942 943 944 945 946 947 |
# File 'greengrass/cfn_function_definition_version.rb', line 942 def self.jsii_properties { :gid => "gid", :uid => "uid", } end |
Instance Method Details
#to_jsii ⇒ Object
949 950 951 952 953 954 955 956 |
# File 'greengrass/cfn_function_definition_version.rb', line 949 def to_jsii result = {} result.merge!({ "gid" => @gid, "uid" => @uid, }) result.compact end |