listResourceInventory method
Future<ListResourceInventoryResponse>
listResourceInventory({
- List<
InventoryFilter> ? filters, - int? maxResults,
- String? nextToken,
Lists resources managed using Systems Manager inventory.
May throw InvalidParameterValueException. May throw ServerInternalException. May throw FilterLimitExceededException. May throw FailedDependencyException. May throw AuthorizationException. May throw AccessDeniedException. May throw RateLimitExceededException.
Parameter filters
:
Filters to scope the results. The following filters and logical operators
are supported:
-
account_id
- The ID of the AWS 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:<key>
- 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);
}