task_definitions
Creates, updates, deletes or gets a task_definition
resource or lists task_definitions
in a region
Overview
Name | task_definitions |
Type | Resource |
Description | Creates a gateway task definition. |
Id | aws.iotwireless.task_definitions |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the new resource. |
auto_create_tasks | boolean | Whether to automatically create tasks using this task definition for all gateways with the specified current version. If false, the task must me created by calling CreateWirelessGatewayTask. |
update | object | Information about the gateways to update. |
lo_ra_wan_update_gateway_task_entry | object | The list of task definitions. |
id | string | The ID of the new wireless gateway task definition |
task_definition_type | string | A filter to list only the wireless gateway task definitions that use this task definition type |
arn | string | TaskDefinition arn. Returned after successful create. |
tags | array | A list of key-value pairs that contain metadata for the destination. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | AutoCreateTasks, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all task_definitions
in a region.
SELECT
region,
name,
auto_create_tasks,
update,
lo_ra_wan_update_gateway_task_entry,
id,
task_definition_type,
arn,
tags
FROM aws.iotwireless.task_definitions
WHERE region = 'us-east-1';
Gets all properties from an individual task_definition
.
SELECT
region,
name,
auto_create_tasks,
update,
lo_ra_wan_update_gateway_task_entry,
id,
task_definition_type,
arn,
tags
FROM aws.iotwireless.task_definitions
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new task_definition
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iotwireless.task_definitions (
AutoCreateTasks,
region
)
SELECT
'{{ AutoCreateTasks }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iotwireless.task_definitions (
Name,
AutoCreateTasks,
Update,
LoRaWANUpdateGatewayTaskEntry,
TaskDefinitionType,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ AutoCreateTasks }}',
'{{ Update }}',
'{{ LoRaWANUpdateGatewayTaskEntry }}',
'{{ TaskDefinitionType }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: task_definition
props:
- name: Name
value: '{{ Name }}'
- name: AutoCreateTasks
value: '{{ AutoCreateTasks }}'
- name: Update
value:
UpdateDataSource: '{{ UpdateDataSource }}'
UpdateDataRole: '{{ UpdateDataRole }}'
LoRaWAN:
UpdateSignature: '{{ UpdateSignature }}'
SigKeyCrc: '{{ SigKeyCrc }}'
CurrentVersion:
PackageVersion: '{{ PackageVersion }}'
Model: '{{ Model }}'
Station: '{{ Station }}'
UpdateVersion: null
- name: LoRaWANUpdateGatewayTaskEntry
value:
CurrentVersion: null
UpdateVersion: null
- name: TaskDefinitionType
value: '{{ TaskDefinitionType }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iotwireless.task_definitions
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the task_definitions
resource, the following permissions are required:
Create
iotwireless:CreateWirelessGatewayTaskDefinition,
iotwireless:TagResource,
iotwireless:ListTagsForResource,
iam:GetRole,
iam:PassRole
Read
iotwireless:GetWirelessGatewayTaskDefinition,
iotwireless:ListTagsForResource
Delete
iotwireless:DeleteWirelessGatewayTaskDefinition
List
iotwireless:ListWirelessGatewayTaskDefinitions,
iotwireless:ListTagsForResource