createConnectionInvitation method
Creates a new connection invitation to establish a partnership with another organization.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter catalog :
The catalog identifier where the connection invitation will be created.
Parameter connectionType :
The type of connection being requested (e.g., reseller, distributor,
technology partner).
Parameter email :
The email address of the person to send the connection invitation to.
Parameter message :
A custom message to include with the connection invitation.
Parameter name :
The name of the person sending the connection invitation.
Parameter receiverIdentifier :
The identifier of the organization or partner to invite for connection.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Implementation
Future<CreateConnectionInvitationResponse> createConnectionInvitation({
required String catalog,
required ConnectionType connectionType,
required String email,
required String message,
required String name,
required String receiverIdentifier,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PartnerCentralAccount.CreateConnectionInvitation'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Catalog': catalog,
'ConnectionType': connectionType.value,
'Email': email,
'Message': message,
'Name': name,
'ReceiverIdentifier': receiverIdentifier,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return CreateConnectionInvitationResponse.fromJson(jsonResponse.body);
}