listManagedThings method
- String? connectorDestinationIdFilter,
- String? connectorDeviceIdFilter,
- String? connectorPolicyIdFilter,
- String? credentialLockerFilter,
- int? maxResults,
- String? nextToken,
- String? ownerFilter,
- String? parentControllerIdentifierFilter,
- ProvisioningStatus? provisioningStatusFilter,
- Role? roleFilter,
- String? serialNumberFilter,
Listing all managed things with provision for filters.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter connectorDestinationIdFilter :
Filter managed things by the connector destination ID they are associated
with.
Parameter connectorDeviceIdFilter :
Filter managed things by the connector device ID they are associated with.
When specified, only managed things with this connector device ID will be
returned.
Parameter connectorPolicyIdFilter :
Filter on a connector policy id for a managed thing.
Parameter credentialLockerFilter :
Filter on a credential locker for a managed thing.
Parameter maxResults :
The maximum number of results to return at one time.
Parameter nextToken :
A token that can be used to retrieve the next set of results.
Parameter ownerFilter :
Filter on device owners when listing managed things.
Parameter parentControllerIdentifierFilter :
Filter on a parent controller id for a managed thing.
Parameter provisioningStatusFilter :
Filter on the status of the device. For more information, see Device
Provisioning.
Parameter roleFilter :
Filter on the type of device used. This will be the Amazon Web Services
hub controller, cloud device, or IoT device.
Parameter serialNumberFilter :
Filter on the serial number of the device.
Implementation
Future<ListManagedThingsResponse> listManagedThings({
String? connectorDestinationIdFilter,
String? connectorDeviceIdFilter,
String? connectorPolicyIdFilter,
String? credentialLockerFilter,
int? maxResults,
String? nextToken,
String? ownerFilter,
String? parentControllerIdentifierFilter,
ProvisioningStatus? provisioningStatusFilter,
Role? roleFilter,
String? serialNumberFilter,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (connectorDestinationIdFilter != null)
'ConnectorDestinationIdFilter': [connectorDestinationIdFilter],
if (connectorDeviceIdFilter != null)
'ConnectorDeviceIdFilter': [connectorDeviceIdFilter],
if (connectorPolicyIdFilter != null)
'ConnectorPolicyIdFilter': [connectorPolicyIdFilter],
if (credentialLockerFilter != null)
'CredentialLockerFilter': [credentialLockerFilter],
if (maxResults != null) 'MaxResults': [maxResults.toString()],
if (nextToken != null) 'NextToken': [nextToken],
if (ownerFilter != null) 'OwnerFilter': [ownerFilter],
if (parentControllerIdentifierFilter != null)
'ParentControllerIdentifierFilter': [parentControllerIdentifierFilter],
if (provisioningStatusFilter != null)
'ProvisioningStatusFilter': [provisioningStatusFilter.value],
if (roleFilter != null) 'RoleFilter': [roleFilter.value],
if (serialNumberFilter != null)
'SerialNumberFilter': [serialNumberFilter],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/managed-things',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListManagedThingsResponse.fromJson(response);
}