getSystemTemplate method
Gets a system.
May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException. May throw ResourceNotFoundException.
Parameter id
:
The ID of the system to get. This ID must be in the user's namespace.
The ID should be in the following format.
urn:tdm:REGION/ACCOUNT ID/default:system:SYSTEMNAME
Parameter revisionNumber
:
The number that specifies the revision of the system to get.
Implementation
Future<GetSystemTemplateResponse> getSystemTemplate({
required String id,
int? revisionNumber,
}) async {
ArgumentError.checkNotNull(id, 'id');
_s.validateStringLength(
'id',
id,
0,
160,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'IotThingsGraphFrontEndService.GetSystemTemplate'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'id': id,
if (revisionNumber != null) 'revisionNumber': revisionNumber,
},
);
return GetSystemTemplateResponse.fromJson(jsonResponse.body);
}