Class: AWSCDK::Greengrass::CfnFunctionDefinition::RunAsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrass::CfnFunctionDefinition::RunAsProperty
- Defined in:
- greengrass/cfn_function_definition.rb
Overview
The access identity whose permissions are 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.
1039 1040 1041 1042 1043 1044 |
# File 'greengrass/cfn_function_definition.rb', line 1039 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.
1052 1053 1054 |
# File 'greengrass/cfn_function_definition.rb', line 1052 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.
1059 1060 1061 |
# File 'greengrass/cfn_function_definition.rb', line 1059 def uid @uid end |
Class Method Details
.jsii_properties ⇒ Object
1061 1062 1063 1064 1065 1066 |
# File 'greengrass/cfn_function_definition.rb', line 1061 def self.jsii_properties { :gid => "gid", :uid => "uid", } end |
Instance Method Details
#to_jsii ⇒ Object
1068 1069 1070 1071 1072 1073 1074 1075 |
# File 'greengrass/cfn_function_definition.rb', line 1068 def to_jsii result = {} result.merge!({ "gid" => @gid, "uid" => @uid, }) result.compact end |