resource_definitions
Creates, updates, deletes, gets or lists a resource_definitions resource.
Overview
| Name | resource_definitions |
| Type | Resource |
| Id | aws.greengrass.resource_definitions |
Fields
The following fields are returned by SELECT queries:
- get_resource_definition
- list_resource_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_resource_definition | select | resource_definition_id, region | Retrieves information about a resource definition, including its creation time and latest version. | |
list_resource_definitions | select | region | MaxResults, NextToken | Retrieves a list of resource definitions. |
create_resource_definition | insert | region | X-Amzn-Client-Token | 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. |
update_resource_definition | update | resource_definition_id, region | Updates a resource definition. | |
delete_resource_definition | delete | resource_definition_id, region | Deletes a resource 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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resource_definition_id | string | The ID of the resource definition. |
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_resource_definition
- list_resource_definitions
Retrieves information about a resource definition, including its creation time and latest version.
SELECT
arn,
creation_timestamp,
id,
last_updated_timestamp,
latest_version,
latest_version_arn,
name,
tags
FROM aws.greengrass.resource_definitions
WHERE resource_definition_id = '{{ resource_definition_id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves a list of resource definitions.
SELECT
arn,
creation_timestamp,
id,
last_updated_timestamp,
latest_version,
latest_version_arn,
name,
tags
FROM aws.greengrass.resource_definitions
WHERE region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_resource_definition
- Manifest
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.
INSERT INTO aws.greengrass.resource_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: resource_definitions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the resource_definitions resource.
- name: InitialVersion
description: |
Information about a resource definition version.
value:
Resources:
- Id: "{{ Id }}"
Name: "{{ Name }}"
ResourceDataContainer:
LocalDeviceResourceData:
GroupOwnerSetting:
AutoAddGroupOwner: {{ AutoAddGroupOwner }}
GroupOwner: "{{ GroupOwner }}"
SourcePath: "{{ SourcePath }}"
LocalVolumeResourceData:
DestinationPath: "{{ DestinationPath }}"
GroupOwnerSetting:
AutoAddGroupOwner: {{ AutoAddGroupOwner }}
GroupOwner: "{{ GroupOwner }}"
SourcePath: "{{ SourcePath }}"
S3MachineLearningModelResourceData:
DestinationPath: "{{ DestinationPath }}"
OwnerSetting:
GroupOwner: "{{ GroupOwner }}"
GroupPermission: "{{ GroupPermission }}"
S3Uri: "{{ S3Uri }}"
SageMakerMachineLearningModelResourceData:
DestinationPath: "{{ DestinationPath }}"
OwnerSetting:
GroupOwner: "{{ GroupOwner }}"
GroupPermission: "{{ GroupPermission }}"
SageMakerJobArn: "{{ SageMakerJobArn }}"
SecretsManagerSecretResourceData:
ARN: "{{ ARN }}"
AdditionalStagingLabelsToDownload:
- "{{ AdditionalStagingLabelsToDownload }}"
- 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_resource_definition
Updates a resource definition.
UPDATE aws.greengrass.resource_definitions
SET
Name = '{{ Name }}'
WHERE
resource_definition_id = '{{ resource_definition_id }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_resource_definition
Deletes a resource definition.
DELETE FROM aws.greengrass.resource_definitions
WHERE resource_definition_id = '{{ resource_definition_id }}' --required
AND region = '{{ region }}' --required
;