inputs
Creates, updates, deletes or gets an input resource or lists inputs in a region
Overview
| Name | inputs |
| Type | Resource |
| Description | The AWS::IoTEvents::Input resource creates an input. To monitor your devices and processes, they must have a way to get telemetry data into ITE. This is done by sending messages as inputs to ITE. For more information, see How to Use in the Developer Guide. |
| Id | awscc.iotevents.inputs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
input_definition | object | The definition of the input. |
input_description | string | A brief description of the input. |
input_name | string | The name of the input. |
tags | array | An array of key-value pairs to apply to this resource.For more information, see Tag. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
input_name | string | The name of the input. |
region | string | AWS region. |
For more information, see AWS::IoTEvents::Input.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | inputs | INSERT | InputDefinition, region |
delete_resource | inputs | DELETE | Identifier, region |
update_resource | inputs | UPDATE | Identifier, PatchDocument, region |
list_resources | inputs_list_only | SELECT | region |
get_resource | inputs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual input.
SELECT
region,
input_definition,
input_description,
input_name,
tags
FROM awscc.iotevents.inputs
WHERE
region = '{{ region }}' AND
Identifier = '{{ input_name }}';
Lists all inputs in a region.
SELECT
region,
input_name
FROM awscc.iotevents.inputs_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new input resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iotevents.inputs (
InputDefinition,
region
)
SELECT
'{{ input_definition }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.iotevents.inputs (
InputDefinition,
InputDescription,
InputName,
Tags,
region
)
SELECT
'{{ input_definition }}',
'{{ input_description }}',
'{{ input_name }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: input
props:
- name: input_definition
value:
attributes:
- json_path: '{{ json_path }}'
- name: input_description
value: '{{ input_description }}'
- name: input_name
value: '{{ input_name }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a input resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotevents.inputs
SET PatchDocument = string('{{ {
"InputDefinition": input_definition,
"InputDescription": input_description,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ input_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.iotevents.inputs
WHERE
Identifier = '{{ input_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the inputs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iotevents:CreateInput,
iotevents:TagResource,
iotevents:DescribeInput,
iotevents:ListTagsForResource
iotevents:DescribeInput,
iotevents:ListTagsForResource
iotevents:UpdateInput,
iotevents:DescribeInput,
iotevents:ListTagsForResource,
iotevents:UntagResource,
iotevents:TagResource
iotevents:DeleteInput,
iotevents:DescribeInput
iotevents:ListInputs