Skip to main content

core_definitions

Creates, updates, deletes, gets or lists a core_definitions resource.

Overview

Namecore_definitions
TypeResource
Idaws.greengrass.core_definitions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN of the definition.
creation_timestampstringThe time, in milliseconds since the epoch, when the definition was created.
idstringThe ID of the definition.
last_updated_timestampstringThe time, in milliseconds since the epoch, when the definition was last updated.
latest_versionstringThe ID of the latest version associated with the definition.
latest_version_arnstringThe ARN of the latest version associated with the definition.
namestringThe name of the definition.
tagsobjectTag(s) attached to the resource arn.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_core_definitionselectcore_definition_id, regionRetrieves information about a core definition version.
list_core_definitionsselectregionMaxResults, NextTokenRetrieves a list of core definitions.
create_core_definitioninsertregionX-Amzn-Client-TokenCreates a core definition. You may provide the initial version of the core definition now or use ''CreateCoreDefinitionVersion'' at a later time. Greengrass groups must each contain exactly one Greengrass core.
update_core_definitionupdatecore_definition_id, regionUpdates a core definition.
delete_core_definitiondeletecore_definition_id, regionDeletes a core definition.

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.

NameDatatypeDescription
core_definition_idstringThe ID of the core definition.
regionstringAWS region (default: us-east-1)
MaxResultsstringThe maximum number of results to be returned per request.
NextTokenstringThe token for the next set of results, or ''null'' if there are no additional results.
X-Amzn-Client-TokenstringA client token used to correlate requests and responses.

SELECT examples

Retrieves information about a core definition version.

SELECT
arn,
creation_timestamp,
id,
last_updated_timestamp,
latest_version,
latest_version_arn,
name,
tags
FROM aws.greengrass.core_definitions
WHERE core_definition_id = '{{ core_definition_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a core definition. You may provide the initial version of the core definition now or use ''CreateCoreDefinitionVersion'' at a later time. Greengrass groups must each contain exactly one Greengrass core.

INSERT INTO aws.greengrass.core_definitions (
InitialVersion,
Name,
tags,
region,
`X-Amzn-Client-Token`
)
SELECT
'{{ InitialVersion }}',
'{{ Name }}',
'{{ tags }}',
'{{ region }}',
'{{ X-Amzn-Client-Token }}'
RETURNING
arn,
creation_timestamp,
id,
last_updated_timestamp,
latest_version,
latest_version_arn,
name
;

UPDATE examples

Updates a core definition.

UPDATE aws.greengrass.core_definitions
SET
Name = '{{ Name }}'
WHERE
core_definition_id = '{{ core_definition_id }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes a core definition.

DELETE FROM aws.greengrass.core_definitions
WHERE core_definition_id = '{{ core_definition_id }}' --required
AND region = '{{ region }}' --required
;