AWS Greengrass

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.

CreateResourceDefinitionVersion (new) Link ¶

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'
                }
            }
        },
    ]
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type ResourceDefinitionId

string

param ResourceDefinitionId

[REQUIRED] Resource definition Id.

type Resources

list

param Resources

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.

rtype

dict

returns

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.

DeleteResourceDefinition (new) Link ¶

Deletes a resource definition.

See also: AWS API Documentation

Request Syntax

client.delete_resource_definition(
    ResourceDefinitionId='string'
)
type ResourceDefinitionId

string

param ResourceDefinitionId

[REQUIRED] Resource definition Id.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) -- 200 response

ListResourceDefinitionVersions (new) Link ¶

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'
)
type MaxResults

string

param MaxResults

Specifies the maximum number of list results to be returned in this page

type NextToken

string

param NextToken

Specifies the pagination token used when iterating through a paginated request

type ResourceDefinitionId

string

param ResourceDefinitionId

[REQUIRED] Resource definition Id.

rtype

dict

returns

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.

CreateResourceDefinition (new) Link ¶

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'
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type InitialVersion

dict

param InitialVersion

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.

type Name

string

param Name

Name of the resource definition

rtype

dict

returns

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.

CreateSoftwareUpdateJob (new) Link ¶

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'
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type S3UrlSignerRole

string

param S3UrlSignerRole

The IAM Role that Greengrass will use to create pre-signed URLs pointing towards the update artifact.

type SoftwareToUpdate

string

param SoftwareToUpdate

The piece of software on the Greengrass Core that will be updated.

type UpdateAgentLogLevel

string

param UpdateAgentLogLevel

The minimum level of log statements that should be logged by the OTA Agent during an update.

type UpdateTargets

list

param UpdateTargets

The target arns that this update will be applied to.

  • (string) --

type UpdateTargetsArchitecture

string

param UpdateTargetsArchitecture

The architecture of the Cores in the targets of an update

type UpdateTargetsOperatingSystem

string

param UpdateTargetsOperatingSystem

The operating system of the Cores in the targets of an update

rtype

dict

returns

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.

GetResourceDefinition (new) Link ¶

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'
)
type ResourceDefinitionId

string

param ResourceDefinitionId

[REQUIRED] Resource definition Id.

rtype

dict

returns

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.

GetResourceDefinitionVersion (new) Link ¶

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'
)
type ResourceDefinitionId

string

param ResourceDefinitionId

[REQUIRED] Resource definition Id.

type ResourceDefinitionVersionId

string

param ResourceDefinitionVersionId

[REQUIRED] Resource definition version Id.

rtype

dict

returns

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.

UpdateResourceDefinition (new) Link ¶

Updates a resource definition.

See also: AWS API Documentation

Request Syntax

client.update_resource_definition(
    Name='string',
    ResourceDefinitionId='string'
)
type Name

string

param Name

name of the definition

type ResourceDefinitionId

string

param ResourceDefinitionId

[REQUIRED] Resource definition Id.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) -- 200 response

ListResourceDefinitions (new) Link ¶

Retrieves a list of resource definitions.

See also: AWS API Documentation

Request Syntax

client.list_resource_definitions(
    MaxResults='string',
    NextToken='string'
)
type MaxResults

string

param MaxResults

Specifies the maximum number of list results to be returned in this page

type NextToken

string

param NextToken

Specifies the pagination token used when iterating through a paginated request

rtype

dict

returns

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.

CreateFunctionDefinition (updated) Link ¶
Changes (request)
{'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'
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type InitialVersion

dict

param InitialVersion

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.

type Name

string

param Name

name of the function definition

rtype

dict

returns

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.

CreateFunctionDefinitionVersion (updated) Link ¶
Changes (request)
{'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'
        },
    ]
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type FunctionDefinitionId

string

param FunctionDefinitionId

[REQUIRED] the unique Id of the lambda definition

type Functions

list

param Functions

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.

rtype

dict

returns

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.

CreateGroup (updated) Link ¶
Changes (request)
{'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'
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type InitialVersion

dict

param InitialVersion

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.

type Name

string

param Name

name of the group

rtype

dict

returns

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.

CreateGroupVersion (updated) Link ¶
Changes (request)
{'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'
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type CoreDefinitionVersionArn

string

param CoreDefinitionVersionArn

Core definition version arn for this group.

type DeviceDefinitionVersionArn

string

param DeviceDefinitionVersionArn

Device definition version arn for this group.

type FunctionDefinitionVersionArn

string

param FunctionDefinitionVersionArn

Function definition version arn for this group.

type GroupId

string

param GroupId

[REQUIRED] The unique Id of the AWS Greengrass Group

type LoggerDefinitionVersionArn

string

param LoggerDefinitionVersionArn

Logger definition version arn for this group.

type ResourceDefinitionVersionArn

string

param ResourceDefinitionVersionArn

Resource definition version arn for this group.

type SubscriptionDefinitionVersionArn

string

param SubscriptionDefinitionVersionArn

Subscription definition version arn for this group.

rtype

dict

returns

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.

GetFunctionDefinitionVersion (updated) Link ¶
Changes (response)
{'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'
)
type FunctionDefinitionId

string

param FunctionDefinitionId

[REQUIRED] the unique Id of the lambda definition

type FunctionDefinitionVersionId

string

param FunctionDefinitionVersionId

[REQUIRED] Function definition version Id

rtype

dict

returns

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.

GetGroupVersion (updated) Link ¶
Changes (response)
{'Definition': {'ResourceDefinitionVersionArn': 'string'}}

Retrieves information about a group version.

See also: AWS API Documentation

Request Syntax

client.get_group_version(
    GroupId='string',
    GroupVersionId='string'
)
type GroupId

string

param GroupId

[REQUIRED] The unique Id of the AWS Greengrass Group

type GroupVersionId

string

param GroupVersionId

[REQUIRED] Group version Id

rtype

dict

returns

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.