Greengrass.Client.
create_function_definition
(**kwargs)¶Creates a Lambda function definition which contains a list of Lambda functions and their configurations to be used in a group. You can create an initial version of the definition by providing a list of Lambda functions and their configurations now, or use ''CreateFunctionDefinitionVersion'' later.
See also: AWS API Documentation
Request Syntax
response = client.create_function_definition(
AmznClientToken='string',
InitialVersion={
'DefaultConfig': {
'Execution': {
'IsolationMode': 'GreengrassContainer'|'NoContainer',
'RunAs': {
'Gid': 123,
'Uid': 123
}
}
},
'Functions': [
{
'FunctionArn': 'string',
'FunctionConfiguration': {
'EncodingType': 'binary'|'json',
'Environment': {
'AccessSysfs': True|False,
'Execution': {
'IsolationMode': 'GreengrassContainer'|'NoContainer',
'RunAs': {
'Gid': 123,
'Uid': 123
}
},
'ResourceAccessPolicies': [
{
'Permission': 'ro'|'rw',
'ResourceId': 'string'
},
],
'Variables': {
'string': 'string'
}
},
'ExecArgs': 'string',
'Executable': 'string',
'MemorySize': 123,
'Pinned': True|False,
'Timeout': 123,
'FunctionRuntimeOverride': 'string'
},
'Id': 'string'
},
]
},
Name='string',
tags={
'string': 'string'
}
)
Information about the initial version of the function definition.
Tag(s) to add to the new resource.
dict
Response Syntax
{
'Arn': 'string',
'CreationTimestamp': 'string',
'Id': 'string',
'LastUpdatedTimestamp': 'string',
'LatestVersion': 'string',
'LatestVersionArn': 'string',
'Name': 'string'
}
Response Structure
Exceptions
Greengrass.Client.exceptions.BadRequestException