Method: Aws::Panorama::Client#list_devices
- Defined in:
- lib/aws-sdk-panorama/client.rb
#list_devices(params = {}) ⇒ Types::ListDevicesResponse
Returns a list of devices.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.list_devices({
device_aggregated_status_filter: "ERROR", # accepts ERROR, AWAITING_PROVISIONING, PENDING, FAILED, DELETING, ONLINE, OFFLINE, LEASE_EXPIRED, UPDATE_NEEDED, REBOOTING
max_results: 1,
name_filter: "NameFilter",
next_token: "NextToken",
sort_by: "DEVICE_ID", # accepts DEVICE_ID, CREATED_TIME, NAME, DEVICE_AGGREGATED_STATUS
sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
})
Response structure
Response structure
resp.devices #=> Array
resp.devices[0].brand #=> String, one of "AWS_PANORAMA", "LENOVO"
resp.devices[0].created_time #=> Time
resp.devices[0].current_software #=> String
resp.devices[0].description #=> String
resp.devices[0].device_aggregated_status #=> String, one of "ERROR", "AWAITING_PROVISIONING", "PENDING", "FAILED", "DELETING", "ONLINE", "OFFLINE", "LEASE_EXPIRED", "UPDATE_NEEDED", "REBOOTING"
resp.devices[0].device_id #=> String
resp.devices[0].last_updated_time #=> Time
resp.devices[0].latest_device_job.image_version #=> String
resp.devices[0].latest_device_job.job_type #=> String, one of "OTA", "REBOOT"
resp.devices[0].latest_device_job.status #=> String, one of "PENDING", "IN_PROGRESS", "VERIFYING", "REBOOTING", "DOWNLOADING", "COMPLETED", "FAILED"
resp.devices[0].lease_expiration_time #=> Time
resp.devices[0].name #=> String
resp.devices[0].provisioning_status #=> String, one of "AWAITING_PROVISIONING", "PENDING", "SUCCEEDED", "FAILED", "ERROR", "DELETING"
resp.devices[0].tags #=> Hash
resp.devices[0].tags["TagKey"] #=> String
resp.devices[0].type #=> String, one of "PANORAMA_APPLIANCE_DEVELOPER_KIT", "PANORAMA_APPLIANCE"
resp.next_token #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:device_aggregated_status_filter
(String)
—
Filter based on a device’s status.
-
:max_results
(Integer)
—
The maximum number of devices to return in one page of results.
-
:name_filter
(String)
—
Filter based on device’s name. Prefixes supported.
-
:next_token
(String)
—
Specify the pagination token from a previous request to retrieve the next page of results.
-
:sort_by
(String)
—
The target column to be sorted on. Default column sort is CREATED_TIME.
-
:sort_order
(String)
—
The sorting order for the returned list. SortOrder is DESCENDING by default based on CREATED_TIME. Otherwise, SortOrder is ASCENDING.
Returns:
-
(Types::ListDevicesResponse)
—
Returns a response object which responds to the following methods:
-
#devices => Array<Types::Device>
-
#next_token => String
-
See Also:
1603 1604 1605 1606 |
# File 'lib/aws-sdk-panorama/client.rb', line 1603 def list_devices(params = {}, options = {}) req = build_request(:list_devices, params) req.send_request(options) end |