2018/11/26 - AWS Greengrass - 8 new9 updated api methods
Changes Update greengrass client to latest version
Updates a connector definition.
See also: AWS API Documentation
Request Syntax
client.update_connector_definition( ConnectorDefinitionId='string', Name='string' )
string
[REQUIRED] The ID of the connector definition.
string
The name of the definition.
dict
Response Syntax
{}
Response Structure
(dict) -- success
Creates a version of a connector definition which has already been defined.
See also: AWS API Documentation
Request Syntax
client.create_connector_definition_version( AmznClientToken='string', ConnectorDefinitionId='string', Connectors=[ { 'ConnectorArn': 'string', 'Id': 'string', 'Parameters': { 'string': 'string' } }, ] )
string
A client token used to correlate requests and responses.
string
[REQUIRED] The ID of the connector definition.
list
A list of references to connectors in this version, with their corresponding configuration settings.
(dict) -- Information about a connector. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.
ConnectorArn (string) -- The ARN of the connector.
Id (string) -- A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Max length is 128 characters with pattern [a-zA-Z0-9:_-]+.
Parameters (dict) -- The parameters or configuration that the connector uses.
(string) --
(string) --
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) --
Arn (string) -- The ARN of the version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the version was created.
Id (string) -- The ID of the version.
Version (string) -- The unique ID of the version.
Retrieves information about a connector definition version, including the connectors that the version contains. Connectors are prebuilt modules that interact with local infrastructure, device protocols, AWS, and other cloud services.
See also: AWS API Documentation
Request Syntax
client.get_connector_definition_version( ConnectorDefinitionId='string', ConnectorDefinitionVersionId='string', NextToken='string' )
string
[REQUIRED] The ID of the connector definition.
string
[REQUIRED] The ID of the connector definition version.
string
The token for the next set of results, or ''null'' if there are no additional results.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Definition': { 'Connectors': [ { 'ConnectorArn': 'string', 'Id': 'string', 'Parameters': { 'string': 'string' } }, ] }, 'Id': 'string', 'NextToken': 'string', 'Version': 'string' }
Response Structure
(dict) --
Arn (string) -- The ARN of the connector definition version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the connector definition version was created.
Definition (dict) -- Information about the connector definition version.
Connectors (list) -- A list of references to connectors in this version, with their corresponding configuration settings.
(dict) -- Information about a connector. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.
ConnectorArn (string) -- The ARN of the connector.
Id (string) -- A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Max length is 128 characters with pattern [a-zA-Z0-9:_-]+.
Parameters (dict) -- The parameters or configuration that the connector uses.
(string) --
(string) --
Id (string) -- The ID of the connector definition version.
NextToken (string) -- The token for the next set of results, or ''null'' if there are no additional results.
Version (string) -- The version of the connector definition version.
Retrieves information about a connector definition.
See also: AWS API Documentation
Request Syntax
client.get_connector_definition( ConnectorDefinitionId='string' )
string
[REQUIRED] The ID of the connector definition.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }
Response Structure
(dict) --
Arn (string) -- The ARN of the definition.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was created.
Id (string) -- The ID of the definition.
LastUpdatedTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was last updated.
LatestVersion (string) -- The latest version of the definition.
LatestVersionArn (string) -- The ARN of the latest version of the definition.
Name (string) -- The name of the definition.
Creates a connector definition. You may provide the initial version of the connector definition now or use ''CreateConnectorDefinitionVersion'' at a later time.
See also: AWS API Documentation
Request Syntax
client.create_connector_definition( AmznClientToken='string', InitialVersion={ 'Connectors': [ { 'ConnectorArn': 'string', 'Id': 'string', 'Parameters': { 'string': 'string' } }, ] }, Name='string' )
string
A client token used to correlate requests and responses.
dict
Information about the initial version of the connector definition.
Connectors (list) -- A list of references to connectors in this version, with their corresponding configuration settings.
(dict) -- Information about a connector. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.
ConnectorArn (string) -- The ARN of the connector.
Id (string) -- A descriptive or arbitrary ID for the connector. This value must be unique within the connector definition version. Max length is 128 characters with pattern [a-zA-Z0-9:_-]+.
Parameters (dict) -- The parameters or configuration that the connector uses.
(string) --
(string) --
string
The name of the connector definition.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }
Response Structure
(dict) --
Arn (string) -- The ARN of the definition.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was created.
Id (string) -- The ID of the definition.
LastUpdatedTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was last updated.
LatestVersion (string) -- The latest version of the definition.
LatestVersionArn (string) -- The ARN of the latest version of the definition.
Name (string) -- The name of the definition.
Lists the versions of a connector definition, which are containers for connectors. Connectors run on the Greengrass core and contain built-in integration with local infrastructure, device protocols, AWS, and other cloud services.
See also: AWS API Documentation
Request Syntax
client.list_connector_definition_versions( ConnectorDefinitionId='string', MaxResults='string', NextToken='string' )
string
[REQUIRED] The ID of the connector definition.
string
The maximum number of results to be returned per request.
string
The token for the next set of results, or ''null'' if there are no additional results.
dict
Response Syntax
{ 'NextToken': 'string', 'Versions': [ { 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }, ] }
Response Structure
(dict) --
NextToken (string) -- The token for the next set of results, or ''null'' if there are no additional results.
Versions (list) -- Information about a version.
(dict) -- Information about a version.
Arn (string) -- The ARN of the version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the version was created.
Id (string) -- The ID of the version.
Version (string) -- The unique ID of the version.
Deletes a connector definition.
See also: AWS API Documentation
Request Syntax
client.delete_connector_definition( ConnectorDefinitionId='string' )
string
[REQUIRED] The ID of the connector definition.
dict
Response Syntax
{}
Response Structure
(dict) -- success
Retrieves a list of connector definitions.
See also: AWS API Documentation
Request Syntax
client.list_connector_definitions( MaxResults='string', NextToken='string' )
string
The maximum number of results to be returned per request.
string
The token for the next set of results, or ''null'' if there are no additional results.
dict
Response Syntax
{ 'Definitions': [ { 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Definitions (list) -- Information about a definition.
(dict) -- Information about a definition.
Arn (string) -- The ARN of the definition.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was created.
Id (string) -- The ID of the definition.
LastUpdatedTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was last updated.
LatestVersion (string) -- The latest version of the definition.
LatestVersionArn (string) -- The ARN of the latest version of the definition.
Name (string) -- The name of the definition.
NextToken (string) -- The token for the next set of results, or ''null'' if there are no additional results.
{'InitialVersion': {'DefaultConfig': {'Execution': {'IsolationMode': 'GreengrassContainer ' '| ' 'NoContainer'}}, 'Functions': {'FunctionConfiguration': {'Environment': {'Execution': {'IsolationMode': 'GreengrassContainer ' '| ' 'NoContainer', 'RunAs': {'Gid': 'integer', 'Uid': 'integer'}}}}}}}
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
client.create_function_definition( AmznClientToken='string', InitialVersion={ 'DefaultConfig': { 'Execution': { 'IsolationMode': 'GreengrassContainer'|'NoContainer' } }, '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 }, 'Id': 'string' }, ] }, Name='string' )
string
A client token used to correlate requests and responses.
dict
Information about the initial version of the function definition.
DefaultConfig (dict) -- Default configuration that will apply to all Lambda functions in this function definition version
Execution (dict) -- Configuration that defines the default containerization used for when running Lambda functions in the group. Individual Lambda functions can be override this setting.
IsolationMode (string) -- Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.
Functions (list) -- A list of Lambda functions in this function definition version.
(dict) -- Information about a Lambda function.
FunctionArn (string) -- The ARN of the Lambda function.
FunctionConfiguration (dict) -- The configuration of the Lambda function.
EncodingType (string) -- The expected encoding type of the input payload for the function. The default is ''json''.
Environment (dict) -- The environment configuration of the function.
AccessSysfs (boolean) -- If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.
Execution (dict) -- Configuration related to executing the Lambda function
IsolationMode (string) -- Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.
RunAs (dict) -- Specifies the user and/or group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values (ggc_user/ggc_group). We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set IsolationMode to NoContainer and you must update config.json in greengrass-root/config to set allowFunctionsToRunAsRoot to yes.
Gid (integer) -- The Group ID whose permissions are used to run a Lambda function.
Uid (integer) -- The User ID whose permissions are used to run a Lambda function.
ResourceAccessPolicies (list) -- A list of the resources, with their permissions, to which the Lambda function will be granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies apply only when you run the Lambda function in a Greengrass container.
(dict) -- A policy used by the function to access a resource.
Permission (string) -- The permissions that the Lambda function has to the resource. Can be one of ''rw'' (read/write) or ''ro'' (read-only).
ResourceId (string) -- The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)
Variables (dict) -- Environment variables for the Lambda function's configuration.
(string) --
(string) --
ExecArgs (string) -- The execution arguments.
Executable (string) -- The name of the function executable.
MemorySize (integer) -- The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization.
Pinned (boolean) -- True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.
Timeout (integer) -- The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.
Id (string) -- A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
string
The name of the function definition.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }
Response Structure
(dict) --
Arn (string) -- The ARN of the definition.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was created.
Id (string) -- The ID of the definition.
LastUpdatedTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was last updated.
LatestVersion (string) -- The latest version of the definition.
LatestVersionArn (string) -- The ARN of the latest version of the definition.
Name (string) -- The name of the definition.
{'DefaultConfig': {'Execution': {'IsolationMode': 'GreengrassContainer | ' 'NoContainer'}}, 'Functions': {'FunctionConfiguration': {'Environment': {'Execution': {'IsolationMode': 'GreengrassContainer ' '| ' 'NoContainer', 'RunAs': {'Gid': 'integer', 'Uid': 'integer'}}}}}}
Creates a version of a Lambda function definition that has already been defined.
See also: AWS API Documentation
Request Syntax
client.create_function_definition_version( AmznClientToken='string', DefaultConfig={ 'Execution': { 'IsolationMode': 'GreengrassContainer'|'NoContainer' } }, FunctionDefinitionId='string', 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 }, 'Id': 'string' }, ] )
string
A client token used to correlate requests and responses.
dict
Default configuration that will apply to all Lambda functions in this function definition version
Execution (dict) -- Configuration that defines the default containerization used for when running Lambda functions in the group. Individual Lambda functions can be override this setting.
IsolationMode (string) -- Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.
string
[REQUIRED] The ID of the Lambda function definition.
list
A list of Lambda functions in this function definition version.
(dict) -- Information about a Lambda function.
FunctionArn (string) -- The ARN of the Lambda function.
FunctionConfiguration (dict) -- The configuration of the Lambda function.
EncodingType (string) -- The expected encoding type of the input payload for the function. The default is ''json''.
Environment (dict) -- The environment configuration of the function.
AccessSysfs (boolean) -- If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.
Execution (dict) -- Configuration related to executing the Lambda function
IsolationMode (string) -- Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.
RunAs (dict) -- Specifies the user and/or group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values (ggc_user/ggc_group). We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set IsolationMode to NoContainer and you must update config.json in greengrass-root/config to set allowFunctionsToRunAsRoot to yes.
Gid (integer) -- The Group ID whose permissions are used to run a Lambda function.
Uid (integer) -- The User ID whose permissions are used to run a Lambda function.
ResourceAccessPolicies (list) -- A list of the resources, with their permissions, to which the Lambda function will be granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies apply only when you run the Lambda function in a Greengrass container.
(dict) -- A policy used by the function to access a resource.
Permission (string) -- The permissions that the Lambda function has to the resource. Can be one of ''rw'' (read/write) or ''ro'' (read-only).
ResourceId (string) -- The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)
Variables (dict) -- Environment variables for the Lambda function's configuration.
(string) --
(string) --
ExecArgs (string) -- The execution arguments.
Executable (string) -- The name of the function executable.
MemorySize (integer) -- The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization.
Pinned (boolean) -- True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.
Timeout (integer) -- The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.
Id (string) -- A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) --
Arn (string) -- The ARN of the version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the version was created.
Id (string) -- The ID of the version.
Version (string) -- The unique ID of the version.
{'InitialVersion': {'ConnectorDefinitionVersionArn': 'string'}}
Creates a group. You may provide the initial version of the group or use ''CreateGroupVersion'' at a later time. Tip: You can use the ''gg_group_setup'' package (https://github.com/awslabs/aws-greengrass-group-setup) as a library or command-line application to create and deploy Greengrass groups.
See also: AWS API Documentation
Request Syntax
client.create_group( AmznClientToken='string', InitialVersion={ 'ConnectorDefinitionVersionArn': 'string', 'CoreDefinitionVersionArn': 'string', 'DeviceDefinitionVersionArn': 'string', 'FunctionDefinitionVersionArn': 'string', 'LoggerDefinitionVersionArn': 'string', 'ResourceDefinitionVersionArn': 'string', 'SubscriptionDefinitionVersionArn': 'string' }, Name='string' )
string
A client token used to correlate requests and responses.
dict
Information about the initial version of the group.
ConnectorDefinitionVersionArn (string) -- The ARN of the connector definition version for this group.
CoreDefinitionVersionArn (string) -- The ARN of the core definition version for this group.
DeviceDefinitionVersionArn (string) -- The ARN of the device definition version for this group.
FunctionDefinitionVersionArn (string) -- The ARN of the function definition version for this group.
LoggerDefinitionVersionArn (string) -- The ARN of the logger definition version for this group.
ResourceDefinitionVersionArn (string) -- The ARN of the resource definition version for this group.
SubscriptionDefinitionVersionArn (string) -- The ARN of the subscription definition version for this group.
string
The name of the group.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }
Response Structure
(dict) -- Success. The group was created.
Arn (string) -- The ARN of the definition.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was created.
Id (string) -- The ID of the definition.
LastUpdatedTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was last updated.
LatestVersion (string) -- The latest version of the definition.
LatestVersionArn (string) -- The ARN of the latest version of the definition.
Name (string) -- The name of the definition.
{'ConnectorDefinitionVersionArn': 'string'}
Creates a version of a group which has already been defined.
See also: AWS API Documentation
Request Syntax
client.create_group_version( AmznClientToken='string', ConnectorDefinitionVersionArn='string', CoreDefinitionVersionArn='string', DeviceDefinitionVersionArn='string', FunctionDefinitionVersionArn='string', GroupId='string', LoggerDefinitionVersionArn='string', ResourceDefinitionVersionArn='string', SubscriptionDefinitionVersionArn='string' )
string
A client token used to correlate requests and responses.
string
The ARN of the connector definition version for this group.
string
The ARN of the core definition version for this group.
string
The ARN of the device definition version for this group.
string
The ARN of the function definition version for this group.
string
[REQUIRED] The ID of the Greengrass group.
string
The ARN of the logger definition version for this group.
string
The ARN of the resource definition version for this group.
string
The ARN of the subscription definition version for this group.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) -- Success. The response contains information about the group version.
Arn (string) -- The ARN of the version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the version was created.
Id (string) -- The ID of the version.
Version (string) -- The unique ID of the version.
{'InitialVersion': {'Resources': {'ResourceDataContainer': {'SecretsManagerSecretResourceData': {'ARN': 'string', 'AdditionalStagingLabelsToDownload': ['string']}}}}}
Creates a resource definition which contains a list of resources to be used in a group. You can create an initial version of the definition by providing a list of resources now, or use ''CreateResourceDefinitionVersion'' later.
See also: AWS API Documentation
Request Syntax
client.create_resource_definition( AmznClientToken='string', InitialVersion={ 'Resources': [ { 'Id': 'string', 'Name': 'string', 'ResourceDataContainer': { 'LocalDeviceResourceData': { 'GroupOwnerSetting': { 'AutoAddGroupOwner': True|False, 'GroupOwner': 'string' }, 'SourcePath': 'string' }, 'LocalVolumeResourceData': { 'DestinationPath': 'string', 'GroupOwnerSetting': { 'AutoAddGroupOwner': True|False, 'GroupOwner': 'string' }, 'SourcePath': 'string' }, 'S3MachineLearningModelResourceData': { 'DestinationPath': 'string', 'S3Uri': 'string' }, 'SageMakerMachineLearningModelResourceData': { 'DestinationPath': 'string', 'SageMakerJobArn': 'string' }, 'SecretsManagerSecretResourceData': { 'ARN': 'string', 'AdditionalStagingLabelsToDownload': [ 'string', ] } } }, ] }, Name='string' )
string
A client token used to correlate requests and responses.
dict
Information about the initial version of the resource definition.
Resources (list) -- A list of resources.
(dict) -- Information about a resource.
Id (string) -- The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
Name (string) -- The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
ResourceDataContainer (dict) -- A container of data for all resource types.
LocalDeviceResourceData (dict) -- Attributes that define the local device resource.
GroupOwnerSetting (dict) -- Group/owner related settings for local resources.
AutoAddGroupOwner (boolean) -- If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
GroupOwner (string) -- The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
SourcePath (string) -- The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under ''/dev''.
LocalVolumeResourceData (dict) -- Attributes that define the local volume resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
GroupOwnerSetting (dict) -- Allows you to configure additional group privileges for the Lambda process. This field is optional.
AutoAddGroupOwner (boolean) -- If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
GroupOwner (string) -- The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
SourcePath (string) -- The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with ''/sys''.
S3MachineLearningModelResourceData (dict) -- Attributes that define an Amazon S3 machine learning resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
S3Uri (string) -- The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.
SageMakerMachineLearningModelResourceData (dict) -- Attributes that define an Amazon SageMaker machine learning resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
SageMakerJobArn (string) -- The ARN of the Amazon SageMaker training job that represents the source model.
SecretsManagerSecretResourceData (dict) -- Attributes that define a secret resource, which references a secret from AWS Secrets Manager.
ARN (string) -- The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the ''AWSCURRENT'' staging label) is included by default.
AdditionalStagingLabelsToDownload (list) -- Optional. The staging labels whose values you want to make available on the core, in addition to ''AWSCURRENT''.
(string) --
string
The name of the resource definition.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }
Response Structure
(dict) --
Arn (string) -- The ARN of the definition.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was created.
Id (string) -- The ID of the definition.
LastUpdatedTimestamp (string) -- The time, in milliseconds since the epoch, when the definition was last updated.
LatestVersion (string) -- The latest version of the definition.
LatestVersionArn (string) -- The ARN of the latest version of the definition.
Name (string) -- The name of the definition.
{'Resources': {'ResourceDataContainer': {'SecretsManagerSecretResourceData': {'ARN': 'string', 'AdditionalStagingLabelsToDownload': ['string']}}}}
Creates a version of a resource definition that has already been defined.
See also: AWS API Documentation
Request Syntax
client.create_resource_definition_version( AmznClientToken='string', ResourceDefinitionId='string', Resources=[ { 'Id': 'string', 'Name': 'string', 'ResourceDataContainer': { 'LocalDeviceResourceData': { 'GroupOwnerSetting': { 'AutoAddGroupOwner': True|False, 'GroupOwner': 'string' }, 'SourcePath': 'string' }, 'LocalVolumeResourceData': { 'DestinationPath': 'string', 'GroupOwnerSetting': { 'AutoAddGroupOwner': True|False, 'GroupOwner': 'string' }, 'SourcePath': 'string' }, 'S3MachineLearningModelResourceData': { 'DestinationPath': 'string', 'S3Uri': 'string' }, 'SageMakerMachineLearningModelResourceData': { 'DestinationPath': 'string', 'SageMakerJobArn': 'string' }, 'SecretsManagerSecretResourceData': { 'ARN': 'string', 'AdditionalStagingLabelsToDownload': [ 'string', ] } } }, ] )
string
A client token used to correlate requests and responses.
string
[REQUIRED] The ID of the resource definition.
list
A list of resources.
(dict) -- Information about a resource.
Id (string) -- The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
Name (string) -- The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
ResourceDataContainer (dict) -- A container of data for all resource types.
LocalDeviceResourceData (dict) -- Attributes that define the local device resource.
GroupOwnerSetting (dict) -- Group/owner related settings for local resources.
AutoAddGroupOwner (boolean) -- If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
GroupOwner (string) -- The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
SourcePath (string) -- The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under ''/dev''.
LocalVolumeResourceData (dict) -- Attributes that define the local volume resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
GroupOwnerSetting (dict) -- Allows you to configure additional group privileges for the Lambda process. This field is optional.
AutoAddGroupOwner (boolean) -- If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
GroupOwner (string) -- The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
SourcePath (string) -- The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with ''/sys''.
S3MachineLearningModelResourceData (dict) -- Attributes that define an Amazon S3 machine learning resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
S3Uri (string) -- The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.
SageMakerMachineLearningModelResourceData (dict) -- Attributes that define an Amazon SageMaker machine learning resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
SageMakerJobArn (string) -- The ARN of the Amazon SageMaker training job that represents the source model.
SecretsManagerSecretResourceData (dict) -- Attributes that define a secret resource, which references a secret from AWS Secrets Manager.
ARN (string) -- The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the ''AWSCURRENT'' staging label) is included by default.
AdditionalStagingLabelsToDownload (list) -- Optional. The staging labels whose values you want to make available on the core, in addition to ''AWSCURRENT''.
(string) --
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) --
Arn (string) -- The ARN of the version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the version was created.
Id (string) -- The ID of the version.
Version (string) -- The unique ID of the version.
{'Definition': {'DefaultConfig': {'Execution': {'IsolationMode': 'GreengrassContainer ' '| ' 'NoContainer'}}, 'Functions': {'FunctionConfiguration': {'Environment': {'Execution': {'IsolationMode': 'GreengrassContainer ' '| ' 'NoContainer', 'RunAs': {'Gid': 'integer', 'Uid': 'integer'}}}}}}}
Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations.
See also: AWS API Documentation
Request Syntax
client.get_function_definition_version( FunctionDefinitionId='string', FunctionDefinitionVersionId='string', NextToken='string' )
string
[REQUIRED] The ID of the Lambda function definition.
string
[REQUIRED] The ID of the function definition version.
string
The token for the next set of results, or ''null'' if there are no additional results.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Definition': { 'DefaultConfig': { 'Execution': { 'IsolationMode': 'GreengrassContainer'|'NoContainer' } }, '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 }, 'Id': 'string' }, ] }, 'Id': 'string', 'NextToken': 'string', 'Version': 'string' }
Response Structure
(dict) -- success
Arn (string) -- The ARN of the function definition version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the function definition version was created.
Definition (dict) -- Information on the definition.
DefaultConfig (dict) -- Default configuration that will apply to all Lambda functions in this function definition version
Execution (dict) -- Configuration that defines the default containerization used for when running Lambda functions in the group. Individual Lambda functions can be override this setting.
IsolationMode (string) -- Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.
Functions (list) -- A list of Lambda functions in this function definition version.
(dict) -- Information about a Lambda function.
FunctionArn (string) -- The ARN of the Lambda function.
FunctionConfiguration (dict) -- The configuration of the Lambda function.
EncodingType (string) -- The expected encoding type of the input payload for the function. The default is ''json''.
Environment (dict) -- The environment configuration of the function.
AccessSysfs (boolean) -- If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.
Execution (dict) -- Configuration related to executing the Lambda function
IsolationMode (string) -- Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.
RunAs (dict) -- Specifies the user and/or group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values (ggc_user/ggc_group). We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set IsolationMode to NoContainer and you must update config.json in greengrass-root/config to set allowFunctionsToRunAsRoot to yes.
Gid (integer) -- The Group ID whose permissions are used to run a Lambda function.
Uid (integer) -- The User ID whose permissions are used to run a Lambda function.
ResourceAccessPolicies (list) -- A list of the resources, with their permissions, to which the Lambda function will be granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies apply only when you run the Lambda function in a Greengrass container.
(dict) -- A policy used by the function to access a resource.
Permission (string) -- The permissions that the Lambda function has to the resource. Can be one of ''rw'' (read/write) or ''ro'' (read-only).
ResourceId (string) -- The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)
Variables (dict) -- Environment variables for the Lambda function's configuration.
(string) --
(string) --
ExecArgs (string) -- The execution arguments.
Executable (string) -- The name of the function executable.
MemorySize (integer) -- The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization.
Pinned (boolean) -- True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.
Timeout (integer) -- The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.
Id (string) -- A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.
Id (string) -- The ID of the function definition version.
NextToken (string) -- The token for the next set of results, or ''null'' if there are no additional results.
Version (string) -- The version of the function definition version.
{'Definition': {'ConnectorDefinitionVersionArn': 'string'}}
Retrieves information about a group version.
See also: AWS API Documentation
Request Syntax
client.get_group_version( GroupId='string', GroupVersionId='string' )
string
[REQUIRED] The ID of the Greengrass group.
string
[REQUIRED] The ID of the group version.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Definition': { 'ConnectorDefinitionVersionArn': 'string', 'CoreDefinitionVersionArn': 'string', 'DeviceDefinitionVersionArn': 'string', 'FunctionDefinitionVersionArn': 'string', 'LoggerDefinitionVersionArn': 'string', 'ResourceDefinitionVersionArn': 'string', 'SubscriptionDefinitionVersionArn': 'string' }, 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) -- success
Arn (string) -- The ARN of the group version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the group version was created.
Definition (dict) -- Information about the group version definition.
ConnectorDefinitionVersionArn (string) -- The ARN of the connector definition version for this group.
CoreDefinitionVersionArn (string) -- The ARN of the core definition version for this group.
DeviceDefinitionVersionArn (string) -- The ARN of the device definition version for this group.
FunctionDefinitionVersionArn (string) -- The ARN of the function definition version for this group.
LoggerDefinitionVersionArn (string) -- The ARN of the logger definition version for this group.
ResourceDefinitionVersionArn (string) -- The ARN of the resource definition version for this group.
SubscriptionDefinitionVersionArn (string) -- The ARN of the subscription definition version for this group.
Id (string) -- The ID of the group version.
Version (string) -- The unique ID for the version of the group.
{'Definition': {'Resources': {'ResourceDataContainer': {'SecretsManagerSecretResourceData': {'ARN': 'string', 'AdditionalStagingLabelsToDownload': ['string']}}}}}
Retrieves information about a resource definition version, including which resources are included in the version.
See also: AWS API Documentation
Request Syntax
client.get_resource_definition_version( ResourceDefinitionId='string', ResourceDefinitionVersionId='string' )
string
[REQUIRED] The ID of the resource definition.
string
[REQUIRED] The ID of the resource definition version.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Definition': { 'Resources': [ { 'Id': 'string', 'Name': 'string', 'ResourceDataContainer': { 'LocalDeviceResourceData': { 'GroupOwnerSetting': { 'AutoAddGroupOwner': True|False, 'GroupOwner': 'string' }, 'SourcePath': 'string' }, 'LocalVolumeResourceData': { 'DestinationPath': 'string', 'GroupOwnerSetting': { 'AutoAddGroupOwner': True|False, 'GroupOwner': 'string' }, 'SourcePath': 'string' }, 'S3MachineLearningModelResourceData': { 'DestinationPath': 'string', 'S3Uri': 'string' }, 'SageMakerMachineLearningModelResourceData': { 'DestinationPath': 'string', 'SageMakerJobArn': 'string' }, 'SecretsManagerSecretResourceData': { 'ARN': 'string', 'AdditionalStagingLabelsToDownload': [ 'string', ] } } }, ] }, 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) -- success
Arn (string) -- Arn of the resource definition version.
CreationTimestamp (string) -- The time, in milliseconds since the epoch, when the resource definition version was created.
Definition (dict) -- Information about the definition.
Resources (list) -- A list of resources.
(dict) -- Information about a resource.
Id (string) -- The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
Name (string) -- The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''[a-zA-Z0-9:_-]+''. This must be unique within a Greengrass group.
ResourceDataContainer (dict) -- A container of data for all resource types.
LocalDeviceResourceData (dict) -- Attributes that define the local device resource.
GroupOwnerSetting (dict) -- Group/owner related settings for local resources.
AutoAddGroupOwner (boolean) -- If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
GroupOwner (string) -- The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
SourcePath (string) -- The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under ''/dev''.
LocalVolumeResourceData (dict) -- Attributes that define the local volume resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
GroupOwnerSetting (dict) -- Allows you to configure additional group privileges for the Lambda process. This field is optional.
AutoAddGroupOwner (boolean) -- If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group.
GroupOwner (string) -- The name of the Linux OS group whose privileges will be added to the Lambda process. This field is optional.
SourcePath (string) -- The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with ''/sys''.
S3MachineLearningModelResourceData (dict) -- Attributes that define an Amazon S3 machine learning resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
S3Uri (string) -- The URI of the source model in an S3 bucket. The model package must be in tar.gz or .zip format.
SageMakerMachineLearningModelResourceData (dict) -- Attributes that define an Amazon SageMaker machine learning resource.
DestinationPath (string) -- The absolute local path of the resource inside the Lambda environment.
SageMakerJobArn (string) -- The ARN of the Amazon SageMaker training job that represents the source model.
SecretsManagerSecretResourceData (dict) -- Attributes that define a secret resource, which references a secret from AWS Secrets Manager.
ARN (string) -- The ARN of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the ''AWSCURRENT'' staging label) is included by default.
AdditionalStagingLabelsToDownload (list) -- Optional. The staging labels whose values you want to make available on the core, in addition to ''AWSCURRENT''.
(string) --
Id (string) -- The ID of the resource definition version.
Version (string) -- The version of the resource definition version.