updateNetworkProfile method
Updates a network profile by the network profile ARN.
May throw NotFoundException. May throw NameInUseException. May throw ConcurrentModificationException. May throw InvalidCertificateAuthorityException. May throw InvalidSecretsManagerResourceException.
Parameter networkProfileArn
:
The ARN of the network profile associated with a device.
Parameter certificateAuthorityArn
:
The ARN of the Private Certificate Authority (PCA) created in AWS
Certificate Manager (ACM). This is used to issue certificates to the
devices.
Parameter currentPassword
:
The current password of the Wi-Fi network.
Parameter description
:
Detailed information about a device's network profile.
Parameter networkProfileName
:
The name of the network profile associated with a device.
Parameter nextPassword
:
The next, or subsequent, password of the Wi-Fi network. This password is
asynchronously transmitted to the device and is used when the password of
the network changes to NextPassword.
Parameter trustAnchors
:
The root certificate(s) of your authentication server that will be
installed on your devices and used to trust your authentication server
during EAP negotiation.
Implementation
Future<void> updateNetworkProfile({
required String networkProfileArn,
String? certificateAuthorityArn,
String? currentPassword,
String? description,
String? networkProfileName,
String? nextPassword,
List<String>? trustAnchors,
}) async {
ArgumentError.checkNotNull(networkProfileArn, 'networkProfileArn');
_s.validateStringLength(
'currentPassword',
currentPassword,
5,
128,
);
_s.validateStringLength(
'description',
description,
0,
200,
);
_s.validateStringLength(
'networkProfileName',
networkProfileName,
1,
100,
);
_s.validateStringLength(
'nextPassword',
nextPassword,
0,
128,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AlexaForBusiness.UpdateNetworkProfile'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'NetworkProfileArn': networkProfileArn,
if (certificateAuthorityArn != null)
'CertificateAuthorityArn': certificateAuthorityArn,
if (currentPassword != null) 'CurrentPassword': currentPassword,
if (description != null) 'Description': description,
if (networkProfileName != null)
'NetworkProfileName': networkProfileName,
if (nextPassword != null) 'NextPassword': nextPassword,
if (trustAnchors != null) 'TrustAnchors': trustAnchors,
},
);
}