cloudmersive-virus-scan-api-client 2.0.4 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/docs/CloudStorageAdvancedVirusScanResult.md +19 -0
- data/docs/ScanApi.md +2 -0
- data/docs/ScanCloudStorageApi.md +396 -0
- data/docs/VirusScanAdvancedResult.md +1 -0
- data/lib/cloudmersive-virus-scan-api-client/api/scan_api.rb +3 -0
- data/lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb +479 -0
- data/lib/cloudmersive-virus-scan-api-client/models/cloud_storage_advanced_virus_scan_result.rb +298 -0
- data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result.rb +11 -1
- data/lib/cloudmersive-virus-scan-api-client/version.rb +1 -1
- data/lib/cloudmersive-virus-scan-api-client.rb +1 -0
- data/spec/api/scan_api_spec.rb +1 -0
- data/spec/api/scan_cloud_storage_api_spec.rb +108 -0
- data/spec/models/cloud_storage_advanced_virus_scan_result_spec.rb +107 -0
- data/spec/models/virus_scan_advanced_result_spec.rb +6 -0
- metadata +5 -2
@@ -102,6 +102,110 @@ module CloudmersiveVirusScanApiClient
|
|
102
102
|
end
|
103
103
|
return data, status_code, headers
|
104
104
|
end
|
105
|
+
# Advanced Scan an AWS S3 file for viruses
|
106
|
+
# Advanced Scan the contents of a single AWS S3 file and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
107
|
+
# @param access_key AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console
|
108
|
+
# @param secret_key AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console
|
109
|
+
# @param bucket_region Name of the region of the S3 bucket, such as 'US-East-1'
|
110
|
+
# @param bucket_name Name of the S3 bucket
|
111
|
+
# @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
114
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
115
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
116
|
+
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
117
|
+
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
118
|
+
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
119
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
120
|
+
# @return [CloudStorageAdvancedVirusScanResult]
|
121
|
+
def scan_cloud_storage_scan_aws_s3_file_advanced(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {})
|
122
|
+
data, _status_code, _headers = scan_cloud_storage_scan_aws_s3_file_advanced_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts)
|
123
|
+
data
|
124
|
+
end
|
125
|
+
|
126
|
+
# Advanced Scan an AWS S3 file for viruses
|
127
|
+
# Advanced Scan the contents of a single AWS S3 file and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
128
|
+
# @param access_key AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console
|
129
|
+
# @param secret_key AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console
|
130
|
+
# @param bucket_region Name of the region of the S3 bucket, such as 'US-East-1'
|
131
|
+
# @param bucket_name Name of the S3 bucket
|
132
|
+
# @param key_name Key name (also called file name) of the file in S3 that you wish to scan for viruses
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
135
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
136
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
137
|
+
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
138
|
+
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
139
|
+
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
140
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
141
|
+
# @return [Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>] CloudStorageAdvancedVirusScanResult data, response status code and response headers
|
142
|
+
def scan_cloud_storage_scan_aws_s3_file_advanced_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {})
|
143
|
+
if @api_client.config.debugging
|
144
|
+
@api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced ...'
|
145
|
+
end
|
146
|
+
# verify the required parameter 'access_key' is set
|
147
|
+
if @api_client.config.client_side_validation && access_key.nil?
|
148
|
+
fail ArgumentError, "Missing the required parameter 'access_key' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
|
149
|
+
end
|
150
|
+
# verify the required parameter 'secret_key' is set
|
151
|
+
if @api_client.config.client_side_validation && secret_key.nil?
|
152
|
+
fail ArgumentError, "Missing the required parameter 'secret_key' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
|
153
|
+
end
|
154
|
+
# verify the required parameter 'bucket_region' is set
|
155
|
+
if @api_client.config.client_side_validation && bucket_region.nil?
|
156
|
+
fail ArgumentError, "Missing the required parameter 'bucket_region' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
|
157
|
+
end
|
158
|
+
# verify the required parameter 'bucket_name' is set
|
159
|
+
if @api_client.config.client_side_validation && bucket_name.nil?
|
160
|
+
fail ArgumentError, "Missing the required parameter 'bucket_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
|
161
|
+
end
|
162
|
+
# verify the required parameter 'key_name' is set
|
163
|
+
if @api_client.config.client_side_validation && key_name.nil?
|
164
|
+
fail ArgumentError, "Missing the required parameter 'key_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
|
165
|
+
end
|
166
|
+
# resource path
|
167
|
+
local_var_path = '/virus/scan/cloud-storage/aws-s3/single/advanced'
|
168
|
+
|
169
|
+
# query parameters
|
170
|
+
query_params = {}
|
171
|
+
|
172
|
+
# header parameters
|
173
|
+
header_params = {}
|
174
|
+
# HTTP header 'Accept' (if needed)
|
175
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
176
|
+
# HTTP header 'Content-Type'
|
177
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
178
|
+
header_params[:'accessKey'] = access_key
|
179
|
+
header_params[:'secretKey'] = secret_key
|
180
|
+
header_params[:'bucketRegion'] = bucket_region
|
181
|
+
header_params[:'bucketName'] = bucket_name
|
182
|
+
header_params[:'keyName'] = key_name
|
183
|
+
header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
|
184
|
+
header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
|
185
|
+
header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
|
186
|
+
header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
|
187
|
+
header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
|
188
|
+
header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
|
189
|
+
header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
|
190
|
+
|
191
|
+
# form parameters
|
192
|
+
form_params = {}
|
193
|
+
|
194
|
+
# http body (model)
|
195
|
+
post_body = nil
|
196
|
+
auth_names = ['Apikey']
|
197
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
198
|
+
:header_params => header_params,
|
199
|
+
:query_params => query_params,
|
200
|
+
:form_params => form_params,
|
201
|
+
:body => post_body,
|
202
|
+
:auth_names => auth_names,
|
203
|
+
:return_type => 'CloudStorageAdvancedVirusScanResult')
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_aws_s3_file_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
206
|
+
end
|
207
|
+
return data, status_code, headers
|
208
|
+
end
|
105
209
|
# Scan an Azure Blob for viruses
|
106
210
|
# Scan the contents of a single Azure Blob and its content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
107
211
|
# @param connection_string Connection string for the Azure Blob Storage Account; you can get this connection string from the Access Keys tab of the Storage Account blade in the Azure Portal.
|
@@ -171,6 +275,96 @@ module CloudmersiveVirusScanApiClient
|
|
171
275
|
end
|
172
276
|
return data, status_code, headers
|
173
277
|
end
|
278
|
+
# Advanced Scan an Azure Blob for viruses
|
279
|
+
# Advanced Scan the contents of a single Azure Blob and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
280
|
+
# @param connection_string Connection string for the Azure Blob Storage Account; you can get this connection string from the Access Keys tab of the Storage Account blade in the Azure Portal.
|
281
|
+
# @param container_name Name of the Blob container within the Azure Blob Storage account
|
282
|
+
# @param blob_path Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
285
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
286
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
287
|
+
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
288
|
+
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
289
|
+
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
290
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
291
|
+
# @return [CloudStorageAdvancedVirusScanResult]
|
292
|
+
def scan_cloud_storage_scan_azure_blob_advanced(connection_string, container_name, blob_path, opts = {})
|
293
|
+
data, _status_code, _headers = scan_cloud_storage_scan_azure_blob_advanced_with_http_info(connection_string, container_name, blob_path, opts)
|
294
|
+
data
|
295
|
+
end
|
296
|
+
|
297
|
+
# Advanced Scan an Azure Blob for viruses
|
298
|
+
# Advanced Scan the contents of a single Azure Blob and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
299
|
+
# @param connection_string Connection string for the Azure Blob Storage Account; you can get this connection string from the Access Keys tab of the Storage Account blade in the Azure Portal.
|
300
|
+
# @param container_name Name of the Blob container within the Azure Blob Storage account
|
301
|
+
# @param blob_path Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
302
|
+
# @param [Hash] opts the optional parameters
|
303
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
304
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
305
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
306
|
+
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
307
|
+
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
308
|
+
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
309
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
310
|
+
# @return [Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>] CloudStorageAdvancedVirusScanResult data, response status code and response headers
|
311
|
+
def scan_cloud_storage_scan_azure_blob_advanced_with_http_info(connection_string, container_name, blob_path, opts = {})
|
312
|
+
if @api_client.config.debugging
|
313
|
+
@api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob_advanced ...'
|
314
|
+
end
|
315
|
+
# verify the required parameter 'connection_string' is set
|
316
|
+
if @api_client.config.client_side_validation && connection_string.nil?
|
317
|
+
fail ArgumentError, "Missing the required parameter 'connection_string' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob_advanced"
|
318
|
+
end
|
319
|
+
# verify the required parameter 'container_name' is set
|
320
|
+
if @api_client.config.client_side_validation && container_name.nil?
|
321
|
+
fail ArgumentError, "Missing the required parameter 'container_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob_advanced"
|
322
|
+
end
|
323
|
+
# verify the required parameter 'blob_path' is set
|
324
|
+
if @api_client.config.client_side_validation && blob_path.nil?
|
325
|
+
fail ArgumentError, "Missing the required parameter 'blob_path' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob_advanced"
|
326
|
+
end
|
327
|
+
# resource path
|
328
|
+
local_var_path = '/virus/scan/cloud-storage/azure-blob/single/advanced'
|
329
|
+
|
330
|
+
# query parameters
|
331
|
+
query_params = {}
|
332
|
+
|
333
|
+
# header parameters
|
334
|
+
header_params = {}
|
335
|
+
# HTTP header 'Accept' (if needed)
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
337
|
+
# HTTP header 'Content-Type'
|
338
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
339
|
+
header_params[:'connectionString'] = connection_string
|
340
|
+
header_params[:'containerName'] = container_name
|
341
|
+
header_params[:'blobPath'] = blob_path
|
342
|
+
header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
|
343
|
+
header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
|
344
|
+
header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
|
345
|
+
header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
|
346
|
+
header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
|
347
|
+
header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
|
348
|
+
header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
|
349
|
+
|
350
|
+
# form parameters
|
351
|
+
form_params = {}
|
352
|
+
|
353
|
+
# http body (model)
|
354
|
+
post_body = nil
|
355
|
+
auth_names = ['Apikey']
|
356
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
357
|
+
:header_params => header_params,
|
358
|
+
:query_params => query_params,
|
359
|
+
:form_params => form_params,
|
360
|
+
:body => post_body,
|
361
|
+
:auth_names => auth_names,
|
362
|
+
:return_type => 'CloudStorageAdvancedVirusScanResult')
|
363
|
+
if @api_client.config.debugging
|
364
|
+
@api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_azure_blob_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
365
|
+
end
|
366
|
+
return data, status_code, headers
|
367
|
+
end
|
174
368
|
# Scan an Google Cloud Platform (GCP) Storage file for viruses
|
175
369
|
# Scan the contents of a single Google Cloud Platform (GCP) Storage file and its content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
176
370
|
# @param bucket_name Name of the bucket in Google Cloud Storage
|
@@ -240,5 +434,290 @@ module CloudmersiveVirusScanApiClient
|
|
240
434
|
end
|
241
435
|
return data, status_code, headers
|
242
436
|
end
|
437
|
+
# Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
|
438
|
+
# Advanced Scan the contents of a single Google Cloud Platform (GCP) Storage file and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
439
|
+
# @param bucket_name Name of the bucket in Google Cloud Storage
|
440
|
+
# @param object_name Name of the object or file in Google Cloud Storage
|
441
|
+
# @param json_credential_file Service Account credential for Google Cloud stored in a JSON file.
|
442
|
+
# @param [Hash] opts the optional parameters
|
443
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
444
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
445
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
446
|
+
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
447
|
+
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
448
|
+
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
449
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
450
|
+
# @return [CloudStorageAdvancedVirusScanResult]
|
451
|
+
def scan_cloud_storage_scan_gcp_storage_file_advanced(bucket_name, object_name, json_credential_file, opts = {})
|
452
|
+
data, _status_code, _headers = scan_cloud_storage_scan_gcp_storage_file_advanced_with_http_info(bucket_name, object_name, json_credential_file, opts)
|
453
|
+
data
|
454
|
+
end
|
455
|
+
|
456
|
+
# Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
|
457
|
+
# Advanced Scan the contents of a single Google Cloud Platform (GCP) Storage file and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
|
458
|
+
# @param bucket_name Name of the bucket in Google Cloud Storage
|
459
|
+
# @param object_name Name of the object or file in Google Cloud Storage
|
460
|
+
# @param json_credential_file Service Account credential for Google Cloud stored in a JSON file.
|
461
|
+
# @param [Hash] opts the optional parameters
|
462
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
463
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
464
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
465
|
+
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
466
|
+
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
467
|
+
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
468
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
469
|
+
# @return [Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>] CloudStorageAdvancedVirusScanResult data, response status code and response headers
|
470
|
+
def scan_cloud_storage_scan_gcp_storage_file_advanced_with_http_info(bucket_name, object_name, json_credential_file, opts = {})
|
471
|
+
if @api_client.config.debugging
|
472
|
+
@api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file_advanced ...'
|
473
|
+
end
|
474
|
+
# verify the required parameter 'bucket_name' is set
|
475
|
+
if @api_client.config.client_side_validation && bucket_name.nil?
|
476
|
+
fail ArgumentError, "Missing the required parameter 'bucket_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file_advanced"
|
477
|
+
end
|
478
|
+
# verify the required parameter 'object_name' is set
|
479
|
+
if @api_client.config.client_side_validation && object_name.nil?
|
480
|
+
fail ArgumentError, "Missing the required parameter 'object_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file_advanced"
|
481
|
+
end
|
482
|
+
# verify the required parameter 'json_credential_file' is set
|
483
|
+
if @api_client.config.client_side_validation && json_credential_file.nil?
|
484
|
+
fail ArgumentError, "Missing the required parameter 'json_credential_file' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file_advanced"
|
485
|
+
end
|
486
|
+
# resource path
|
487
|
+
local_var_path = '/virus/scan/cloud-storage/gcp-storage/single/advanced'
|
488
|
+
|
489
|
+
# query parameters
|
490
|
+
query_params = {}
|
491
|
+
|
492
|
+
# header parameters
|
493
|
+
header_params = {}
|
494
|
+
# HTTP header 'Accept' (if needed)
|
495
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
496
|
+
# HTTP header 'Content-Type'
|
497
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
498
|
+
header_params[:'bucketName'] = bucket_name
|
499
|
+
header_params[:'objectName'] = object_name
|
500
|
+
header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
|
501
|
+
header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
|
502
|
+
header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
|
503
|
+
header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
|
504
|
+
header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
|
505
|
+
header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
|
506
|
+
header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
|
507
|
+
|
508
|
+
# form parameters
|
509
|
+
form_params = {}
|
510
|
+
form_params['jsonCredentialFile'] = json_credential_file
|
511
|
+
|
512
|
+
# http body (model)
|
513
|
+
post_body = nil
|
514
|
+
auth_names = ['Apikey']
|
515
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
516
|
+
:header_params => header_params,
|
517
|
+
:query_params => query_params,
|
518
|
+
:form_params => form_params,
|
519
|
+
:body => post_body,
|
520
|
+
:auth_names => auth_names,
|
521
|
+
:return_type => 'CloudStorageAdvancedVirusScanResult')
|
522
|
+
if @api_client.config.debugging
|
523
|
+
@api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_gcp_storage_file_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
524
|
+
end
|
525
|
+
return data, status_code, headers
|
526
|
+
end
|
527
|
+
# Virus Scan a file in a SharePoint Online Site Drive
|
528
|
+
# Virus Scan the contents of a single SharePoint Online Site Drive file and its content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time. To get the Client ID and Client Secret, follow these steps: (1) Navigate to the Azure Portal and click on Azure Active Directory, (2) click on App Registrations on the left hand side, (3) click on Register Application, (4) Name the application CloudmersiveAntiVirus and click on Register, (5) Get the client ID by clicking on Overview and copying the value labeled Application (client) ID, (6) click on Certificates and Secrets, (7) click on New client secret, choose a longer expiration and give the secret a name, (8) copy the secret value to the clipboard and save it securely, this is your Client Secret, (9) Now we need to grant permissions to SharePOint; click on API Permissions on the left hand side, (10) click on Add a permission and choose Microsoft Graph, (11) click on Application Permissions, (12) search for Sites.FullControl.All, (13) Click on Add Permissions, (14) now navigate back to Azure Active Directory and click on Enterprise Applications, click on CloudmersiveAntiVirus and click on Permissions, and (15) click on Grant Admin Consent.
|
529
|
+
# @param client_id Client ID access credentials; see description above for instructions on how to get the Client ID from the Azure Active Directory portal.
|
530
|
+
# @param client_secret Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal
|
531
|
+
# @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
|
532
|
+
# @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
|
533
|
+
# @param file_path Path to the file within the drive, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
534
|
+
# @param [Hash] opts the optional parameters
|
535
|
+
# @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
|
536
|
+
# @option opts [String] :item_id SharePoint itemID, such as a DriveItem Id
|
537
|
+
# @return [CloudStorageVirusScanResult]
|
538
|
+
def scan_cloud_storage_scan_share_point_online_file(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {})
|
539
|
+
data, _status_code, _headers = scan_cloud_storage_scan_share_point_online_file_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts)
|
540
|
+
data
|
541
|
+
end
|
542
|
+
|
543
|
+
# Virus Scan a file in a SharePoint Online Site Drive
|
544
|
+
# Virus Scan the contents of a single SharePoint Online Site Drive file and its content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time. To get the Client ID and Client Secret, follow these steps: (1) Navigate to the Azure Portal and click on Azure Active Directory, (2) click on App Registrations on the left hand side, (3) click on Register Application, (4) Name the application CloudmersiveAntiVirus and click on Register, (5) Get the client ID by clicking on Overview and copying the value labeled Application (client) ID, (6) click on Certificates and Secrets, (7) click on New client secret, choose a longer expiration and give the secret a name, (8) copy the secret value to the clipboard and save it securely, this is your Client Secret, (9) Now we need to grant permissions to SharePOint; click on API Permissions on the left hand side, (10) click on Add a permission and choose Microsoft Graph, (11) click on Application Permissions, (12) search for Sites.FullControl.All, (13) Click on Add Permissions, (14) now navigate back to Azure Active Directory and click on Enterprise Applications, click on CloudmersiveAntiVirus and click on Permissions, and (15) click on Grant Admin Consent.
|
545
|
+
# @param client_id Client ID access credentials; see description above for instructions on how to get the Client ID from the Azure Active Directory portal.
|
546
|
+
# @param client_secret Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal
|
547
|
+
# @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
|
548
|
+
# @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
|
549
|
+
# @param file_path Path to the file within the drive, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
550
|
+
# @param [Hash] opts the optional parameters
|
551
|
+
# @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
|
552
|
+
# @option opts [String] :item_id SharePoint itemID, such as a DriveItem Id
|
553
|
+
# @return [Array<(CloudStorageVirusScanResult, Fixnum, Hash)>] CloudStorageVirusScanResult data, response status code and response headers
|
554
|
+
def scan_cloud_storage_scan_share_point_online_file_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {})
|
555
|
+
if @api_client.config.debugging
|
556
|
+
@api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file ...'
|
557
|
+
end
|
558
|
+
# verify the required parameter 'client_id' is set
|
559
|
+
if @api_client.config.client_side_validation && client_id.nil?
|
560
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
561
|
+
end
|
562
|
+
# verify the required parameter 'client_secret' is set
|
563
|
+
if @api_client.config.client_side_validation && client_secret.nil?
|
564
|
+
fail ArgumentError, "Missing the required parameter 'client_secret' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
565
|
+
end
|
566
|
+
# verify the required parameter 'sharepoint_domain_name' is set
|
567
|
+
if @api_client.config.client_side_validation && sharepoint_domain_name.nil?
|
568
|
+
fail ArgumentError, "Missing the required parameter 'sharepoint_domain_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
569
|
+
end
|
570
|
+
# verify the required parameter 'site_id' is set
|
571
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
572
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
573
|
+
end
|
574
|
+
# verify the required parameter 'file_path' is set
|
575
|
+
if @api_client.config.client_side_validation && file_path.nil?
|
576
|
+
fail ArgumentError, "Missing the required parameter 'file_path' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
577
|
+
end
|
578
|
+
# resource path
|
579
|
+
local_var_path = '/virus/scan/cloud-storage/sharepoint-online/site/single'
|
580
|
+
|
581
|
+
# query parameters
|
582
|
+
query_params = {}
|
583
|
+
|
584
|
+
# header parameters
|
585
|
+
header_params = {}
|
586
|
+
# HTTP header 'Accept' (if needed)
|
587
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
588
|
+
# HTTP header 'Content-Type'
|
589
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
590
|
+
header_params[:'clientID'] = client_id
|
591
|
+
header_params[:'clientSecret'] = client_secret
|
592
|
+
header_params[:'sharepointDomainName'] = sharepoint_domain_name
|
593
|
+
header_params[:'siteID'] = site_id
|
594
|
+
header_params[:'filePath'] = file_path
|
595
|
+
header_params[:'tenantID'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil?
|
596
|
+
header_params[:'itemID'] = opts[:'item_id'] if !opts[:'item_id'].nil?
|
597
|
+
|
598
|
+
# form parameters
|
599
|
+
form_params = {}
|
600
|
+
|
601
|
+
# http body (model)
|
602
|
+
post_body = nil
|
603
|
+
auth_names = ['Apikey']
|
604
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
605
|
+
:header_params => header_params,
|
606
|
+
:query_params => query_params,
|
607
|
+
:form_params => form_params,
|
608
|
+
:body => post_body,
|
609
|
+
:auth_names => auth_names,
|
610
|
+
:return_type => 'CloudStorageVirusScanResult')
|
611
|
+
if @api_client.config.debugging
|
612
|
+
@api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_share_point_online_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
613
|
+
end
|
614
|
+
return data, status_code, headers
|
615
|
+
end
|
616
|
+
# Advanced Virus Scan a file in a SharePoint Online Site Drive
|
617
|
+
# Advanced Virus Scan the contents of a single SharePoint Online Site Drive file and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time. To get the Client ID and Client Secret, follow these steps: (1) Navigate to the Azure Portal and click on Azure Active Directory, (2) click on App Registrations on the left hand side, (3) click on Register Application, (4) Name the application CloudmersiveAntiVirus and click on Register, (5) Get the client ID by clicking on Overview and copying the value labeled Application (client) ID, (6) click on Certificates and Secrets, (7) click on New client secret, choose a longer expiration and give the secret a name, (8) copy the secret value to the clipboard and save it securely, this is your Client Secret, (9) Now we need to grant permissions to SharePOint; click on API Permissions on the left hand side, (10) click on Add a permission and choose Microsoft Graph, (11) click on Application Permissions, (12) search for Sites.FullControl.All, (13) Click on Add Permissions, (14) now navigate back to Azure Active Directory and click on Enterprise Applications, click on CloudmersiveAntiVirus and click on Permissions, and (15) click on Grant Admin Consent.
|
618
|
+
# @param client_id Client ID access credentials; see description above for instructions on how to get the Client ID from the Azure Active Directory portal.
|
619
|
+
# @param client_secret Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal
|
620
|
+
# @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
|
621
|
+
# @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
|
622
|
+
# @param [Hash] opts the optional parameters
|
623
|
+
# @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
|
624
|
+
# @option opts [String] :file_path Path to the file within the drive, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
625
|
+
# @option opts [String] :item_id SharePoint itemID, such as a DriveItem Id
|
626
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
627
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
628
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
629
|
+
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
630
|
+
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
631
|
+
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
632
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
633
|
+
# @return [CloudStorageAdvancedVirusScanResult]
|
634
|
+
def scan_cloud_storage_scan_share_point_online_file_advanced(client_id, client_secret, sharepoint_domain_name, site_id, opts = {})
|
635
|
+
data, _status_code, _headers = scan_cloud_storage_scan_share_point_online_file_advanced_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, opts)
|
636
|
+
data
|
637
|
+
end
|
638
|
+
|
639
|
+
# Advanced Virus Scan a file in a SharePoint Online Site Drive
|
640
|
+
# Advanced Virus Scan the contents of a single SharePoint Online Site Drive file and its content for viruses and threats. Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time. To get the Client ID and Client Secret, follow these steps: (1) Navigate to the Azure Portal and click on Azure Active Directory, (2) click on App Registrations on the left hand side, (3) click on Register Application, (4) Name the application CloudmersiveAntiVirus and click on Register, (5) Get the client ID by clicking on Overview and copying the value labeled Application (client) ID, (6) click on Certificates and Secrets, (7) click on New client secret, choose a longer expiration and give the secret a name, (8) copy the secret value to the clipboard and save it securely, this is your Client Secret, (9) Now we need to grant permissions to SharePOint; click on API Permissions on the left hand side, (10) click on Add a permission and choose Microsoft Graph, (11) click on Application Permissions, (12) search for Sites.FullControl.All, (13) Click on Add Permissions, (14) now navigate back to Azure Active Directory and click on Enterprise Applications, click on CloudmersiveAntiVirus and click on Permissions, and (15) click on Grant Admin Consent.
|
641
|
+
# @param client_id Client ID access credentials; see description above for instructions on how to get the Client ID from the Azure Active Directory portal.
|
642
|
+
# @param client_secret Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal
|
643
|
+
# @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
|
644
|
+
# @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
|
645
|
+
# @param [Hash] opts the optional parameters
|
646
|
+
# @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
|
647
|
+
# @option opts [String] :file_path Path to the file within the drive, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
648
|
+
# @option opts [String] :item_id SharePoint itemID, such as a DriveItem Id
|
649
|
+
# @option opts [BOOLEAN] :allow_executables Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
650
|
+
# @option opts [BOOLEAN] :allow_invalid_files Set to false to block invalid files, such as a PDF file that is not really a valid PDF file, or a Word Document that is not a valid Word Document. Default is false (recommended).
|
651
|
+
# @option opts [BOOLEAN] :allow_scripts Set to false to block script files, such as a PHP files, Python scripts, and other malicious content or security threats that can be embedded in the file. Set to true to allow these file types. Default is false (recommended).
|
652
|
+
# @option opts [BOOLEAN] :allow_password_protected_files Set to false to block password protected and encrypted files, such as encrypted zip and rar files, and other files that seek to circumvent scanning through passwords. Set to true to allow these file types. Default is false (recommended).
|
653
|
+
# @option opts [BOOLEAN] :allow_macros Set to false to block macros and other threats embedded in document files, such as Word, Excel and PowerPoint embedded Macros, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
654
|
+
# @option opts [BOOLEAN] :allow_xml_external_entities Set to false to block XML External Entities and other threats embedded in XML files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).
|
655
|
+
# @option opts [String] :restrict_file_types Specify a restricted set of file formats to allow as clean as a comma-separated list of file formats, such as .pdf,.docx,.png would allow only PDF, PNG and Word document files. All files must pass content verification against this list of file formats, if they do not, then the result will be returned as CleanResult=false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.
|
656
|
+
# @return [Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>] CloudStorageAdvancedVirusScanResult data, response status code and response headers
|
657
|
+
def scan_cloud_storage_scan_share_point_online_file_advanced_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, opts = {})
|
658
|
+
if @api_client.config.debugging
|
659
|
+
@api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced ...'
|
660
|
+
end
|
661
|
+
# verify the required parameter 'client_id' is set
|
662
|
+
if @api_client.config.client_side_validation && client_id.nil?
|
663
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
664
|
+
end
|
665
|
+
# verify the required parameter 'client_secret' is set
|
666
|
+
if @api_client.config.client_side_validation && client_secret.nil?
|
667
|
+
fail ArgumentError, "Missing the required parameter 'client_secret' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
668
|
+
end
|
669
|
+
# verify the required parameter 'sharepoint_domain_name' is set
|
670
|
+
if @api_client.config.client_side_validation && sharepoint_domain_name.nil?
|
671
|
+
fail ArgumentError, "Missing the required parameter 'sharepoint_domain_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
672
|
+
end
|
673
|
+
# verify the required parameter 'site_id' is set
|
674
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
675
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
676
|
+
end
|
677
|
+
# resource path
|
678
|
+
local_var_path = '/virus/scan/cloud-storage/sharepoint-online/site/advanced'
|
679
|
+
|
680
|
+
# query parameters
|
681
|
+
query_params = {}
|
682
|
+
|
683
|
+
# header parameters
|
684
|
+
header_params = {}
|
685
|
+
# HTTP header 'Accept' (if needed)
|
686
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
687
|
+
# HTTP header 'Content-Type'
|
688
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
689
|
+
header_params[:'clientID'] = client_id
|
690
|
+
header_params[:'clientSecret'] = client_secret
|
691
|
+
header_params[:'sharepointDomainName'] = sharepoint_domain_name
|
692
|
+
header_params[:'siteID'] = site_id
|
693
|
+
header_params[:'tenantID'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil?
|
694
|
+
header_params[:'filePath'] = opts[:'file_path'] if !opts[:'file_path'].nil?
|
695
|
+
header_params[:'itemID'] = opts[:'item_id'] if !opts[:'item_id'].nil?
|
696
|
+
header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
|
697
|
+
header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
|
698
|
+
header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
|
699
|
+
header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
|
700
|
+
header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
|
701
|
+
header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
|
702
|
+
header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
|
703
|
+
|
704
|
+
# form parameters
|
705
|
+
form_params = {}
|
706
|
+
|
707
|
+
# http body (model)
|
708
|
+
post_body = nil
|
709
|
+
auth_names = ['Apikey']
|
710
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
711
|
+
:header_params => header_params,
|
712
|
+
:query_params => query_params,
|
713
|
+
:form_params => form_params,
|
714
|
+
:body => post_body,
|
715
|
+
:auth_names => auth_names,
|
716
|
+
:return_type => 'CloudStorageAdvancedVirusScanResult')
|
717
|
+
if @api_client.config.debugging
|
718
|
+
@api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_share_point_online_file_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
719
|
+
end
|
720
|
+
return data, status_code, headers
|
721
|
+
end
|
243
722
|
end
|
244
723
|
end
|