describeDashboard method

Future<DescribeDashboardResponse> describeDashboard({
  1. required String awsAccountId,
  2. required String dashboardId,
  3. String? aliasName,
  4. int? versionNumber,
})

Provides a summary for a dashboard.

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

Parameter awsAccountId : The ID of the AWS account that contains the dashboard that you're describing.

Parameter dashboardId : The ID for the dashboard.

Parameter aliasName : The alias name.

Parameter versionNumber : The version number for the dashboard. If a version number isn't passed, the latest published dashboard version is described.

Implementation

Future<DescribeDashboardResponse> describeDashboard({
  required String awsAccountId,
  required String dashboardId,
  String? aliasName,
  int? versionNumber,
}) async {
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(dashboardId, 'dashboardId');
  _s.validateStringLength(
    'dashboardId',
    dashboardId,
    1,
    2048,
    isRequired: true,
  );
  _s.validateStringLength(
    'aliasName',
    aliasName,
    1,
    2048,
  );
  _s.validateNumRange(
    'versionNumber',
    versionNumber,
    1,
    1152921504606846976,
  );
  final $query = <String, List<String>>{
    if (aliasName != null) 'alias-name': [aliasName],
    if (versionNumber != null) 'version-number': [versionNumber.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/dashboards/${Uri.encodeComponent(dashboardId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeDashboardResponse.fromJson(response);
}