getInventorySchema method
Return a list of inventory type names for the account, or return a list of attribute names for a specific Inventory item type.
May throw InternalServerError. May throw InvalidTypeNameException. May throw InvalidNextToken.
Parameter aggregator
:
Returns inventory schemas that support aggregation. For example, this call
returns the AWS:InstanceInformation
type, because it supports
aggregation based on the PlatformName
,
PlatformType
, and PlatformVersion
attributes.
Parameter maxResults
:
The maximum number of items to return for this call. The call also returns
a token that you can specify in a subsequent call to get the next set of
results.
Parameter nextToken
:
The token for the next set of items to return. (You received this token
from a previous call.)
Parameter subType
:
Returns the sub-type schema for a specified inventory type.
Parameter typeName
:
The type of inventory item to return.
Implementation
Future<GetInventorySchemaResult> getInventorySchema({
bool? aggregator,
int? maxResults,
String? nextToken,
bool? subType,
String? typeName,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
50,
200,
);
_s.validateStringLength(
'typeName',
typeName,
0,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.GetInventorySchema'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (aggregator != null) 'Aggregator': aggregator,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (subType != null) 'SubType': subType,
if (typeName != null) 'TypeName': typeName,
},
);
return GetInventorySchemaResult.fromJson(jsonResponse.body);
}