setSMBGuestPassword method
Sets the password for the guest user smbguest
. The
smbguest
user is the user when the authentication method for
the file share is set to GuestAccess
.
May throw InvalidGatewayRequestException. May throw InternalServerError.
Parameter gatewayARN
:
The Amazon Resource Name (ARN) of the file gateway the SMB file share is
associated with.
Parameter password
:
The password that you want to set for your SMB server.
Implementation
Future<SetSMBGuestPasswordOutput> setSMBGuestPassword({
required String gatewayARN,
required String password,
}) async {
ArgumentError.checkNotNull(gatewayARN, 'gatewayARN');
_s.validateStringLength(
'gatewayARN',
gatewayARN,
50,
500,
isRequired: true,
);
ArgumentError.checkNotNull(password, 'password');
_s.validateStringLength(
'password',
password,
6,
512,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StorageGateway_20130630.SetSMBGuestPassword'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'GatewayARN': gatewayARN,
'Password': password,
},
);
return SetSMBGuestPasswordOutput.fromJson(jsonResponse.body);
}