getProfile method

Future<GetProfileResponse> getProfile({
  1. required String profileId,
})

Retrieves the details for the profile specified by the profile ID. A profile is the mechanism used to create the concept of a private network.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter profileId : Specifies the unique, system-generated identifier for the profile.

Implementation

Future<GetProfileResponse> getProfile({
  required String profileId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'B2BI.GetProfile'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'profileId': profileId,
    },
  );

  return GetProfileResponse.fromJson(jsonResponse.body);
}