Skip to main content

task_definitions

Creates, updates, deletes or gets a task_definition resource or lists task_definitions in a region

Overview

Nametask_definitions
TypeResource
DescriptionCreates a gateway task definition.
Idawscc.iotwireless.task_definitions

Fields

NameDatatypeDescription
namestringThe name of the new resource.
auto_create_tasksbooleanWhether 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.
updateobjectInformation about the gateways to update.
lo_ra_wan_update_gateway_task_entryobjectThe list of task definitions.
idstringThe ID of the new wireless gateway task definition
task_definition_typestringA filter to list only the wireless gateway task definitions that use this task definition type
arnstringTaskDefinition arn. Returned after successful create.
tagsarrayA list of key-value pairs that contain metadata for the destination.
regionstringAWS region.

For more information, see AWS::IoTWireless::TaskDefinition.

Methods

NameResourceAccessible byRequired Params
create_resourcetask_definitionsINSERTAutoCreateTasks, region
delete_resourcetask_definitionsDELETEIdentifier, region
update_resourcetask_definitionsUPDATEIdentifier, PatchDocument, region
list_resourcestask_definitions_list_onlySELECTregion
get_resourcetask_definitionsSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ id }}';

INSERT example

Use the following StackQL query and manifest file to create a new task_definition resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.iotwireless.task_definitions (
AutoCreateTasks,
region
)
SELECT
'{{ auto_create_tasks }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.iotwireless.task_definitions
WHERE
Identifier = '{{ id }}' 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:

ParameterDescription
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 task_definitions resource, the following permissions are required:

iotwireless:CreateWirelessGatewayTaskDefinition,
iotwireless:TagResource,
iam:GetRole,
iam:PassRole