listVmEntitlements method
Lists the Windows Server License entitlements for virtual machines in an Amazon EVS environment. Returns existing entitlements for virtual machines associated with the specified environment and connector.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter connectorId :
A unique ID for the connector.
Parameter entitlementType :
The type of entitlement to list.
Parameter environmentId :
A unique ID for the environment.
Parameter maxResults :
The maximum number of results to return. If you specify
MaxResults in the request, the response includes information
up to the limit specified.
Parameter nextToken :
A unique pagination token for each page. If nextToken is
returned, there are more results available. Make the call again using the
returned token with all other arguments unchanged to retrieve the next
page. Each pagination token expires after 24 hours. Using an expired
pagination token will return an HTTP 400 InvalidToken error.
Implementation
Future<ListVmEntitlementsResponse> listVmEntitlements({
required String connectorId,
required EntitlementType entitlementType,
required String environmentId,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AmazonElasticVMwareService.ListVmEntitlements'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'connectorId': connectorId,
'entitlementType': entitlementType.value,
'environmentId': environmentId,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListVmEntitlementsResponse.fromJson(jsonResponse.body);
}