associateDeviceWithNetworkProfile method
Associates a device with the specified network profile.
May throw NotFoundException. May throw ConcurrentModificationException. May throw DeviceNotRegisteredException.
Parameter deviceArn
:
The device ARN.
Parameter networkProfileArn
:
The ARN of the network profile to associate with a device.
Implementation
Future<void> associateDeviceWithNetworkProfile({
required String deviceArn,
required String networkProfileArn,
}) async {
ArgumentError.checkNotNull(deviceArn, 'deviceArn');
ArgumentError.checkNotNull(networkProfileArn, 'networkProfileArn');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AlexaForBusiness.AssociateDeviceWithNetworkProfile'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DeviceArn': deviceArn,
'NetworkProfileArn': networkProfileArn,
},
);
}