putProfileVisibility method

Future<PutProfileVisibilityResponse> putProfileVisibility({
  1. required String catalog,
  2. required String identifier,
  3. required ProfileVisibility visibility,
})

Sets the visibility level for a partner profile, controlling who can view the profile information.

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

Parameter catalog : The catalog identifier for the partner account.

Parameter identifier : The unique identifier of the partner account.

Parameter visibility : The visibility setting to apply to the partner profile.

Implementation

Future<PutProfileVisibilityResponse> putProfileVisibility({
  required String catalog,
  required String identifier,
  required ProfileVisibility visibility,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PartnerCentralAccount.PutProfileVisibility'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Catalog': catalog,
      'Identifier': identifier,
      'Visibility': visibility.value,
    },
  );

  return PutProfileVisibilityResponse.fromJson(jsonResponse.body);
}