SnowDeviceManagement / Client / create_task
create_task#
- SnowDeviceManagement.Client.create_task(**kwargs)#
- Instructs one or more devices to start a task, such as unlocking or rebooting. - See also: AWS API Documentation - Request Syntax- response = client.create_task( clientToken='string', command={ 'reboot': {} , 'unlock': {} }, description='string', tags={ 'string': 'string' }, targets=[ 'string', ] ) - Parameters:
- clientToken (string) – - A token ensuring that the action is called only once with the specified details. - This field is autopopulated if not provided. 
- command (dict) – - [REQUIRED] - The task to be performed. Only one task is executed on a device at a time. - Note- This is a Tagged Union structure. Only one of the following top level keys can be set: - reboot,- unlock.- reboot (dict) – - Reboots the device. 
- unlock (dict) – - Unlocks the device. 
 
- description (string) – A description of the task and its targets. 
- tags (dict) – - Optional metadata that you assign to a resource. You can use tags to categorize a resource in different ways, such as by purpose, owner, or environment. - (string) – - (string) – 
 
 
- targets (list) – - [REQUIRED] - A list of managed device IDs. - (string) – 
 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'taskArn': 'string', 'taskId': 'string' } - Response Structure- (dict) – - taskArn (string) – - The Amazon Resource Name (ARN) of the task that you created. 
- taskId (string) – - The ID of the task that you created. 
 
 
 - Exceptions- SnowDeviceManagement.Client.exceptions.ServiceQuotaExceededException
- SnowDeviceManagement.Client.exceptions.ThrottlingException
- SnowDeviceManagement.Client.exceptions.InternalServerException
- SnowDeviceManagement.Client.exceptions.ResourceNotFoundException
- SnowDeviceManagement.Client.exceptions.ValidationException
- SnowDeviceManagement.Client.exceptions.AccessDeniedException