CfnFunctionDefinitionPropsMixin

class aws_cdk.mixins_preview.aws_greengrass.mixins.CfnFunctionDefinitionPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Greengrass::FunctionDefinition resource represents a function definition for AWS IoT Greengrass .

Function definitions are used to organize your function definition versions.

Function definitions can reference multiple function definition versions. All function definition versions must be associated with a function definition. Each function definition version can contain one or more functions. .. epigraph:

When you create a function definition, you can optionally include an initial function definition version. To associate a function definition version later, create an ```AWS::Greengrass::FunctionDefinitionVersion`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinitionversion.html>`_ resource and specify the ID of this function definition.

After you create the function definition version that contains the functions you want to deploy, you must add it to your group version. For more information, see ```AWS::Greengrass::Group`` <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html>`_ .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinition.html

CloudformationResource:

AWS::Greengrass::FunctionDefinition

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

# tags: Any
# variables: Any

cfn_function_definition_props_mixin = greengrass_mixins.CfnFunctionDefinitionPropsMixin(greengrass_mixins.CfnFunctionDefinitionMixinProps(
    initial_version=greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionDefinitionVersionProperty(
        default_config=greengrass_mixins.CfnFunctionDefinitionPropsMixin.DefaultConfigProperty(
            execution=greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
                isolation_mode="isolationMode",
                run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
                    gid=123,
                    uid=123
                )
            )
        ),
        functions=[greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionProperty(
            function_arn="functionArn",
            function_configuration=greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionConfigurationProperty(
                encoding_type="encodingType",
                environment=greengrass_mixins.CfnFunctionDefinitionPropsMixin.EnvironmentProperty(
                    access_sysfs=False,
                    execution=greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
                        isolation_mode="isolationMode",
                        run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
                            gid=123,
                            uid=123
                        )
                    ),
                    resource_access_policies=[greengrass_mixins.CfnFunctionDefinitionPropsMixin.ResourceAccessPolicyProperty(
                        permission="permission",
                        resource_id="resourceId"
                    )],
                    variables=variables
                ),
                exec_args="execArgs",
                executable="executable",
                memory_size=123,
                pinned=False,
                timeout=123
            ),
            id="id"
        )]
    ),
    name="name",
    tags=tags
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Greengrass::FunctionDefinition.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['initialVersion', 'name', 'tags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

DefaultConfigProperty

class CfnFunctionDefinitionPropsMixin.DefaultConfigProperty(*, execution=None)

Bases: object

The default configuration that applies to all Lambda functions in the function definition version.

Individual Lambda functions can override these settings.

In an CloudFormation template, DefaultConfig is a property of the `FunctionDefinitionVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functiondefinitionversion.html>`_ property type.

Parameters:

execution (Union[IResolvable, ExecutionProperty, Dict[str, Any], None]) – Configuration settings for the Lambda execution environment on the AWS IoT Greengrass core.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-defaultconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

default_config_property = greengrass_mixins.CfnFunctionDefinitionPropsMixin.DefaultConfigProperty(
    execution=greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
        isolation_mode="isolationMode",
        run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
            gid=123,
            uid=123
        )
    )
)

Attributes

execution

Configuration settings for the Lambda execution environment on the AWS IoT Greengrass core.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-defaultconfig.html#cfn-greengrass-functiondefinition-defaultconfig-execution

EnvironmentProperty

class CfnFunctionDefinitionPropsMixin.EnvironmentProperty(*, access_sysfs=None, execution=None, resource_access_policies=None, variables=None)

Bases: object

The environment configuration for a Lambda function on the AWS IoT Greengrass core.

In an CloudFormation template, Environment is a property of the `FunctionConfiguration <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html>`_ property type.

Parameters:
  • access_sysfs (Union[bool, IResolvable, None]) – Indicates whether the function is allowed to access the /sys directory on the core device, which allows the read device information from /sys . .. epigraph:: This property applies only to Lambda functions that run in a Greengrass container.

  • execution (Union[IResolvable, ExecutionProperty, Dict[str, Any], None]) – Settings for the Lambda execution environment in AWS IoT Greengrass .

  • resource_access_policies (Union[IResolvable, Sequence[Union[IResolvable, ResourceAccessPolicyProperty, Dict[str, Any]]], None]) – A list of the resources in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources. .. epigraph:: This property applies only for Lambda functions that run in a Greengrass container.

  • variables (Any) – Environment variables for the Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-environment.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

# variables: Any

environment_property = greengrass_mixins.CfnFunctionDefinitionPropsMixin.EnvironmentProperty(
    access_sysfs=False,
    execution=greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
        isolation_mode="isolationMode",
        run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
            gid=123,
            uid=123
        )
    ),
    resource_access_policies=[greengrass_mixins.CfnFunctionDefinitionPropsMixin.ResourceAccessPolicyProperty(
        permission="permission",
        resource_id="resourceId"
    )],
    variables=variables
)

Attributes

access_sysfs

Indicates whether the function is allowed to access the /sys directory on the core device, which allows the read device information from /sys .

This property applies only to Lambda functions that run in a Greengrass container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-environment.html#cfn-greengrass-functiondefinition-environment-accesssysfs

execution

Settings for the Lambda execution environment in AWS IoT Greengrass .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-environment.html#cfn-greengrass-functiondefinition-environment-execution

resource_access_policies

A list of the resources in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.

This property applies only for Lambda functions that run in a Greengrass container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-environment.html#cfn-greengrass-functiondefinition-environment-resourceaccesspolicies

variables

Environment variables for the Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-environment.html#cfn-greengrass-functiondefinition-environment-variables

ExecutionProperty

class CfnFunctionDefinitionPropsMixin.ExecutionProperty(*, isolation_mode=None, run_as=None)

Bases: object

Configuration settings for the Lambda execution environment on the AWS IoT Greengrass core.

In an CloudFormation template, Execution is a property of the `DefaultConfig <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-defaultconfig.html>`_ property type for a function definition version and the `Environment <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-environment.html>`_ property type for a function.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-execution.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

execution_property = greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
    isolation_mode="isolationMode",
    run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
        gid=123,
        uid=123
    )
)

Attributes

isolation_mode

The containerization that the Lambda function runs in.

Valid values are GreengrassContainer or NoContainer . Typically, this is GreengrassContainer . For more information, see Containerization in the Developer Guide .

We recommend that you run in a Greengrass container unless your business case requires that you run without containerization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-execution.html#cfn-greengrass-functiondefinition-execution-isolationmode

run_as

The user and group permissions used to run the Lambda function.

Typically, this is the ggc_user and ggc_group. 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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-execution.html#cfn-greengrass-functiondefinition-execution-runas

FunctionConfigurationProperty

class CfnFunctionDefinitionPropsMixin.FunctionConfigurationProperty(*, encoding_type=None, environment=None, exec_args=None, executable=None, memory_size=None, pinned=None, timeout=None)

Bases: object

The group-specific configuration settings for a Lambda function.

These settings configure the function’s behavior in the Greengrass group. For more information, see Controlling Execution of Greengrass Lambda Functions by Using Group-Specific Configuration in the Developer Guide .

In an CloudFormation template, FunctionConfiguration is a property of the `Function <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-function.html>`_ property type.

Parameters:
  • encoding_type (Optional[str]) – The expected encoding type of the input payload for the function. Valid values are json (default) and binary .

  • environment (Union[IResolvable, EnvironmentProperty, Dict[str, Any], None]) – The environment configuration of the function.

  • exec_args (Optional[str]) – The execution arguments.

  • executable (Optional[str]) – The name of the function executable.

  • memory_size (Union[int, float, None]) – The memory size (in KB) required by the function. .. epigraph:: This property applies only to Lambda functions that run in a Greengrass container.

  • pinned (Union[bool, IResolvable, None]) – Indicates whether the function is pinned (or long-lived ). Pinned functions start when the core starts and process all requests in the same container. The default value is false.

  • timeout (Union[int, float, None]) – The allowed execution time (in seconds) after which the function should terminate. For pinned functions, this timeout applies for each request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

# variables: Any

function_configuration_property = greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionConfigurationProperty(
    encoding_type="encodingType",
    environment=greengrass_mixins.CfnFunctionDefinitionPropsMixin.EnvironmentProperty(
        access_sysfs=False,
        execution=greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
            isolation_mode="isolationMode",
            run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
                gid=123,
                uid=123
            )
        ),
        resource_access_policies=[greengrass_mixins.CfnFunctionDefinitionPropsMixin.ResourceAccessPolicyProperty(
            permission="permission",
            resource_id="resourceId"
        )],
        variables=variables
    ),
    exec_args="execArgs",
    executable="executable",
    memory_size=123,
    pinned=False,
    timeout=123
)

Attributes

encoding_type

The expected encoding type of the input payload for the function.

Valid values are json (default) and binary .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html#cfn-greengrass-functiondefinition-functionconfiguration-encodingtype

environment

The environment configuration of the function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html#cfn-greengrass-functiondefinition-functionconfiguration-environment

exec_args

The execution arguments.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html#cfn-greengrass-functiondefinition-functionconfiguration-execargs

executable

The name of the function executable.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html#cfn-greengrass-functiondefinition-functionconfiguration-executable

memory_size

The memory size (in KB) required by the function.

This property applies only to Lambda functions that run in a Greengrass container.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html#cfn-greengrass-functiondefinition-functionconfiguration-memorysize

pinned

Indicates whether the function is pinned (or long-lived ).

Pinned functions start when the core starts and process all requests in the same container. The default value is false.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html#cfn-greengrass-functiondefinition-functionconfiguration-pinned

timeout

The allowed execution time (in seconds) after which the function should terminate.

For pinned functions, this timeout applies for each request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functionconfiguration.html#cfn-greengrass-functiondefinition-functionconfiguration-timeout

FunctionDefinitionVersionProperty

class CfnFunctionDefinitionPropsMixin.FunctionDefinitionVersionProperty(*, default_config=None, functions=None)

Bases: object

A function definition version contains a list of functions.

After you create a function definition version that contains the functions you want to deploy, you must add it to your group version. For more information, see `AWS::Greengrass::Group <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html>`_ .

In an CloudFormation template, FunctionDefinitionVersion is the property type of the InitialVersion property in the `AWS::Greengrass::FunctionDefinition <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinition.html>`_ resource.

Parameters:
  • default_config (Union[IResolvable, DefaultConfigProperty, Dict[str, Any], None]) – The default configuration that applies to all Lambda functions in the group. Individual Lambda functions can override these settings.

  • functions (Union[IResolvable, Sequence[Union[IResolvable, FunctionProperty, Dict[str, Any]]], None]) – The functions in this version.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functiondefinitionversion.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

# variables: Any

function_definition_version_property = greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionDefinitionVersionProperty(
    default_config=greengrass_mixins.CfnFunctionDefinitionPropsMixin.DefaultConfigProperty(
        execution=greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
            isolation_mode="isolationMode",
            run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
                gid=123,
                uid=123
            )
        )
    ),
    functions=[greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionProperty(
        function_arn="functionArn",
        function_configuration=greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionConfigurationProperty(
            encoding_type="encodingType",
            environment=greengrass_mixins.CfnFunctionDefinitionPropsMixin.EnvironmentProperty(
                access_sysfs=False,
                execution=greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
                    isolation_mode="isolationMode",
                    run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
                        gid=123,
                        uid=123
                    )
                ),
                resource_access_policies=[greengrass_mixins.CfnFunctionDefinitionPropsMixin.ResourceAccessPolicyProperty(
                    permission="permission",
                    resource_id="resourceId"
                )],
                variables=variables
            ),
            exec_args="execArgs",
            executable="executable",
            memory_size=123,
            pinned=False,
            timeout=123
        ),
        id="id"
    )]
)

Attributes

default_config

The default configuration that applies to all Lambda functions in the group.

Individual Lambda functions can override these settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functiondefinitionversion.html#cfn-greengrass-functiondefinition-functiondefinitionversion-defaultconfig

functions

The functions in this version.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functiondefinitionversion.html#cfn-greengrass-functiondefinition-functiondefinitionversion-functions

FunctionProperty

class CfnFunctionDefinitionPropsMixin.FunctionProperty(*, function_arn=None, function_configuration=None, id=None)

Bases: object

A function is a Lambda function that’s referenced from an AWS IoT Greengrass group.

The function is deployed to a Greengrass core where it runs locally. For more information, see Run Lambda Functions on the AWS IoT Greengrass Core in the Developer Guide .

In an CloudFormation template, the Functions property of the `FunctionDefinitionVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-functiondefinitionversion.html>`_ property type contains a list of Function property types.

Parameters:
  • function_arn (Optional[str]) – The Amazon Resource Name (ARN) of the alias (recommended) or version of the referenced Lambda function.

  • function_configuration (Union[IResolvable, FunctionConfigurationProperty, Dict[str, Any], None]) – The group-specific settings of the Lambda function. These settings configure the function’s behavior in the Greengrass group.

  • id (Optional[str]) – A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-function.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

# variables: Any

function_property = greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionProperty(
    function_arn="functionArn",
    function_configuration=greengrass_mixins.CfnFunctionDefinitionPropsMixin.FunctionConfigurationProperty(
        encoding_type="encodingType",
        environment=greengrass_mixins.CfnFunctionDefinitionPropsMixin.EnvironmentProperty(
            access_sysfs=False,
            execution=greengrass_mixins.CfnFunctionDefinitionPropsMixin.ExecutionProperty(
                isolation_mode="isolationMode",
                run_as=greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
                    gid=123,
                    uid=123
                )
            ),
            resource_access_policies=[greengrass_mixins.CfnFunctionDefinitionPropsMixin.ResourceAccessPolicyProperty(
                permission="permission",
                resource_id="resourceId"
            )],
            variables=variables
        ),
        exec_args="execArgs",
        executable="executable",
        memory_size=123,
        pinned=False,
        timeout=123
    ),
    id="id"
)

Attributes

function_arn

The Amazon Resource Name (ARN) of the alias (recommended) or version of the referenced Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-function.html#cfn-greengrass-functiondefinition-function-functionarn

function_configuration

The group-specific settings of the Lambda function.

These settings configure the function’s behavior in the Greengrass group.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-function.html#cfn-greengrass-functiondefinition-function-functionconfiguration

id

A descriptive or arbitrary ID for the function.

This value must be unique within the function definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-function.html#cfn-greengrass-functiondefinition-function-id

ResourceAccessPolicyProperty

class CfnFunctionDefinitionPropsMixin.ResourceAccessPolicyProperty(*, permission=None, resource_id=None)

Bases: object

A list of the resources in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.

This property applies only to Lambda functions that run in a Greengrass container.

In an CloudFormation template, ResourceAccessPolicy is a property of the `Environment <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-environment.html>`_ property type.

Parameters:
  • permission (Optional[str]) – The read-only or read-write access that the Lambda function has to the resource. Valid values are ro or rw .

  • resource_id (Optional[str]) – The ID of the resource. This ID is assigned to the resource when you create the resource definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-resourceaccesspolicy.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

resource_access_policy_property = greengrass_mixins.CfnFunctionDefinitionPropsMixin.ResourceAccessPolicyProperty(
    permission="permission",
    resource_id="resourceId"
)

Attributes

permission

The read-only or read-write access that the Lambda function has to the resource.

Valid values are ro or rw .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-resourceaccesspolicy.html#cfn-greengrass-functiondefinition-resourceaccesspolicy-permission

resource_id

The ID of the resource.

This ID is assigned to the resource when you create the resource definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-resourceaccesspolicy.html#cfn-greengrass-functiondefinition-resourceaccesspolicy-resourceid

RunAsProperty

class CfnFunctionDefinitionPropsMixin.RunAsProperty(*, gid=None, uid=None)

Bases: object

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 . .. epigraph:

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 <https://docs.aws.amazon.com/greengrass/v1/developerguide/lambda-group-config.html#lambda-running-as-root>`_ .

In an CloudFormation template, RunAs is a property of the `Execution <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-execution.html>`_ property type.

Parameters:
  • gid (Union[int, float, None]) – 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.

  • uid (Union[int, float, None]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-runas.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_greengrass import mixins as greengrass_mixins

run_as_property = greengrass_mixins.CfnFunctionDefinitionPropsMixin.RunAsProperty(
    gid=123,
    uid=123
)

Attributes

gid

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-runas.html#cfn-greengrass-functiondefinition-runas-gid

uid

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-runas.html#cfn-greengrass-functiondefinition-runas-uid