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 | awscc.iotwireless.task_definitions |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the new wireless gateway task definition |
region | string | AWS region. |
For more information, see AWS::IoTWireless::TaskDefinition.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | task_definitions | INSERT | AutoCreateTasks, region |
delete_resource | task_definitions | DELETE | Identifier, region |
update_resource | task_definitions | UPDATE | Identifier, PatchDocument, region |
list_resources | task_definitions_list_only | SELECT | region |
get_resource | task_definitions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.iotwireless.task_definitions
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all task_definitions in a region.
SELECT
region,
id
FROM awscc.iotwireless.task_definitions_list_only
WHERE
region = 'us-east-1';
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 awscc.iotwireless.task_definitions (
AutoCreateTasks,
region
)
SELECT
'{{ auto_create_tasks }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotwireless.task_definitions (
Name,
AutoCreateTasks,
Update,
LoRaWANUpdateGatewayTaskEntry,
TaskDefinitionType,
Tags,
region
)
SELECT
'{{ name }}',
'{{ auto_create_tasks }}',
'{{ update }}',
'{{ lo_ra_wan_update_gateway_task_entry }}',
'{{ task_definition_type }}',
'{{ 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: auto_create_tasks
value: '{{ auto_create_tasks }}'
- name: update
value:
update_data_source: '{{ update_data_source }}'
update_data_role: '{{ update_data_role }}'
lo_ra_wan:
update_signature: '{{ update_signature }}'
sig_key_crc: '{{ sig_key_crc }}'
current_version:
package_version: '{{ package_version }}'
model: '{{ model }}'
station: '{{ station }}'
update_version: null
- name: lo_ra_wan_update_gateway_task_entry
value:
current_version: null
update_version: null
- name: task_definition_type
value: '{{ task_definition_type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a task_definition resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotwireless.task_definitions
SET PatchDocument = string('{{ {
"Name": name,
"AutoCreateTasks": auto_create_tasks,
"Update": update,
"LoRaWANUpdateGatewayTaskEntry": lo_ra_wan_update_gateway_task_entry,
"TaskDefinitionType": task_definition_type,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotwireless.task_definitions
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the task_definitions resource, the following permissions are required:
- Create
- Update
- Read
- Delete
- List
iotwireless:CreateWirelessGatewayTaskDefinition,
iotwireless:TagResource,
iam:GetRole,
iam:PassRole
iotwireless:GetWirelessGatewayTaskDefinition,
iotwireless:TagResource,
iotwireless:UntagResource
iotwireless:GetWirelessGatewayTaskDefinition,
iotwireless:ListTagsForResource
iotwireless:DeleteWirelessGatewayTaskDefinition
iotwireless:ListWirelessGatewayTaskDefinitions,
iotwireless:ListTagsForResource