function_definition_versions
Creates, updates, deletes, gets or lists a function_definition_versions resource.
Overview
| Name | function_definition_versions |
| Type | Resource |
| Id | aws.greengrass.function_definition_versions |
Fields
The following fields are returned by SELECT queries:
- get_function_definition_version
- list_function_definition_versions
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the function definition version. |
creation_timestamp | string | The time, in milliseconds since the epoch, when the function definition version was created. |
definition | object | Information about a function definition version. |
id | string | The ID of the function definition version. |
next_token | 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. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the version. |
creation_timestamp | string | The time, in milliseconds since the epoch, when the version was created. |
id | string | The ID of the parent definition that the version is associated with. |
version | string | The ID of the version. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_function_definition_version | select | function_definition_id, function_definition_version_id, region | NextToken | Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations. |
list_function_definition_versions | select | function_definition_id, region | MaxResults, NextToken | Lists the versions of a Lambda function definition. |
create_function_definition_version | insert | function_definition_id, region | X-Amzn-Client-Token | Creates a version of a Lambda function definition that has already been defined. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
function_definition_id | string | The ID of the Lambda function definition. |
function_definition_version_id | string | The ID of the function definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListFunctionDefinitionVersions'' requests. If the version is the last one that was associated with a function definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object. |
region | string | AWS region (default: us-east-1) |
MaxResults | string | The maximum number of results to be returned per request. |
NextToken | string | The token for the next set of results, or ''null'' if there are no additional results. |
X-Amzn-Client-Token | string | A client token used to correlate requests and responses. |
SELECT examples
- get_function_definition_version
- list_function_definition_versions
Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations.
SELECT
arn,
creation_timestamp,
definition,
id,
next_token,
version
FROM aws.greengrass.function_definition_versions
WHERE function_definition_id = '{{ function_definition_id }}' -- required
AND function_definition_version_id = '{{ function_definition_version_id }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
;
Lists the versions of a Lambda function definition.
SELECT
arn,
creation_timestamp,
id,
version
FROM aws.greengrass.function_definition_versions
WHERE function_definition_id = '{{ function_definition_id }}' -- required
AND region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_function_definition_version
- Manifest
Creates a version of a Lambda function definition that has already been defined.
INSERT INTO aws.greengrass.function_definition_versions (
DefaultConfig,
Functions,
function_definition_id,
region,
`X-Amzn-Client-Token`
)
SELECT
'{{ DefaultConfig }}',
'{{ Functions }}',
'{{ function_definition_id }}',
'{{ region }}',
'{{ X-Amzn-Client-Token }}'
RETURNING
arn,
creation_timestamp,
id,
version
;
# Description fields are for documentation purposes
- name: function_definition_versions
props:
- name: function_definition_id
value: "{{ function_definition_id }}"
description: Required parameter for the function_definition_versions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the function_definition_versions resource.
- name: DefaultConfig
description: |
The default configuration that applies to all Lambda functions in the group. Individual Lambda functions can override these settings.
value:
Execution:
IsolationMode: "{{ IsolationMode }}"
RunAs:
Gid: {{ Gid }}
Uid: {{ Uid }}
- name: Functions
value:
- FunctionArn: "{{ FunctionArn }}"
FunctionConfiguration:
EncodingType: "{{ EncodingType }}"
Environment:
AccessSysfs: {{ AccessSysfs }}
Execution:
IsolationMode: "{{ IsolationMode }}"
RunAs:
Gid: {{ Gid }}
Uid: {{ Uid }}
ResourceAccessPolicies:
- Permission: "{{ Permission }}"
ResourceId: "{{ ResourceId }}"
Variables: "{{ Variables }}"
ExecArgs: "{{ ExecArgs }}"
Executable: "{{ Executable }}"
MemorySize: {{ MemorySize }}
Pinned: {{ Pinned }}
Timeout: {{ Timeout }}
FunctionRuntimeOverride: "{{ FunctionRuntimeOverride }}"
Id: "{{ Id }}"
- name: X-Amzn-Client-Token
value: "{{ X-Amzn-Client-Token }}"
description: A client token used to correlate requests and responses.
description: A client token used to correlate requests and responses.