updateDashboard method
Updates an IoT SiteWise Monitor dashboard.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter dashboardDefinition :
The new dashboard definition, as specified in a JSON literal.
- IoT SiteWise Monitor (Classic) see Create dashboards (CLI)
- IoT SiteWise Monitor (AI-aware) see Create dashboards (CLI)
Parameter dashboardId :
The ID of the dashboard to update.
Parameter dashboardName :
A new friendly name for the dashboard.
Parameter clientToken :
A unique case-sensitive identifier that you can provide to ensure the
idempotency of the request. Don't reuse this client token if a new
idempotent request is required.
Parameter dashboardDescription :
A new description for the dashboard.
Implementation
Future<void> updateDashboard({
required String dashboardDefinition,
required String dashboardId,
required String dashboardName,
String? clientToken,
String? dashboardDescription,
}) async {
final $payload = <String, dynamic>{
'dashboardDefinition': dashboardDefinition,
'dashboardName': dashboardName,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (dashboardDescription != null)
'dashboardDescription': dashboardDescription,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/dashboards/${Uri.encodeComponent(dashboardId)}',
hostPrefix: 'monitor.',
exceptionFnMap: _exceptionFns,
);
}