createTemplateShare method
Create a review template share.
The owner of a review template can share it with other Amazon Web Services accounts, users, an organization, and organizational units (OUs) in the same Amazon Web Services Region.
Shared access to a review template is not removed until the review template share invitation is deleted.
If you share a review template with an organization or OU, all accounts in the organization or OU are granted access to the review template.
By sharing your review template with other Amazon Web Services accounts, you acknowledge that Amazon Web Services will make your review template available to those other accounts.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter templateArn :
The review template ARN.
Implementation
Future<CreateTemplateShareOutput> createTemplateShare({
required String sharedWith,
required String templateArn,
String? clientRequestToken,
}) async {
final $payload = <String, dynamic>{
'SharedWith': sharedWith,
'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/templates/shares/${Uri.encodeComponent(templateArn)}',
exceptionFnMap: _exceptionFns,
);
return CreateTemplateShareOutput.fromJson(response);
}