subscription_definitions
Creates, updates, deletes, gets or lists a subscription_definitions resource.
Overview
| Name | subscription_definitions |
| Type | Resource |
| Id | aws.greengrass.subscription_definitions |
Fields
The following fields are returned by SELECT queries:
- get_subscription_definition
- list_subscription_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_subscription_definition | select | subscription_definition_id, region | Retrieves information about a subscription definition. | |
list_subscription_definitions | select | region | MaxResults, NextToken | Retrieves a list of subscription definitions. |
create_subscription_definition | insert | region | X-Amzn-Client-Token | Creates a subscription definition. You may provide the initial version of the subscription definition now or use ''CreateSubscriptionDefinitionVersion'' at a later time. |
update_subscription_definition | update | subscription_definition_id, region | Updates a subscription definition. | |
delete_subscription_definition | delete | subscription_definition_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
subscription_definition_id | string | The ID of the subscription 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_subscription_definition
- list_subscription_definitions
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
;
Retrieves a list of subscription definitions.
SELECT
arn,
creation_timestamp,
id,
last_updated_timestamp,
latest_version,
latest_version_arn,
name,
tags
FROM aws.greengrass.subscription_definitions
WHERE region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_subscription_definition
- Manifest
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
;
# Description fields are for documentation purposes
- name: subscription_definitions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the subscription_definitions resource.
- name: InitialVersion
description: |
Information about a subscription definition version.
value:
Subscriptions:
- Id: "{{ Id }}"
Source: "{{ Source }}"
Subject: "{{ Subject }}"
Target: "{{ Target }}"
- 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_subscription_definition
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
- delete_subscription_definition
Deletes a subscription definition.
DELETE FROM aws.greengrass.subscription_definitions
WHERE subscription_definition_id = '{{ subscription_definition_id }}' --required
AND region = '{{ region }}' --required
;