2021/08/11 - AWS Snow Device Management - 13 new api methods
Changes AWS Snow Family customers can remotely monitor and operate their connected AWS Snowcone devices.
Checks the current state of the Amazon EC2 instances. The output is similar to describeDevice, but the results are sourced from the device cache in the Amazon Web Services Cloud and include a subset of the available fields.
See also: AWS API Documentation
Request Syntax
client.describe_device_ec2_instances( instanceIds=[ 'string', ], managedDeviceId='string' )
list
[REQUIRED]
A list of instance IDs associated with the managed device.
(string) --
string
[REQUIRED]
The ID of the managed device.
dict
Response Syntax
{ 'instances': [ { 'instance': { 'amiLaunchIndex': 123, 'blockDeviceMappings': [ { 'deviceName': 'string', 'ebs': { 'attachTime': datetime(2015, 1, 1), 'deleteOnTermination': True|False, 'status': 'ATTACHING'|'ATTACHED'|'DETACHING'|'DETACHED', 'volumeId': 'string' } }, ], 'cpuOptions': { 'coreCount': 123, 'threadsPerCore': 123 }, 'createdAt': datetime(2015, 1, 1), 'imageId': 'string', 'instanceId': 'string', 'instanceType': 'string', 'privateIpAddress': 'string', 'publicIpAddress': 'string', 'rootDeviceName': 'string', 'securityGroups': [ { 'groupId': 'string', 'groupName': 'string' }, ], 'state': { 'code': 123, 'name': 'PENDING'|'RUNNING'|'SHUTTING_DOWN'|'TERMINATED'|'STOPPING'|'STOPPED' }, 'updatedAt': datetime(2015, 1, 1) }, 'lastUpdatedAt': datetime(2015, 1, 1) }, ] }
Response Structure
(dict) --
instances (list) --
A list of structures containing information about each instance.
(dict) --
The details about the instance.
instance (dict) --
A structure containing details about the instance.
amiLaunchIndex (integer) --
The Amazon Machine Image (AMI) launch index, which you can use to find this instance in the launch group.
blockDeviceMappings (list) --
Any block device mapping entries for the instance.
(dict) --
The description of a block device mapping.
deviceName (string) --
The block device name.
ebs (dict) --
The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS) volumes when the instance is launched.
attachTime (datetime) --
When the attachment was initiated.
deleteOnTermination (boolean) --
A value that indicates whether the volume is deleted on instance termination.
status (string) --
The attachment state.
volumeId (string) --
The ID of the Amazon EBS volume.
cpuOptions (dict) --
The CPU options for the instance.
coreCount (integer) --
The number of cores that the CPU can use.
threadsPerCore (integer) --
The number of threads per core in the CPU.
createdAt (datetime) --
When the instance was created.
imageId (string) --
The ID of the AMI used to launch the instance.
instanceId (string) --
The ID of the instance.
instanceType (string) --
The instance type.
privateIpAddress (string) --
The private IPv4 address assigned to the instance.
publicIpAddress (string) --
The public IPv4 address assigned to the instance.
rootDeviceName (string) --
The device name of the root device volume (for example, /dev/sda1).
securityGroups (list) --
The security groups for the instance.
(dict) --
Information about the device's security group.
groupId (string) --
The security group ID.
groupName (string) --
The security group name.
state (dict) --
The description of the current state of an instance.
code (integer) --
The state of the instance as a 16-bit unsigned integer.
The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.
The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.
The valid values for the instance state code are all in the range of the low byte. These values are:
0 : pending
16 : running
32 : shutting-down
48 : terminated
64 : stopping
80 : stopped
You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.
name (string) --
The current state of the instance.
updatedAt (datetime) --
When the instance was last updated.
lastUpdatedAt (datetime) --
When the instance summary was last updated.
Sends a cancel request for a specified task. You can cancel a task only if it's still in a QUEUED state. Tasks that are already running can't be cancelled.
See also: AWS API Documentation
Request Syntax
client.cancel_task( taskId='string' )
string
[REQUIRED]
The ID of the task that you are attempting to cancel. You can retrieve a task ID by using the ListTasks operation.
dict
Response Syntax
{ 'taskId': 'string' }
Response Structure
(dict) --
taskId (string) --
The ID of the task that you are attempting to cancel.
Returns a list of all devices on your Amazon Web Services account that have Amazon Web Services Snow Device Management enabled in the Amazon Web Services Region where the command is run.
See also: AWS API Documentation
Request Syntax
client.list_devices( jobId='string', maxResults=123, nextToken='string' )
string
The ID of the job used to order the device.
integer
The maximum number of devices to list per page.
string
A pagination token to continue to the next page of results.
dict
Response Syntax
{ 'devices': [ { 'associatedWithJob': 'string', 'managedDeviceArn': 'string', 'managedDeviceId': 'string', 'tags': { 'string': 'string' } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
devices (list) --
A list of device structures that contain information about the device.
(dict) --
Identifying information about the device.
associatedWithJob (string) --
The ID of the job used to order the device.
managedDeviceArn (string) --
The Amazon Resource Name (ARN) of the device.
managedDeviceId (string) --
The ID of the device.
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) --
nextToken (string) --
A pagination token to continue to the next page of devices.
Adds or replaces tags on a device or task.
See also: AWS API Documentation
Request Syntax
client.tag_resource( resourceArn='string', tags={ 'string': 'string' } )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the device or task.
dict
[REQUIRED]
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) --
None
Removes a tag from a device or task.
See also: AWS API Documentation
Request Syntax
client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the device or task.
list
[REQUIRED]
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) --
None
Returns the status of tasks for one or more target devices.
See also: AWS API Documentation
Request Syntax
client.list_executions( maxResults=123, nextToken='string', state='QUEUED'|'IN_PROGRESS'|'CANCELED'|'FAILED'|'SUCCEEDED'|'REJECTED'|'TIMED_OUT', taskId='string' )
integer
The maximum number of tasks to list per page.
string
A pagination token to continue to the next page of tasks.
string
A structure used to filter the tasks by their current state.
string
[REQUIRED]
The ID of the task.
dict
Response Syntax
{ 'executions': [ { 'executionId': 'string', 'managedDeviceId': 'string', 'state': 'QUEUED'|'IN_PROGRESS'|'CANCELED'|'FAILED'|'SUCCEEDED'|'REJECTED'|'TIMED_OUT', 'taskId': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
executions (list) --
A list of executions. Each execution contains the task ID, the device that the task is executing on, the execution ID, and the status of the execution.
(dict) --
The summary of a task execution on a specified device.
executionId (string) --
The ID of the execution.
managedDeviceId (string) --
The ID of the managed device that the task is being executed on.
state (string) --
The state of the execution.
taskId (string) --
The ID of the task.
nextToken (string) --
A pagination token to continue to the next page of executions.
Checks the metadata for a given task on a device.
See also: AWS API Documentation
Request Syntax
client.describe_task( taskId='string' )
string
[REQUIRED]
The ID of the task to be described.
dict
Response Syntax
{ 'completedAt': datetime(2015, 1, 1), 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'lastUpdatedAt': datetime(2015, 1, 1), 'state': 'IN_PROGRESS'|'CANCELED'|'COMPLETED', 'tags': { 'string': 'string' }, 'targets': [ 'string', ], 'taskArn': 'string', 'taskId': 'string' }
Response Structure
(dict) --
completedAt (datetime) --
When the task was completed.
createdAt (datetime) --
When the CreateTask operation was called.
description (string) --
The description provided of the task and managed devices.
lastUpdatedAt (datetime) --
When the state of the task was last updated.
state (string) --
The current state of the task.
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) --
The managed devices that the task was sent to.
(string) --
taskArn (string) --
The Amazon Resource Name (ARN) of the task.
taskId (string) --
The ID of the task.
Returns a list of the Amazon Web Services resources available for a device. Currently, Amazon EC2 instances are the only supported resource type.
See also: AWS API Documentation
Request Syntax
client.list_device_resources( managedDeviceId='string', maxResults=123, nextToken='string', type='string' )
string
[REQUIRED]
The ID of the managed device that you are listing the resources of.
integer
The maximum number of resources per page.
string
A pagination token to continue to the next page of results.
string
A structure used to filter the results by type of resource.
dict
Response Syntax
{ 'nextToken': 'string', 'resources': [ { 'arn': 'string', 'id': 'string', 'resourceType': 'string' }, ] }
Response Structure
(dict) --
nextToken (string) --
A pagination token to continue to the next page of results.
resources (list) --
A structure defining the resource's type, Amazon Resource Name (ARN), and ID.
(dict) --
A summary of a resource available on the device.
arn (string) --
The Amazon Resource Name (ARN) of the resource.
id (string) --
The ID of the resource.
resourceType (string) --
The resource type.
Returns a list of tasks that can be filtered by state.
See also: AWS API Documentation
Request Syntax
client.list_tasks( maxResults=123, nextToken='string', state='IN_PROGRESS'|'CANCELED'|'COMPLETED' )
integer
The maximum number of tasks per page.
string
A pagination token to continue to the next page of tasks.
string
A structure used to filter the list of tasks.
dict
Response Syntax
{ 'nextToken': 'string', 'tasks': [ { 'state': 'IN_PROGRESS'|'CANCELED'|'COMPLETED', 'tags': { 'string': 'string' }, 'taskArn': 'string', 'taskId': 'string' }, ] }
Response Structure
(dict) --
nextToken (string) --
A pagination token to continue to the next page of tasks.
tasks (list) --
A list of task structures containing details about each task.
(dict) --
Information about the task assigned to one or many devices.
state (string) --
The state of the task assigned to one or many devices.
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) --
taskArn (string) --
The Amazon Resource Name (ARN) of the task.
taskId (string) --
The task ID.
Checks the status of a remote task running on one or more target devices.
See also: AWS API Documentation
Request Syntax
client.describe_execution( managedDeviceId='string', taskId='string' )
string
[REQUIRED]
The ID of the managed device.
string
[REQUIRED]
The ID of the task that the action is describing.
dict
Response Syntax
{ 'executionId': 'string', 'lastUpdatedAt': datetime(2015, 1, 1), 'managedDeviceId': 'string', 'startedAt': datetime(2015, 1, 1), 'state': 'QUEUED'|'IN_PROGRESS'|'CANCELED'|'FAILED'|'SUCCEEDED'|'REJECTED'|'TIMED_OUT', 'taskId': 'string' }
Response Structure
(dict) --
executionId (string) --
The ID of the execution.
lastUpdatedAt (datetime) --
When the status of the execution was last updated.
managedDeviceId (string) --
The ID of the managed device that the task is being executed on.
startedAt (datetime) --
When the execution began.
state (string) --
The current state of the execution.
taskId (string) --
The ID of the task being executed on the device.
Returns a list of tags for a managed device or task.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( resourceArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the device or task.
dict
Response Syntax
{ 'tags': { 'string': 'string' } }
Response Structure
(dict) --
tags (dict) --
The list of tags for the device or task.
(string) --
(string) --
Checks device-specific information, such as the device type, software version, IP addresses, and lock status.
See also: AWS API Documentation
Request Syntax
client.describe_device( managedDeviceId='string' )
string
[REQUIRED]
The ID of the device that you are checking the information of.
dict
Response Syntax
{ 'associatedWithJob': 'string', 'deviceCapacities': [ { 'available': 123, 'name': 'string', 'total': 123, 'unit': 'string', 'used': 123 }, ], 'deviceState': 'UNLOCKED'|'LOCKED'|'UNLOCKING', 'deviceType': 'string', 'lastReachedOutAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1), 'managedDeviceArn': 'string', 'managedDeviceId': 'string', 'physicalNetworkInterfaces': [ { 'defaultGateway': 'string', 'ipAddress': 'string', 'ipAddressAssignment': 'DHCP'|'STATIC', 'macAddress': 'string', 'netmask': 'string', 'physicalConnectorType': 'RJ45'|'SFP_PLUS'|'QSFP'|'RJ45_2'|'WIFI', 'physicalNetworkInterfaceId': 'string' }, ], 'software': { 'installState': 'string', 'installedVersion': 'string', 'installingVersion': 'string' }, 'tags': { 'string': 'string' } }
Response Structure
(dict) --
associatedWithJob (string) --
The ID of the job used when ordering the device.
deviceCapacities (list) --
The hardware specifications of the device.
(dict) --
The physical capacity of the Amazon Web Services Snow Family device.
available (integer) --
The amount of capacity available for use on the device.
name (string) --
The name of the type of capacity, such as memory.
total (integer) --
The total capacity on the device.
unit (string) --
The unit of measure for the type of capacity.
used (integer) --
The amount of capacity used on the device.
deviceState (string) --
The current state of the device.
deviceType (string) --
The type of Amazon Web Services Snow Family device.
lastReachedOutAt (datetime) --
When the device last contacted the Amazon Web Services Cloud. Indicates that the device is online.
lastUpdatedAt (datetime) --
When the device last pushed an update to the Amazon Web Services Cloud. Indicates when the device cache was refreshed.
managedDeviceArn (string) --
The Amazon Resource Name (ARN) of the device.
managedDeviceId (string) --
The ID of the device that you checked the information for.
physicalNetworkInterfaces (list) --
The network interfaces available on the device.
(dict) --
The details about the physical network interface for the device.
defaultGateway (string) --
The default gateway of the device.
ipAddress (string) --
The IP address of the device.
ipAddressAssignment (string) --
A value that describes whether the IP address is dynamic or persistent.
macAddress (string) --
The MAC address of the device.
netmask (string) --
The netmask used to divide the IP address into subnets.
physicalConnectorType (string) --
The physical connector type.
physicalNetworkInterfaceId (string) --
The physical network interface ID.
software (dict) --
The software installed on the device.
installState (string) --
The state of the software that is installed or that is being installed on the device.
installedVersion (string) --
The version of the software currently installed on the device.
installingVersion (string) --
The version of the software being installed on the device.
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) --
Instructs one or more devices to start a task, such as unlocking or rebooting.
See also: AWS API Documentation
Request Syntax
client.create_task( clientToken='string', command={ 'reboot': {} , 'unlock': {} }, description='string', tags={ 'string': 'string' }, targets=[ 'string', ] )
string
A token ensuring that the action is called only once with the specified details.
This field is autopopulated if not provided.
dict
[REQUIRED]
The task to be performed. Only one task is executed on a device at a time.
reboot (dict) --
Reboots the device.
unlock (dict) --
Unlocks the device.
string
A description of the task and its targets.
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) --
list
[REQUIRED]
A list of managed device IDs.
(string) --
dict
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.