updateStateTemplate method
Updates a state template.
May throw AccessDeniedException.
May throw InternalServerException.
May throw InvalidSignalsException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter identifier :
The unique ID of the state template.
Parameter dataExtraDimensions :
A list of vehicle attributes to associate with the payload published on
the state template's MQTT topic. (See
Processing last known state vehicle data using MQTT messaging). For
example, if you add Vehicle.Attributes.Make and
Vehicle.Attributes.Model attributes, Amazon Web Services IoT
FleetWise will enrich the protobuf encoded payload with those attributes
in the extraDimensions field.
Default: An empty array
Parameter description :
A brief description of the state template.
Parameter metadataExtraDimensions :
A list of vehicle attributes to associate with user properties of the
messages published on the state template's MQTT topic. (See
Processing last known state vehicle data using MQTT messaging). For
example, if you add Vehicle.Attributes.Make and
Vehicle.Attributes.Model attributes, Amazon Web Services IoT
FleetWise will include these attributes as User Properties with the MQTT
message.
Parameter stateTemplatePropertiesToAdd :
Add signals from which data is collected as part of the state template.
Parameter stateTemplatePropertiesToRemove :
Remove signals from which data is collected as part of the state template.
Implementation
Future<UpdateStateTemplateResponse> updateStateTemplate({
required String identifier,
List<String>? dataExtraDimensions,
String? description,
List<String>? metadataExtraDimensions,
List<String>? stateTemplatePropertiesToAdd,
List<String>? stateTemplatePropertiesToRemove,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'IoTAutobahnControlPlane.UpdateStateTemplate'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'identifier': identifier,
if (dataExtraDimensions != null)
'dataExtraDimensions': dataExtraDimensions,
if (description != null) 'description': description,
if (metadataExtraDimensions != null)
'metadataExtraDimensions': metadataExtraDimensions,
if (stateTemplatePropertiesToAdd != null)
'stateTemplatePropertiesToAdd': stateTemplatePropertiesToAdd,
if (stateTemplatePropertiesToRemove != null)
'stateTemplatePropertiesToRemove': stateTemplatePropertiesToRemove,
},
);
return UpdateStateTemplateResponse.fromJson(jsonResponse.body);
}