listResourceInventory method
Lists resources managed using Systems Manager inventory.
May throw AccessDeniedException.
May throw AuthorizationException.
May throw FailedDependencyException.
May throw FilterLimitExceededException.
May throw InvalidParameterValueException.
May throw RateLimitExceededException.
May throw ServerInternalException.
Parameter filters :
Filters to scope the results. The following filters and logical operators
are supported:
-
account_id- The ID of the Amazon Web Services account that owns the resource. Logical operators areEQUALS|NOT_EQUALS. -
application_name- The name of the application. Logical operators areEQUALS|BEGINS_WITH. -
license_included- The type of license included. Logical operators areEQUALS|NOT_EQUALS. Possible values aresql-server-enterprise|sql-server-standard|sql-server-web|windows-server-datacenter. -
platform- The platform of the resource. Logical operators areEQUALS|BEGINS_WITH. -
resource_id- The ID of the resource. Logical operators areEQUALS|NOT_EQUALS. -
tag:- The key/value combination of a tag assigned to the resource. Logical operators areEQUALS(single account) orEQUALS|NOT_EQUALS(cross account).
Parameter maxResults :
Maximum number of results to return in a single call.
Parameter nextToken :
Token for the next set of results.
Implementation
Future<ListResourceInventoryResponse> listResourceInventory({
List<InventoryFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSLicenseManager.ListResourceInventory'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListResourceInventoryResponse.fromJson(jsonResponse.body);
}