cloudmersive-virus-scan-api-client 2.0.3 → 2.0.7
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 +4 -0
- data/docs/ScanCloudStorageApi.md +393 -0
- data/docs/VirusScanAdvancedResult.md +2 -0
- data/lib/cloudmersive-virus-scan-api-client/api/scan_api.rb +6 -0
- data/lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb +477 -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 +21 -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 +2 -0
- data/spec/api/scan_cloud_storage_api_spec.rb +106 -0
- data/spec/models/cloud_storage_advanced_virus_scan_result_spec.rb +107 -0
- data/spec/models/virus_scan_advanced_result_spec.rb +12 -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,288 @@ 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
|
+
# @return [CloudStorageVirusScanResult]
|
537
|
+
def scan_cloud_storage_scan_share_point_online_file(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {})
|
538
|
+
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)
|
539
|
+
data
|
540
|
+
end
|
541
|
+
|
542
|
+
# Virus Scan a file in a SharePoint Online Site Drive
|
543
|
+
# 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.
|
544
|
+
# @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.
|
545
|
+
# @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
|
546
|
+
# @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
|
547
|
+
# @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
|
548
|
+
# @param file_path Path to the file within the drive, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
549
|
+
# @param [Hash] opts the optional parameters
|
550
|
+
# @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
|
551
|
+
# @return [Array<(CloudStorageVirusScanResult, Fixnum, Hash)>] CloudStorageVirusScanResult data, response status code and response headers
|
552
|
+
def scan_cloud_storage_scan_share_point_online_file_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {})
|
553
|
+
if @api_client.config.debugging
|
554
|
+
@api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file ...'
|
555
|
+
end
|
556
|
+
# verify the required parameter 'client_id' is set
|
557
|
+
if @api_client.config.client_side_validation && client_id.nil?
|
558
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
559
|
+
end
|
560
|
+
# verify the required parameter 'client_secret' is set
|
561
|
+
if @api_client.config.client_side_validation && client_secret.nil?
|
562
|
+
fail ArgumentError, "Missing the required parameter 'client_secret' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
563
|
+
end
|
564
|
+
# verify the required parameter 'sharepoint_domain_name' is set
|
565
|
+
if @api_client.config.client_side_validation && sharepoint_domain_name.nil?
|
566
|
+
fail ArgumentError, "Missing the required parameter 'sharepoint_domain_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
567
|
+
end
|
568
|
+
# verify the required parameter 'site_id' is set
|
569
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
570
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
571
|
+
end
|
572
|
+
# verify the required parameter 'file_path' is set
|
573
|
+
if @api_client.config.client_side_validation && file_path.nil?
|
574
|
+
fail ArgumentError, "Missing the required parameter 'file_path' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
|
575
|
+
end
|
576
|
+
# resource path
|
577
|
+
local_var_path = '/virus/scan/cloud-storage/sharepoint-online/site/single'
|
578
|
+
|
579
|
+
# query parameters
|
580
|
+
query_params = {}
|
581
|
+
|
582
|
+
# header parameters
|
583
|
+
header_params = {}
|
584
|
+
# HTTP header 'Accept' (if needed)
|
585
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
586
|
+
# HTTP header 'Content-Type'
|
587
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
588
|
+
header_params[:'clientID'] = client_id
|
589
|
+
header_params[:'clientSecret'] = client_secret
|
590
|
+
header_params[:'sharepointDomainName'] = sharepoint_domain_name
|
591
|
+
header_params[:'siteID'] = site_id
|
592
|
+
header_params[:'filePath'] = file_path
|
593
|
+
header_params[:'tenantID'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil?
|
594
|
+
|
595
|
+
# form parameters
|
596
|
+
form_params = {}
|
597
|
+
|
598
|
+
# http body (model)
|
599
|
+
post_body = nil
|
600
|
+
auth_names = ['Apikey']
|
601
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
602
|
+
:header_params => header_params,
|
603
|
+
:query_params => query_params,
|
604
|
+
:form_params => form_params,
|
605
|
+
:body => post_body,
|
606
|
+
:auth_names => auth_names,
|
607
|
+
:return_type => 'CloudStorageVirusScanResult')
|
608
|
+
if @api_client.config.debugging
|
609
|
+
@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}"
|
610
|
+
end
|
611
|
+
return data, status_code, headers
|
612
|
+
end
|
613
|
+
# Advanced Virus Scan a file in a SharePoint Online Site Drive
|
614
|
+
# 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.
|
615
|
+
# @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.
|
616
|
+
# @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
|
617
|
+
# @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
|
618
|
+
# @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
|
619
|
+
# @param file_path Path to the file within the drive, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
620
|
+
# @param [Hash] opts the optional parameters
|
621
|
+
# @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
|
622
|
+
# @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).
|
623
|
+
# @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).
|
624
|
+
# @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).
|
625
|
+
# @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).
|
626
|
+
# @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).
|
627
|
+
# @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).
|
628
|
+
# @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.
|
629
|
+
# @return [CloudStorageAdvancedVirusScanResult]
|
630
|
+
def scan_cloud_storage_scan_share_point_online_file_advanced(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {})
|
631
|
+
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, file_path, opts)
|
632
|
+
data
|
633
|
+
end
|
634
|
+
|
635
|
+
# Advanced Virus Scan a file in a SharePoint Online Site Drive
|
636
|
+
# 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.
|
637
|
+
# @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.
|
638
|
+
# @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
|
639
|
+
# @param sharepoint_domain_name SharePoint Online domain name, such as mydomain.sharepoint.com
|
640
|
+
# @param site_id Site ID (GUID) of the SharePoint site you wish to retrieve the file from
|
641
|
+
# @param file_path Path to the file within the drive, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
642
|
+
# @param [Hash] opts the optional parameters
|
643
|
+
# @option opts [String] :tenant_id Optional; Tenant ID of your Azure Active Directory
|
644
|
+
# @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).
|
645
|
+
# @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).
|
646
|
+
# @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).
|
647
|
+
# @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).
|
648
|
+
# @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).
|
649
|
+
# @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).
|
650
|
+
# @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.
|
651
|
+
# @return [Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>] CloudStorageAdvancedVirusScanResult data, response status code and response headers
|
652
|
+
def scan_cloud_storage_scan_share_point_online_file_advanced_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {})
|
653
|
+
if @api_client.config.debugging
|
654
|
+
@api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced ...'
|
655
|
+
end
|
656
|
+
# verify the required parameter 'client_id' is set
|
657
|
+
if @api_client.config.client_side_validation && client_id.nil?
|
658
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
659
|
+
end
|
660
|
+
# verify the required parameter 'client_secret' is set
|
661
|
+
if @api_client.config.client_side_validation && client_secret.nil?
|
662
|
+
fail ArgumentError, "Missing the required parameter 'client_secret' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
663
|
+
end
|
664
|
+
# verify the required parameter 'sharepoint_domain_name' is set
|
665
|
+
if @api_client.config.client_side_validation && sharepoint_domain_name.nil?
|
666
|
+
fail ArgumentError, "Missing the required parameter 'sharepoint_domain_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
667
|
+
end
|
668
|
+
# verify the required parameter 'site_id' is set
|
669
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
670
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
671
|
+
end
|
672
|
+
# verify the required parameter 'file_path' is set
|
673
|
+
if @api_client.config.client_side_validation && file_path.nil?
|
674
|
+
fail ArgumentError, "Missing the required parameter 'file_path' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
|
675
|
+
end
|
676
|
+
# resource path
|
677
|
+
local_var_path = '/virus/scan/cloud-storage/sharepoint-online/site/advanced'
|
678
|
+
|
679
|
+
# query parameters
|
680
|
+
query_params = {}
|
681
|
+
|
682
|
+
# header parameters
|
683
|
+
header_params = {}
|
684
|
+
# HTTP header 'Accept' (if needed)
|
685
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
686
|
+
# HTTP header 'Content-Type'
|
687
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
688
|
+
header_params[:'clientID'] = client_id
|
689
|
+
header_params[:'clientSecret'] = client_secret
|
690
|
+
header_params[:'sharepointDomainName'] = sharepoint_domain_name
|
691
|
+
header_params[:'siteID'] = site_id
|
692
|
+
header_params[:'filePath'] = file_path
|
693
|
+
header_params[:'tenantID'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil?
|
694
|
+
header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
|
695
|
+
header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
|
696
|
+
header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
|
697
|
+
header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
|
698
|
+
header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
|
699
|
+
header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
|
700
|
+
header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?
|
701
|
+
|
702
|
+
# form parameters
|
703
|
+
form_params = {}
|
704
|
+
|
705
|
+
# http body (model)
|
706
|
+
post_body = nil
|
707
|
+
auth_names = ['Apikey']
|
708
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
709
|
+
:header_params => header_params,
|
710
|
+
:query_params => query_params,
|
711
|
+
:form_params => form_params,
|
712
|
+
:body => post_body,
|
713
|
+
:auth_names => auth_names,
|
714
|
+
:return_type => 'CloudStorageAdvancedVirusScanResult')
|
715
|
+
if @api_client.config.debugging
|
716
|
+
@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}"
|
717
|
+
end
|
718
|
+
return data, status_code, headers
|
719
|
+
end
|
243
720
|
end
|
244
721
|
end
|