updateSMBFileShareVisibility method

Future<UpdateSMBFileShareVisibilityOutput> updateSMBFileShareVisibility({
  1. required bool fileSharesVisible,
  2. required String gatewayARN,
})

Controls whether the shares on a gateway are visible in a net view or browse list.

May throw InvalidGatewayRequestException. May throw InternalServerError.

Parameter fileSharesVisible : The shares on this gateway appear when listing shares.

Implementation

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

  return UpdateSMBFileShareVisibilityOutput.fromJson(jsonResponse.body);
}