Skip to main content

subscription_definitions

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

Overview

Namesubscription_definitions
TypeResource
Idaws.greengrass.subscription_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_subscription_definitionselectsubscription_definition_id, regionRetrieves information about a subscription definition.
list_subscription_definitionsselectregionMaxResults, NextTokenRetrieves a list of subscription definitions.
create_subscription_definitioninsertregionX-Amzn-Client-TokenCreates a subscription definition. You may provide the initial version of the subscription definition now or use ''CreateSubscriptionDefinitionVersion'' at a later time.
update_subscription_definitionupdatesubscription_definition_id, regionUpdates a subscription definition.
delete_subscription_definitiondeletesubscription_definition_id, regionDeletes a subscription 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
regionstringAWS region (default: us-east-1)
subscription_definition_idstringThe ID of the subscription definition.
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 subscription definition.

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

INSERT examples

Creates a subscription definition. You may provide the initial version of the subscription definition now or use ''CreateSubscriptionDefinitionVersion'' at a later time.

INSERT INTO aws.greengrass.subscription_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 subscription definition.

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

DELETE examples

Deletes a subscription definition.

DELETE FROM aws.greengrass.subscription_definitions
WHERE subscription_definition_id = '{{ subscription_definition_id }}' --required
AND region = '{{ region }}' --required
;