updateSMBSecurityStrategy method

Future<UpdateSMBSecurityStrategyOutput> updateSMBSecurityStrategy({
  1. required String gatewayARN,
  2. required SMBSecurityStrategy sMBSecurityStrategy,
})

Updates the SMB security strategy on a file gateway. This action is only supported in file gateways.

A higher security level can affect performance of the gateway.

May throw InvalidGatewayRequestException. May throw InternalServerError.

Parameter sMBSecurityStrategy : Specifies the type of security strategy.

ClientSpecified: if you use this option, requests are established based on what is negotiated by the client. This option is recommended when you want to maximize compatibility across different clients in your environment.

MandatorySigning: if you use this option, file gateway only allows connections from SMBv2 or SMBv3 clients that have signing enabled. This option works with SMB clients on Microsoft Windows Vista, Windows Server 2008 or newer.

MandatoryEncryption: if you use this option, file gateway only allows connections from SMBv3 clients that have encryption enabled. This option is highly recommended for environments that handle sensitive data. This option works with SMB clients on Microsoft Windows 8, Windows Server 2012 or newer.

Implementation

Future<UpdateSMBSecurityStrategyOutput> updateSMBSecurityStrategy({
  required String gatewayARN,
  required SMBSecurityStrategy sMBSecurityStrategy,
}) async {
  ArgumentError.checkNotNull(gatewayARN, 'gatewayARN');
  _s.validateStringLength(
    'gatewayARN',
    gatewayARN,
    50,
    500,
    isRequired: true,
  );
  ArgumentError.checkNotNull(sMBSecurityStrategy, 'sMBSecurityStrategy');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StorageGateway_20130630.UpdateSMBSecurityStrategy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GatewayARN': gatewayARN,
      'SMBSecurityStrategy': sMBSecurityStrategy.toValue(),
    },
  );

  return UpdateSMBSecurityStrategyOutput.fromJson(jsonResponse.body);
}