createRegistrationAssociation method
Associate the registration with an origination identity such as a phone number or sender ID.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter registrationId :
The unique identifier for the registration.
Parameter resourceId :
The unique identifier for the origination identity. For example this could
be a PhoneNumberId or SenderId.
Implementation
Future<CreateRegistrationAssociationResult> createRegistrationAssociation({
required String registrationId,
required String resourceId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.CreateRegistrationAssociation'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RegistrationId': registrationId,
'ResourceId': resourceId,
},
);
return CreateRegistrationAssociationResult.fromJson(jsonResponse.body);
}