createChannelHandshake method
Creates a new channel handshake request to establish a partnership with another AWS account.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter associatedResourceIdentifier :
The identifier of the resource associated with this handshake.
Parameter catalog :
The catalog identifier for the handshake request.
Parameter handshakeType :
The type of handshake to create (e.g., start service period, revoke
service period).
Parameter clientToken :
A unique, case-sensitive identifier to ensure idempotency of the request.
Parameter payload :
The payload containing specific details for the handshake type.
Parameter tags :
Key-value pairs to associate with the channel handshake.
Implementation
Future<CreateChannelHandshakeResponse> createChannelHandshake({
required String associatedResourceIdentifier,
required String catalog,
required HandshakeType handshakeType,
String? clientToken,
ChannelHandshakePayload? payload,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PartnerCentralChannel.CreateChannelHandshake'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'associatedResourceIdentifier': associatedResourceIdentifier,
'catalog': catalog,
'handshakeType': handshakeType.value,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (payload != null) 'payload': payload,
if (tags != null) 'tags': tags,
},
);
return CreateChannelHandshakeResponse.fromJson(jsonResponse.body);
}