deleteDashboard method

Future<DeleteDashboardResponse> deleteDashboard({
  1. required String awsAccountId,
  2. required String dashboardId,
  3. int? versionNumber,
})

Deletes a dashboard.

May throw ConflictException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedUserEditionException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the dashboard that you're deleting.

Parameter dashboardId : The ID for the dashboard.

Parameter versionNumber : The version number of the dashboard. If the version number property is provided, only the specified version of the dashboard is deleted.

Implementation

Future<DeleteDashboardResponse> deleteDashboard({
  required String awsAccountId,
  required String dashboardId,
  int? versionNumber,
}) async {
  _s.validateNumRange(
    'versionNumber',
    versionNumber,
    1,
    1152921504606846976,
  );
  final $query = <String, List<String>>{
    if (versionNumber != null) 'version-number': [versionNumber.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/dashboards/${Uri.encodeComponent(dashboardId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteDashboardResponse.fromJson(response);
}