registerAccount method

Future<RegisterAccountResponse> registerAccount({
  1. IamResources? iamResources,
  2. TimestreamResources? timestreamResources,
})

Implementation

Future<RegisterAccountResponse> registerAccount({
  IamResources? iamResources,
  TimestreamResources? timestreamResources,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'IoTAutobahnControlPlane.RegisterAccount'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (iamResources != null) 'iamResources': iamResources,
      if (timestreamResources != null)
        'timestreamResources': timestreamResources,
    },
  );

  return RegisterAccountResponse.fromJson(jsonResponse.body);
}