registerAccountAssociation method
Registers an account association with a managed thing, establishing a connection between a device and a third-party account.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter accountAssociationId :
The identifier of the account association to register with the managed
thing.
Parameter deviceDiscoveryId :
The identifier of the device discovery job associated with this
registration.
Parameter managedThingId :
The identifier of the managed thing to register with the account
association.
Implementation
Future<RegisterAccountAssociationResponse> registerAccountAssociation({
required String accountAssociationId,
required String deviceDiscoveryId,
required String managedThingId,
}) async {
final $payload = <String, dynamic>{
'AccountAssociationId': accountAssociationId,
'DeviceDiscoveryId': deviceDiscoveryId,
'ManagedThingId': managedThingId,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/managed-thing-associations/register',
exceptionFnMap: _exceptionFns,
);
return RegisterAccountAssociationResponse.fromJson(response);
}