core_definitions
Creates, updates, deletes, gets or lists a core_definitions resource.
Overview
| Name | core_definitions |
| Type | Resource |
| Id | aws.greengrass.core_definitions |
Fields
The following fields are returned by SELECT queries:
- get_core_definition
- list_core_definitions
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the definition. |
creation_timestamp | string | The time, in milliseconds since the epoch, when the definition was created. |
id | string | The ID of the definition. |
last_updated_timestamp | string | The time, in milliseconds since the epoch, when the definition was last updated. |
latest_version | string | The ID of the latest version associated with the definition. |
latest_version_arn | string | The ARN of the latest version associated with the definition. |
name | string | The name of the definition. |
tags | object | Tag(s) attached to the resource arn. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the definition. |
creation_timestamp | string | The time, in milliseconds since the epoch, when the definition was created. |
id | string | The ID of the definition. |
last_updated_timestamp | string | The time, in milliseconds since the epoch, when the definition was last updated. |
latest_version | string | The ID of the latest version associated with the definition. |
latest_version_arn | string | The ARN of the latest version associated with the definition. |
name | string | The name of the definition. |
tags | object | Tag(s) attached to the resource arn. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_core_definition | select | core_definition_id, region | Retrieves information about a core definition version. | |
list_core_definitions | select | region | MaxResults, NextToken | Retrieves a list of core definitions. |
create_core_definition | insert | region | X-Amzn-Client-Token | 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. |
update_core_definition | update | core_definition_id, region | Updates a core definition. | |
delete_core_definition | delete | core_definition_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
core_definition_id | string | The ID of the core definition. |
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_core_definition
- list_core_definitions
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
;
Retrieves a list of core definitions.
SELECT
arn,
creation_timestamp,
id,
last_updated_timestamp,
latest_version,
latest_version_arn,
name,
tags
FROM aws.greengrass.core_definitions
WHERE region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_core_definition
- Manifest
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
;
# Description fields are for documentation purposes
- name: core_definitions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the core_definitions resource.
- name: InitialVersion
description: |
Information about a core definition version.
value:
Cores:
- CertificateArn: "{{ CertificateArn }}"
Id: "{{ Id }}"
SyncShadow: {{ SyncShadow }}
ThingArn: "{{ ThingArn }}"
- name: Name
value: "{{ Name }}"
- name: tags
value: "{{ tags }}"
description: |
The key-value pair for the resource tag.
- 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.
UPDATE examples
- update_core_definition
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
- delete_core_definition
Deletes a core definition.
DELETE FROM aws.greengrass.core_definitions
WHERE core_definition_id = '{{ core_definition_id }}' --required
AND region = '{{ region }}' --required
;