2017/11/29 - AWS Greengrass - 9 new 6 updated api methods
Changes Greengrass OTA feature allows updating Greengrass Core and Greengrass OTA Agent. Local Resource Access feature allows Greengrass Lambdas to access local resources such as peripheral devices and volumes.
Retrieves information about a resource definition, such as its creation time and latest version.
See also: AWS API Documentation
Request Syntax
client.get_resource_definition( ResourceDefinitionId='string' )
string
[REQUIRED] Resource definition Id.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }
Response Structure
(dict) -- 200 response
Arn (string) -- Arn of the definition.
CreationTimestamp (string) -- Timestamp of when the definition was created.
Id (string) -- Id of the definition.
LastUpdatedTimestamp (string) -- Last updated timestamp of the definition.
LatestVersion (string) -- Last version of the definition.
LatestVersionArn (string) -- Latest version arn of the definition.
Name (string) -- Name of the definition.
Retrieves a list of resource definitions.
See also: AWS API Documentation
Request Syntax
client.list_resource_definitions( MaxResults='string', NextToken='string' )
string
Specifies the maximum number of list results to be returned in this page
string
Specifies the pagination token used when iterating through a paginated request
dict
Response Syntax
{ 'Definitions': [ { 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) -- The Ids of all the Greengrass Resource Definitions in this account.
Definitions (list) -- Definitions
(dict) -- Information on the Definition
Arn (string) -- Arn of the definition.
CreationTimestamp (string) -- Timestamp of when the definition was created.
Id (string) -- Id of the definition.
LastUpdatedTimestamp (string) -- Last updated timestamp of the definition.
LatestVersion (string) -- Last version of the definition.
LatestVersionArn (string) -- Latest version arn of the definition.
Name (string) -- Name of the definition.
NextToken (string) -- The token for the next set of results, or ''null'' if there are no additional results.
Creates an Iot Job that will trigger your Greengrass Cores to update the software they are running.
See also: AWS API Documentation
Request Syntax
client.create_software_update_job( AmznClientToken='string', S3UrlSignerRole='string', SoftwareToUpdate='core'|'ota_agent', UpdateAgentLogLevel='NONE'|'TRACE'|'DEBUG'|'VERBOSE'|'INFO'|'WARN'|'ERROR'|'FATAL', UpdateTargets=[ 'string', ], UpdateTargetsArchitecture='armv7l'|'x86_64'|'aarch64', UpdateTargetsOperatingSystem='ubuntu'|'raspbian'|'amazon_linux' )
string
The client token used to request idempotent operations.
string
The IAM Role that Greengrass will use to create pre-signed URLs pointing towards the update artifact.
string
The piece of software on the Greengrass Core that will be updated.
string
The minimum level of log statements that should be logged by the OTA Agent during an update.
list
The target arns that this update will be applied to.
(string) --
string
The architecture of the Cores in the targets of an update
string
The operating system of the Cores in the targets of an update
dict
Response Syntax
{ 'IotJobArn': 'string', 'IotJobId': 'string' }
Response Structure
(dict) -- 200 response
IotJobArn (string) -- The Iot Job Arn corresponding to this update.
IotJobId (string) -- The Iot Job Id corresponding to this update.
Deletes a resource definition.
See also: AWS API Documentation
Request Syntax
client.delete_resource_definition( ResourceDefinitionId='string' )
string
[REQUIRED] Resource definition Id.
dict
Response Syntax
{}
Response Structure
(dict) -- 200 response
Retrieves information about a resource definition version, such as 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] Resource definition Id.
string
[REQUIRED] Resource definition version Id.
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' } } }, ] }, 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) -- 200 response
Arn (string) -- Arn of the resource definition version.
CreationTimestamp (string) -- Timestamp of when the resource definition version was created.
Definition (dict) -- Information on definition.
Resources (list) -- List of resources.
(dict) -- Information on the resource.
Id (string) -- Resource Id.
Name (string) -- A descriptive resource name.
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) -- Eanble the auto added group owner.
GroupOwner (string) -- Name of the group owner.
SourcePath (string) -- Local source path of the resource.
LocalVolumeResourceData (dict) -- Attributes that define the Local Volume Resource.
DestinationPath (string) -- Local destination path of the resource.
GroupOwnerSetting (dict) -- Group owner related settings for local resources.
AutoAddGroupOwner (boolean) -- Eanble the auto added group owner.
GroupOwner (string) -- Name of the group owner.
SourcePath (string) -- Local source path of the resource.
Id (string) -- Id of the resource definition the version belongs to.
Version (string) -- Version of the resource definition version.
Create 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' } } }, ] )
string
The client token used to request idempotent operations.
string
[REQUIRED] Resource definition Id.
list
List of resources.
(dict) -- Information on the resource.
Id (string) -- Resource Id.
Name (string) -- A descriptive resource name.
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) -- Eanble the auto added group owner.
GroupOwner (string) -- Name of the group owner.
SourcePath (string) -- Local source path of the resource.
LocalVolumeResourceData (dict) -- Attributes that define the Local Volume Resource.
DestinationPath (string) -- Local destination path of the resource.
GroupOwnerSetting (dict) -- Group owner related settings for local resources.
AutoAddGroupOwner (boolean) -- Eanble the auto added group owner.
GroupOwner (string) -- Name of the group owner.
SourcePath (string) -- Local source path of the resource.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) --
Arn (string) -- Arn of the version.
CreationTimestamp (string) -- Timestamp of when the version was created.
Id (string) -- Id of the resource container.
Version (string) -- Unique Id of a version.
Updates a resource definition.
See also: AWS API Documentation
Request Syntax
client.update_resource_definition( Name='string', ResourceDefinitionId='string' )
string
name of the definition
string
[REQUIRED] Resource definition Id.
dict
Response Syntax
{}
Response Structure
(dict) -- 200 response
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' } } }, ] }, Name='string' )
string
The client token used to request idempotent operations.
dict
Information on the initial version
Resources (list) -- List of resources.
(dict) -- Information on the resource.
Id (string) -- Resource Id.
Name (string) -- A descriptive resource name.
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) -- Eanble the auto added group owner.
GroupOwner (string) -- Name of the group owner.
SourcePath (string) -- Local source path of the resource.
LocalVolumeResourceData (dict) -- Attributes that define the Local Volume Resource.
DestinationPath (string) -- Local destination path of the resource.
GroupOwnerSetting (dict) -- Group owner related settings for local resources.
AutoAddGroupOwner (boolean) -- Eanble the auto added group owner.
GroupOwner (string) -- Name of the group owner.
SourcePath (string) -- Local source path of the resource.
string
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) -- Arn of the definition.
CreationTimestamp (string) -- Timestamp of when the definition was created.
Id (string) -- Id of the definition.
LastUpdatedTimestamp (string) -- Last updated timestamp of the definition.
LatestVersion (string) -- Last version of the definition.
LatestVersionArn (string) -- Latest version arn of the definition.
Name (string) -- Name of the definition.
Lists the versions of a resource definition.
See also: AWS API Documentation
Request Syntax
client.list_resource_definition_versions( MaxResults='string', NextToken='string', ResourceDefinitionId='string' )
string
Specifies the maximum number of list results to be returned in this page
string
Specifies the pagination token used when iterating through a paginated request
string
[REQUIRED] Resource definition Id.
dict
Response Syntax
{ 'NextToken': 'string', 'Versions': [ { 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }, ] }
Response Structure
(dict) -- 200 response
NextToken (string) -- The token for the next set of results, or ''null'' if there are no additional results.
Versions (list) -- Versions
(dict) -- Information on the version
Arn (string) -- Arn of the version.
CreationTimestamp (string) -- Timestamp of when the version was created.
Id (string) -- Id of the resource container.
Version (string) -- Unique Id of a version.
{'InitialVersion': {'Functions': {'FunctionConfiguration': {'Environment': {'AccessSysfs': 'boolean', 'ResourceAccessPolicies': [{'Permission': 'ro ' '| ' 'rw', 'ResourceId': 'string'}]}}}}}
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={ 'Functions': [ { 'FunctionArn': 'string', 'FunctionConfiguration': { 'Environment': { 'AccessSysfs': True|False, '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
The client token used to request idempotent operations.
dict
Information on the initial version
Functions (list) -- Lambda functions in this function definition version.
(dict) -- Information on function
FunctionArn (string) -- Arn of the Lambda function.
FunctionConfiguration (dict) -- Configuration of the function
Environment (dict) -- Environment of the function configuration
AccessSysfs (boolean) -- Flag to allow lambda access sys filesystem.
ResourceAccessPolicies (list) -- Policies for the function to access resources.
(dict) -- Policy for the function to access a resource.
Permission (string) -- The function's access permission to the resource.
ResourceId (string) -- Id of the resource. A reference to the resource definiton.
Variables (dict) -- Environment variables for the lambda function.
(string) --
(string) --
ExecArgs (string) -- Execution Arguments
Executable (string) -- Executable
MemorySize (integer) -- The memory size, in KB, you configured for the function.
Pinned (boolean) -- Whether the function is pinned or not. Pinned means the function is long-lived and starts when the core starts.
Timeout (integer) -- The function execution time at which Lambda should terminate the function. This timeout still applies to pinned lambdas for each request.
Id (string) -- Id of the function in this version.
string
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) -- Arn of the definition.
CreationTimestamp (string) -- Timestamp of when the definition was created.
Id (string) -- Id of the definition.
LastUpdatedTimestamp (string) -- Last updated timestamp of the definition.
LatestVersion (string) -- Last version of the definition.
LatestVersionArn (string) -- Latest version arn of the definition.
Name (string) -- Name of the definition.
{'Functions': {'FunctionConfiguration': {'Environment': {'AccessSysfs': 'boolean', 'ResourceAccessPolicies': [{'Permission': 'ro ' '| ' 'rw', 'ResourceId': 'string'}]}}}}
Create 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', FunctionDefinitionId='string', Functions=[ { 'FunctionArn': 'string', 'FunctionConfiguration': { 'Environment': { 'AccessSysfs': True|False, 'ResourceAccessPolicies': [ { 'Permission': 'ro'|'rw', 'ResourceId': 'string' }, ], 'Variables': { 'string': 'string' } }, 'ExecArgs': 'string', 'Executable': 'string', 'MemorySize': 123, 'Pinned': True|False, 'Timeout': 123 }, 'Id': 'string' }, ] )
string
The client token used to request idempotent operations.
string
[REQUIRED] the unique Id of the lambda definition
list
Lambda functions in this function definition version.
(dict) -- Information on function
FunctionArn (string) -- Arn of the Lambda function.
FunctionConfiguration (dict) -- Configuration of the function
Environment (dict) -- Environment of the function configuration
AccessSysfs (boolean) -- Flag to allow lambda access sys filesystem.
ResourceAccessPolicies (list) -- Policies for the function to access resources.
(dict) -- Policy for the function to access a resource.
Permission (string) -- The function's access permission to the resource.
ResourceId (string) -- Id of the resource. A reference to the resource definiton.
Variables (dict) -- Environment variables for the lambda function.
(string) --
(string) --
ExecArgs (string) -- Execution Arguments
Executable (string) -- Executable
MemorySize (integer) -- The memory size, in KB, you configured for the function.
Pinned (boolean) -- Whether the function is pinned or not. Pinned means the function is long-lived and starts when the core starts.
Timeout (integer) -- The function execution time at which Lambda should terminate the function. This timeout still applies to pinned lambdas for each request.
Id (string) -- Id of the function in this version.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) --
Arn (string) -- Arn of the version.
CreationTimestamp (string) -- Timestamp of when the version was created.
Id (string) -- Id of the resource container.
Version (string) -- Unique Id of a version.
{'InitialVersion': {'ResourceDefinitionVersionArn': 'string'}}
Creates a group. You may optionally provide the initial version of the group or use ''CreateGroupVersion'' at a later time.
See also: AWS API Documentation
Request Syntax
client.create_group( AmznClientToken='string', InitialVersion={ 'CoreDefinitionVersionArn': 'string', 'DeviceDefinitionVersionArn': 'string', 'FunctionDefinitionVersionArn': 'string', 'LoggerDefinitionVersionArn': 'string', 'ResourceDefinitionVersionArn': 'string', 'SubscriptionDefinitionVersionArn': 'string' }, Name='string' )
string
The client token used to request idempotent operations.
dict
Information on the initial version
CoreDefinitionVersionArn (string) -- Core definition version arn for this group.
DeviceDefinitionVersionArn (string) -- Device definition version arn for this group.
FunctionDefinitionVersionArn (string) -- Function definition version arn for this group.
LoggerDefinitionVersionArn (string) -- Logger definition version arn for this group.
ResourceDefinitionVersionArn (string) -- Resource definition version arn for this group.
SubscriptionDefinitionVersionArn (string) -- Subscription definition version arn for this group.
string
name of the group
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'LastUpdatedTimestamp': 'string', 'LatestVersion': 'string', 'LatestVersionArn': 'string', 'Name': 'string' }
Response Structure
(dict) -- Group created successfully
Arn (string) -- Arn of the definition.
CreationTimestamp (string) -- Timestamp of when the definition was created.
Id (string) -- Id of the definition.
LastUpdatedTimestamp (string) -- Last updated timestamp of the definition.
LatestVersion (string) -- Last version of the definition.
LatestVersionArn (string) -- Latest version arn of the definition.
Name (string) -- Name of the definition.
{'ResourceDefinitionVersionArn': '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', CoreDefinitionVersionArn='string', DeviceDefinitionVersionArn='string', FunctionDefinitionVersionArn='string', GroupId='string', LoggerDefinitionVersionArn='string', ResourceDefinitionVersionArn='string', SubscriptionDefinitionVersionArn='string' )
string
The client token used to request idempotent operations.
string
Core definition version arn for this group.
string
Device definition version arn for this group.
string
Function definition version arn for this group.
string
[REQUIRED] The unique Id of the AWS Greengrass Group
string
Logger definition version arn for this group.
string
Resource definition version arn for this group.
string
Subscription definition version arn for this group.
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) -- the requested version of the Group
Arn (string) -- Arn of the version.
CreationTimestamp (string) -- Timestamp of when the version was created.
Id (string) -- Id of the resource container.
Version (string) -- Unique Id of a version.
{'Definition': {'Functions': {'FunctionConfiguration': {'Environment': {'AccessSysfs': 'boolean', 'ResourceAccessPolicies': [{'Permission': 'ro ' '| ' 'rw', 'ResourceId': 'string'}]}}}}}
Retrieves information about a Lambda function definition version, such as 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' )
string
[REQUIRED] the unique Id of the lambda definition
string
[REQUIRED] Function definition version Id
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Definition': { 'Functions': [ { 'FunctionArn': 'string', 'FunctionConfiguration': { 'Environment': { 'AccessSysfs': True|False, 'ResourceAccessPolicies': [ { 'Permission': 'ro'|'rw', 'ResourceId': 'string' }, ], 'Variables': { 'string': 'string' } }, 'ExecArgs': 'string', 'Executable': 'string', 'MemorySize': 123, 'Pinned': True|False, 'Timeout': 123 }, 'Id': 'string' }, ] }, 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) -- 200 response
Arn (string) -- Arn of the function definition version.
CreationTimestamp (string) -- Timestamp when the funtion definition version was created.
Definition (dict) -- Information on the definition
Functions (list) -- Lambda functions in this function definition version.
(dict) -- Information on function
FunctionArn (string) -- Arn of the Lambda function.
FunctionConfiguration (dict) -- Configuration of the function
Environment (dict) -- Environment of the function configuration
AccessSysfs (boolean) -- Flag to allow lambda access sys filesystem.
ResourceAccessPolicies (list) -- Policies for the function to access resources.
(dict) -- Policy for the function to access a resource.
Permission (string) -- The function's access permission to the resource.
ResourceId (string) -- Id of the resource. A reference to the resource definiton.
Variables (dict) -- Environment variables for the lambda function.
(string) --
(string) --
ExecArgs (string) -- Execution Arguments
Executable (string) -- Executable
MemorySize (integer) -- The memory size, in KB, you configured for the function.
Pinned (boolean) -- Whether the function is pinned or not. Pinned means the function is long-lived and starts when the core starts.
Timeout (integer) -- The function execution time at which Lambda should terminate the function. This timeout still applies to pinned lambdas for each request.
Id (string) -- Id of the function in this version.
Id (string) -- Id of the function definition the version belongs to.
Version (string) -- Version of the function definition version.
{'Definition': {'ResourceDefinitionVersionArn': '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 unique Id of the AWS Greengrass Group
string
[REQUIRED] Group version Id
dict
Response Syntax
{ 'Arn': 'string', 'CreationTimestamp': 'string', 'Definition': { 'CoreDefinitionVersionArn': 'string', 'DeviceDefinitionVersionArn': 'string', 'FunctionDefinitionVersionArn': 'string', 'LoggerDefinitionVersionArn': 'string', 'ResourceDefinitionVersionArn': 'string', 'SubscriptionDefinitionVersionArn': 'string' }, 'Id': 'string', 'Version': 'string' }
Response Structure
(dict) -- 200 response
Arn (string) -- Arn of the group version.
CreationTimestamp (string) -- Timestamp when the group version was created.
Definition (dict) -- Information on the definition
CoreDefinitionVersionArn (string) -- Core definition version arn for this group.
DeviceDefinitionVersionArn (string) -- Device definition version arn for this group.
FunctionDefinitionVersionArn (string) -- Function definition version arn for this group.
LoggerDefinitionVersionArn (string) -- Logger definition version arn for this group.
ResourceDefinitionVersionArn (string) -- Resource definition version arn for this group.
SubscriptionDefinitionVersionArn (string) -- Subscription definition version arn for this group.
Id (string) -- Id of the group version.
Version (string) -- Unique Id for a version of the Group.