createProfileShare method

Future<CreateProfileShareOutput> createProfileShare({
  1. required String profileArn,
  2. required String sharedWith,
  3. String? clientRequestToken,
})

Create a profile share.

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

Parameter profileArn : The profile ARN.

Implementation

Future<CreateProfileShareOutput> createProfileShare({
  required String profileArn,
  required String sharedWith,
  String? clientRequestToken,
}) async {
  final $payload = <String, dynamic>{
    'SharedWith': sharedWith,
    'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/profiles/${Uri.encodeComponent(profileArn)}/shares',
    exceptionFnMap: _exceptionFns,
  );
  return CreateProfileShareOutput.fromJson(response);
}