cloudmersive-virus-scan-api-client 2.0.1 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -0
- data/README.md +117 -0
- data/Rakefile +8 -0
- data/cloudmersive-virus-scan-api-client.gemspec +45 -0
- data/docs/CloudStorageAdvancedVirusScanResult.md +19 -0
- data/docs/CloudStorageVirusFound.md +9 -0
- data/docs/CloudStorageVirusScanResult.md +12 -0
- data/docs/ScanApi.md +189 -0
- data/docs/ScanCloudStorageApi.md +428 -0
- data/docs/VirusFound.md +9 -0
- data/docs/VirusScanAdvancedResult.md +17 -0
- data/docs/VirusScanResult.md +9 -0
- data/docs/WebsiteScanRequest.md +8 -0
- data/docs/WebsiteScanResult.md +11 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-virus-scan-api-client.rb +49 -0
- data/lib/cloudmersive-virus-scan-api-client/api/scan_api.rb +208 -0
- data/lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb +519 -0
- data/lib/cloudmersive-virus-scan-api-client/api_client.rb +391 -0
- data/lib/cloudmersive-virus-scan-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-virus-scan-api-client/configuration.rb +209 -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/cloud_storage_virus_found.rb +196 -0
- data/lib/cloudmersive-virus-scan-api-client/models/cloud_storage_virus_scan_result.rb +228 -0
- data/lib/cloudmersive-virus-scan-api-client/models/virus_found.rb +196 -0
- data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_advanced_result.rb +278 -0
- data/lib/cloudmersive-virus-scan-api-client/models/virus_scan_result.rb +198 -0
- data/lib/cloudmersive-virus-scan-api-client/models/website_scan_request.rb +186 -0
- data/lib/cloudmersive-virus-scan-api-client/models/website_scan_result.rb +252 -0
- data/lib/cloudmersive-virus-scan-api-client/version.rb +15 -0
- data/spec/api/scan_api_spec.rb +78 -0
- data/spec/api/scan_cloud_storage_api_spec.rb +141 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/cloud_storage_advanced_virus_scan_result_spec.rb +107 -0
- data/spec/models/cloud_storage_virus_found_spec.rb +47 -0
- data/spec/models/cloud_storage_virus_scan_result_spec.rb +65 -0
- data/spec/models/virus_found_spec.rb +47 -0
- data/spec/models/virus_scan_advanced_result_spec.rb +95 -0
- data/spec/models/virus_scan_result_spec.rb +47 -0
- data/spec/models/website_scan_request_spec.rb +41 -0
- data/spec/models/website_scan_result_spec.rb +63 -0
- data/spec/spec_helper.rb +111 -0
- metadata +46 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b219ed89cc3e638e3eb9346a852aa828a4506074ee28a13275a91e29ce2909c
|
4
|
+
data.tar.gz: e50917fa99b594f83a7e0df10eeb30b29ff476137f4e8d4e9892aa39cb4b5c1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8f7c2d1cf525858c66a4a132441772a101de3f5cb6dcd4a86906f18a11b6ee2329eab4bae1cdc0a80d43f26a6f3676b135def6ab36f075e9b9f49b68ce4af9d
|
7
|
+
data.tar.gz: a0012c90dd060ea92615cc53d474ae6865ec616cd0641504dbf662a7e7f70b6ec7e3fac5b4fe12e634f1e072f75b9275d65caf2d55b17f2ffa57c9160cd85b88
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
# cloudmersive-virus-scan-api-client
|
2
|
+
|
3
|
+
CloudmersiveVirusScanApiClient - the Ruby gem for the virusapi
|
4
|
+
|
5
|
+
The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: v1
|
10
|
+
- Package version: 2.0.6
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build cloudmersive-virus-scan-api-client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./cloudmersive-virus-scan-api-client-2.0.6.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-virus-scan-api-client-2.0.6.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'cloudmersive-virus-scan-api-client', '~> 2.0.6'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
39
|
+
|
40
|
+
gem 'cloudmersive-virus-scan-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'cloudmersive-virus-scan-api-client'
|
56
|
+
|
57
|
+
# Setup authorization
|
58
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
59
|
+
# Configure API key authorization: Apikey
|
60
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
61
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
62
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
63
|
+
end
|
64
|
+
|
65
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
|
66
|
+
|
67
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
68
|
+
|
69
|
+
|
70
|
+
begin
|
71
|
+
#Scan a file for viruses
|
72
|
+
result = api_instance.scan_file(input_file)
|
73
|
+
p result
|
74
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
75
|
+
puts "Exception when calling ScanApi->scan_file: #{e}"
|
76
|
+
end
|
77
|
+
|
78
|
+
```
|
79
|
+
|
80
|
+
## Documentation for API Endpoints
|
81
|
+
|
82
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
83
|
+
|
84
|
+
Class | Method | HTTP request | Description
|
85
|
+
------------ | ------------- | ------------- | -------------
|
86
|
+
*CloudmersiveVirusScanApiClient::ScanApi* | [**scan_file**](docs/ScanApi.md#scan_file) | **POST** /virus/scan/file | Scan a file for viruses
|
87
|
+
*CloudmersiveVirusScanApiClient::ScanApi* | [**scan_file_advanced**](docs/ScanApi.md#scan_file_advanced) | **POST** /virus/scan/file/advanced | Advanced Scan a file for viruses
|
88
|
+
*CloudmersiveVirusScanApiClient::ScanApi* | [**scan_website**](docs/ScanApi.md#scan_website) | **POST** /virus/scan/website | Scan a website for malicious content and threats
|
89
|
+
*CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_aws_s3_file**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_aws_s3_file) | **POST** /virus/scan/cloud-storage/aws-s3/single | Scan an AWS S3 file for viruses
|
90
|
+
*CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_aws_s3_file_advanced**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_aws_s3_file_advanced) | **POST** /virus/scan/cloud-storage/aws-s3/single/advanced | Advanced Scan an AWS S3 file for viruses
|
91
|
+
*CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_azure_blob**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_azure_blob) | **POST** /virus/scan/cloud-storage/azure-blob/single | Scan an Azure Blob for viruses
|
92
|
+
*CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_azure_blob_advanced**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_azure_blob_advanced) | **POST** /virus/scan/cloud-storage/azure-blob/single/advanced | Advanced Scan an Azure Blob for viruses
|
93
|
+
*CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_gcp_storage_file**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_gcp_storage_file) | **POST** /virus/scan/cloud-storage/gcp-storage/single | Scan an Google Cloud Platform (GCP) Storage file for viruses
|
94
|
+
*CloudmersiveVirusScanApiClient::ScanCloudStorageApi* | [**scan_cloud_storage_scan_gcp_storage_file_advanced**](docs/ScanCloudStorageApi.md#scan_cloud_storage_scan_gcp_storage_file_advanced) | **POST** /virus/scan/cloud-storage/gcp-storage/single/advanced | Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
|
95
|
+
|
96
|
+
|
97
|
+
## Documentation for Models
|
98
|
+
|
99
|
+
- [CloudmersiveVirusScanApiClient::CloudStorageAdvancedVirusScanResult](docs/CloudStorageAdvancedVirusScanResult.md)
|
100
|
+
- [CloudmersiveVirusScanApiClient::CloudStorageVirusFound](docs/CloudStorageVirusFound.md)
|
101
|
+
- [CloudmersiveVirusScanApiClient::CloudStorageVirusScanResult](docs/CloudStorageVirusScanResult.md)
|
102
|
+
- [CloudmersiveVirusScanApiClient::VirusFound](docs/VirusFound.md)
|
103
|
+
- [CloudmersiveVirusScanApiClient::VirusScanAdvancedResult](docs/VirusScanAdvancedResult.md)
|
104
|
+
- [CloudmersiveVirusScanApiClient::VirusScanResult](docs/VirusScanResult.md)
|
105
|
+
- [CloudmersiveVirusScanApiClient::WebsiteScanRequest](docs/WebsiteScanRequest.md)
|
106
|
+
- [CloudmersiveVirusScanApiClient::WebsiteScanResult](docs/WebsiteScanResult.md)
|
107
|
+
|
108
|
+
|
109
|
+
## Documentation for Authorization
|
110
|
+
|
111
|
+
|
112
|
+
### Apikey
|
113
|
+
|
114
|
+
- **Type**: API key
|
115
|
+
- **API key parameter name**: Apikey
|
116
|
+
- **Location**: HTTP header
|
117
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#virusapi
|
5
|
+
|
6
|
+
#The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.
|
7
|
+
|
8
|
+
OpenAPI spec version: v1
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 2.4.14
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "cloudmersive-virus-scan-api-client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "cloudmersive-virus-scan-api-client"
|
20
|
+
s.version = CloudmersiveVirusScanApiClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Cloudmersive"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://www.cloudmersive.com/virus-api"
|
25
|
+
s.summary = "Scan files and content for viruses."
|
26
|
+
s.description = "Virus API lets you scan files and content for viruses and identify security issues with content."
|
27
|
+
s.license = 'Apache 2.0'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = Dir['./**/*']
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# CloudmersiveVirusScanApiClient::CloudStorageAdvancedVirusScanResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation of retrieving the file, and scanning it were successfully completed, false if the file could not be downloaded from cloud storage, or if the file could not be scanned. Note that successful completion does not mean the file is clean; for the output of the virus scanning operation itself, use the CleanResult and FoundViruses parameters. | [optional]
|
7
|
+
**clean_result** | **BOOLEAN** | True if the scan contained no viruses, false otherwise | [optional]
|
8
|
+
**contains_executable** | **BOOLEAN** | True if the scan contained an executable (application code), which can be a significant risk factor | [optional]
|
9
|
+
**contains_invalid_file** | **BOOLEAN** | True if the scan contained an invalid file (such as a PDF that is not a valid PDF, Word Document that is not a valid Word Document, etc.), which can be a significant risk factor | [optional]
|
10
|
+
**contains_script** | **BOOLEAN** | True if the scan contained a script (such as a PHP script, Python script, etc.) which can be a significant risk factor | [optional]
|
11
|
+
**contains_password_protected_file** | **BOOLEAN** | True if the scan contained a password protected or encrypted file, which can be a significant risk factor | [optional]
|
12
|
+
**contains_restricted_file_format** | **BOOLEAN** | True if the uploaded file is of a type that is not allowed based on the optional restrictFileTypes parameter, false otherwise; if restrictFileTypes is not set, this will always be false | [optional]
|
13
|
+
**contains_macros** | **BOOLEAN** | True if the uploaded file contains embedded Macros of other embedded threats within the document, which can be a significant risk factor | [optional]
|
14
|
+
**verified_file_format** | **String** | For file format verification-supported file formats, the contents-verified file format of the file. Null indicates that the file format is not supported for contents verification. If a Virus or Malware is found, this field will always be set to Null. | [optional]
|
15
|
+
**found_viruses** | [**Array<CloudStorageVirusFound>**](CloudStorageVirusFound.md) | Array of viruses found, if any | [optional]
|
16
|
+
**error_detailed_description** | **String** | Detailed error message if the operation was not successful | [optional]
|
17
|
+
**file_size** | **Integer** | Size in bytes of the file that was retrieved and scanned | [optional]
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveVirusScanApiClient::CloudStorageVirusFound
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**file_name** | **String** | Name of the file containing the virus | [optional]
|
7
|
+
**virus_name** | **String** | Name of the virus that was found | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# CloudmersiveVirusScanApiClient::CloudStorageVirusScanResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation of retrieving the file, and scanning it were successfully completed, false if the file could not be downloaded from cloud storage, or if the file could not be scanned. Note that successful completion does not mean the file is clean; for the output of the virus scanning operation itself, use the CleanResult and FoundViruses parameters. | [optional]
|
7
|
+
**clean_result** | **BOOLEAN** | True if the scan contained no viruses, false otherwise | [optional]
|
8
|
+
**found_viruses** | [**Array<CloudStorageVirusFound>**](CloudStorageVirusFound.md) | Array of viruses found, if any | [optional]
|
9
|
+
**error_detailed_description** | **String** | Detailed error message if the operation was not successful | [optional]
|
10
|
+
**file_size** | **Integer** | Size in bytes of the file that was retrieved and scanned | [optional]
|
11
|
+
|
12
|
+
|
data/docs/ScanApi.md
ADDED
@@ -0,0 +1,189 @@
|
|
1
|
+
# CloudmersiveVirusScanApiClient::ScanApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**scan_file**](ScanApi.md#scan_file) | **POST** /virus/scan/file | Scan a file for viruses
|
8
|
+
[**scan_file_advanced**](ScanApi.md#scan_file_advanced) | **POST** /virus/scan/file/advanced | Advanced Scan a file for viruses
|
9
|
+
[**scan_website**](ScanApi.md#scan_website) | **POST** /virus/scan/website | Scan a website for malicious content and threats
|
10
|
+
|
11
|
+
|
12
|
+
# **scan_file**
|
13
|
+
> VirusScanResult scan_file(input_file)
|
14
|
+
|
15
|
+
Scan a file for viruses
|
16
|
+
|
17
|
+
Scan files and 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.
|
18
|
+
|
19
|
+
### Example
|
20
|
+
```ruby
|
21
|
+
# load the gem
|
22
|
+
require 'cloudmersive-virus-scan-api-client'
|
23
|
+
# setup authorization
|
24
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
25
|
+
# Configure API key authorization: Apikey
|
26
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
27
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
28
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
|
32
|
+
|
33
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
34
|
+
|
35
|
+
|
36
|
+
begin
|
37
|
+
#Scan a file for viruses
|
38
|
+
result = api_instance.scan_file(input_file)
|
39
|
+
p result
|
40
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
41
|
+
puts "Exception when calling ScanApi->scan_file: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
### Parameters
|
46
|
+
|
47
|
+
Name | Type | Description | Notes
|
48
|
+
------------- | ------------- | ------------- | -------------
|
49
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
50
|
+
|
51
|
+
### Return type
|
52
|
+
|
53
|
+
[**VirusScanResult**](VirusScanResult.md)
|
54
|
+
|
55
|
+
### Authorization
|
56
|
+
|
57
|
+
[Apikey](../README.md#Apikey)
|
58
|
+
|
59
|
+
### HTTP request headers
|
60
|
+
|
61
|
+
- **Content-Type**: multipart/form-data
|
62
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
# **scan_file_advanced**
|
67
|
+
> VirusScanAdvancedResult scan_file_advanced(input_file, opts)
|
68
|
+
|
69
|
+
Advanced Scan a file for viruses
|
70
|
+
|
71
|
+
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.
|
72
|
+
|
73
|
+
### Example
|
74
|
+
```ruby
|
75
|
+
# load the gem
|
76
|
+
require 'cloudmersive-virus-scan-api-client'
|
77
|
+
# setup authorization
|
78
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
79
|
+
# Configure API key authorization: Apikey
|
80
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
81
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
82
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
83
|
+
end
|
84
|
+
|
85
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
|
86
|
+
|
87
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
88
|
+
|
89
|
+
opts = {
|
90
|
+
allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
91
|
+
allow_invalid_files: true, # BOOLEAN | 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).
|
92
|
+
allow_scripts: true, # BOOLEAN | 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).
|
93
|
+
allow_password_protected_files: true, # BOOLEAN | 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).
|
94
|
+
allow_macros: true, # BOOLEAN | 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).
|
95
|
+
allow_xml_external_entities: true, # BOOLEAN | 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).
|
96
|
+
restrict_file_types: 'restrict_file_types_example' # String | 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.
|
97
|
+
}
|
98
|
+
|
99
|
+
begin
|
100
|
+
#Advanced Scan a file for viruses
|
101
|
+
result = api_instance.scan_file_advanced(input_file, opts)
|
102
|
+
p result
|
103
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
104
|
+
puts "Exception when calling ScanApi->scan_file_advanced: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
### Parameters
|
109
|
+
|
110
|
+
Name | Type | Description | Notes
|
111
|
+
------------- | ------------- | ------------- | -------------
|
112
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
113
|
+
**allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
|
114
|
+
**allow_invalid_files** | **BOOLEAN**| 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). | [optional]
|
115
|
+
**allow_scripts** | **BOOLEAN**| 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). | [optional]
|
116
|
+
**allow_password_protected_files** | **BOOLEAN**| 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). | [optional]
|
117
|
+
**allow_macros** | **BOOLEAN**| 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). | [optional]
|
118
|
+
**allow_xml_external_entities** | **BOOLEAN**| 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). | [optional]
|
119
|
+
**restrict_file_types** | **String**| 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. | [optional]
|
120
|
+
|
121
|
+
### Return type
|
122
|
+
|
123
|
+
[**VirusScanAdvancedResult**](VirusScanAdvancedResult.md)
|
124
|
+
|
125
|
+
### Authorization
|
126
|
+
|
127
|
+
[Apikey](../README.md#Apikey)
|
128
|
+
|
129
|
+
### HTTP request headers
|
130
|
+
|
131
|
+
- **Content-Type**: multipart/form-data
|
132
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
# **scan_website**
|
137
|
+
> WebsiteScanResult scan_website(input)
|
138
|
+
|
139
|
+
Scan a website for malicious content and threats
|
140
|
+
|
141
|
+
Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
|
142
|
+
|
143
|
+
### Example
|
144
|
+
```ruby
|
145
|
+
# load the gem
|
146
|
+
require 'cloudmersive-virus-scan-api-client'
|
147
|
+
# setup authorization
|
148
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
149
|
+
# Configure API key authorization: Apikey
|
150
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
151
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
152
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
153
|
+
end
|
154
|
+
|
155
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanApi.new
|
156
|
+
|
157
|
+
input = CloudmersiveVirusScanApiClient::WebsiteScanRequest.new # WebsiteScanRequest |
|
158
|
+
|
159
|
+
|
160
|
+
begin
|
161
|
+
#Scan a website for malicious content and threats
|
162
|
+
result = api_instance.scan_website(input)
|
163
|
+
p result
|
164
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
165
|
+
puts "Exception when calling ScanApi->scan_website: #{e}"
|
166
|
+
end
|
167
|
+
```
|
168
|
+
|
169
|
+
### Parameters
|
170
|
+
|
171
|
+
Name | Type | Description | Notes
|
172
|
+
------------- | ------------- | ------------- | -------------
|
173
|
+
**input** | [**WebsiteScanRequest**](WebsiteScanRequest.md)| |
|
174
|
+
|
175
|
+
### Return type
|
176
|
+
|
177
|
+
[**WebsiteScanResult**](WebsiteScanResult.md)
|
178
|
+
|
179
|
+
### Authorization
|
180
|
+
|
181
|
+
[Apikey](../README.md#Apikey)
|
182
|
+
|
183
|
+
### HTTP request headers
|
184
|
+
|
185
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
186
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
187
|
+
|
188
|
+
|
189
|
+
|
@@ -0,0 +1,428 @@
|
|
1
|
+
# CloudmersiveVirusScanApiClient::ScanCloudStorageApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**scan_cloud_storage_scan_aws_s3_file**](ScanCloudStorageApi.md#scan_cloud_storage_scan_aws_s3_file) | **POST** /virus/scan/cloud-storage/aws-s3/single | Scan an AWS S3 file for viruses
|
8
|
+
[**scan_cloud_storage_scan_aws_s3_file_advanced**](ScanCloudStorageApi.md#scan_cloud_storage_scan_aws_s3_file_advanced) | **POST** /virus/scan/cloud-storage/aws-s3/single/advanced | Advanced Scan an AWS S3 file for viruses
|
9
|
+
[**scan_cloud_storage_scan_azure_blob**](ScanCloudStorageApi.md#scan_cloud_storage_scan_azure_blob) | **POST** /virus/scan/cloud-storage/azure-blob/single | Scan an Azure Blob for viruses
|
10
|
+
[**scan_cloud_storage_scan_azure_blob_advanced**](ScanCloudStorageApi.md#scan_cloud_storage_scan_azure_blob_advanced) | **POST** /virus/scan/cloud-storage/azure-blob/single/advanced | Advanced Scan an Azure Blob for viruses
|
11
|
+
[**scan_cloud_storage_scan_gcp_storage_file**](ScanCloudStorageApi.md#scan_cloud_storage_scan_gcp_storage_file) | **POST** /virus/scan/cloud-storage/gcp-storage/single | Scan an Google Cloud Platform (GCP) Storage file for viruses
|
12
|
+
[**scan_cloud_storage_scan_gcp_storage_file_advanced**](ScanCloudStorageApi.md#scan_cloud_storage_scan_gcp_storage_file_advanced) | **POST** /virus/scan/cloud-storage/gcp-storage/single/advanced | Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
|
13
|
+
|
14
|
+
|
15
|
+
# **scan_cloud_storage_scan_aws_s3_file**
|
16
|
+
> CloudStorageVirusScanResult scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name)
|
17
|
+
|
18
|
+
Scan an AWS S3 file for viruses
|
19
|
+
|
20
|
+
Scan the contents of a single AWS S3 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.
|
21
|
+
|
22
|
+
### Example
|
23
|
+
```ruby
|
24
|
+
# load the gem
|
25
|
+
require 'cloudmersive-virus-scan-api-client'
|
26
|
+
# setup authorization
|
27
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
28
|
+
# Configure API key authorization: Apikey
|
29
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
30
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
|
35
|
+
|
36
|
+
access_key = 'access_key_example' # String | AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console
|
37
|
+
|
38
|
+
secret_key = 'secret_key_example' # String | AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console
|
39
|
+
|
40
|
+
bucket_region = 'bucket_region_example' # String | Name of the region of the S3 bucket, such as 'US-East-1'
|
41
|
+
|
42
|
+
bucket_name = 'bucket_name_example' # String | Name of the S3 bucket
|
43
|
+
|
44
|
+
key_name = 'key_name_example' # String | Key name (also called file name) of the file in S3 that you wish to scan for viruses
|
45
|
+
|
46
|
+
|
47
|
+
begin
|
48
|
+
#Scan an AWS S3 file for viruses
|
49
|
+
result = api_instance.scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name)
|
50
|
+
p result
|
51
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
52
|
+
puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_aws_s3_file: #{e}"
|
53
|
+
end
|
54
|
+
```
|
55
|
+
|
56
|
+
### Parameters
|
57
|
+
|
58
|
+
Name | Type | Description | Notes
|
59
|
+
------------- | ------------- | ------------- | -------------
|
60
|
+
**access_key** | **String**| AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console |
|
61
|
+
**secret_key** | **String**| AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console |
|
62
|
+
**bucket_region** | **String**| Name of the region of the S3 bucket, such as 'US-East-1' |
|
63
|
+
**bucket_name** | **String**| Name of the S3 bucket |
|
64
|
+
**key_name** | **String**| Key name (also called file name) of the file in S3 that you wish to scan for viruses |
|
65
|
+
|
66
|
+
### Return type
|
67
|
+
|
68
|
+
[**CloudStorageVirusScanResult**](CloudStorageVirusScanResult.md)
|
69
|
+
|
70
|
+
### Authorization
|
71
|
+
|
72
|
+
[Apikey](../README.md#Apikey)
|
73
|
+
|
74
|
+
### HTTP request headers
|
75
|
+
|
76
|
+
- **Content-Type**: multipart/form-data
|
77
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
# **scan_cloud_storage_scan_aws_s3_file_advanced**
|
82
|
+
> CloudStorageAdvancedVirusScanResult scan_cloud_storage_scan_aws_s3_file_advanced(access_key, secret_key, bucket_region, bucket_name, key_name, opts)
|
83
|
+
|
84
|
+
Advanced Scan an AWS S3 file for viruses
|
85
|
+
|
86
|
+
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.
|
87
|
+
|
88
|
+
### Example
|
89
|
+
```ruby
|
90
|
+
# load the gem
|
91
|
+
require 'cloudmersive-virus-scan-api-client'
|
92
|
+
# setup authorization
|
93
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
94
|
+
# Configure API key authorization: Apikey
|
95
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
96
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
97
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
98
|
+
end
|
99
|
+
|
100
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
|
101
|
+
|
102
|
+
access_key = 'access_key_example' # String | AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console
|
103
|
+
|
104
|
+
secret_key = 'secret_key_example' # String | AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console
|
105
|
+
|
106
|
+
bucket_region = 'bucket_region_example' # String | Name of the region of the S3 bucket, such as 'US-East-1'
|
107
|
+
|
108
|
+
bucket_name = 'bucket_name_example' # String | Name of the S3 bucket
|
109
|
+
|
110
|
+
key_name = 'key_name_example' # String | Key name (also called file name) of the file in S3 that you wish to scan for viruses
|
111
|
+
|
112
|
+
opts = {
|
113
|
+
allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
114
|
+
allow_invalid_files: true, # BOOLEAN | 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
|
+
allow_scripts: true, # BOOLEAN | 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
|
+
allow_password_protected_files: true, # BOOLEAN | 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
|
+
allow_macros: true, # BOOLEAN | 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
|
+
restrict_file_types: 'restrict_file_types_example' # String | 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.
|
119
|
+
}
|
120
|
+
|
121
|
+
begin
|
122
|
+
#Advanced Scan an AWS S3 file for viruses
|
123
|
+
result = api_instance.scan_cloud_storage_scan_aws_s3_file_advanced(access_key, secret_key, bucket_region, bucket_name, key_name, opts)
|
124
|
+
p result
|
125
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
126
|
+
puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_aws_s3_file_advanced: #{e}"
|
127
|
+
end
|
128
|
+
```
|
129
|
+
|
130
|
+
### Parameters
|
131
|
+
|
132
|
+
Name | Type | Description | Notes
|
133
|
+
------------- | ------------- | ------------- | -------------
|
134
|
+
**access_key** | **String**| AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console |
|
135
|
+
**secret_key** | **String**| AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console |
|
136
|
+
**bucket_region** | **String**| Name of the region of the S3 bucket, such as 'US-East-1' |
|
137
|
+
**bucket_name** | **String**| Name of the S3 bucket |
|
138
|
+
**key_name** | **String**| Key name (also called file name) of the file in S3 that you wish to scan for viruses |
|
139
|
+
**allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
|
140
|
+
**allow_invalid_files** | **BOOLEAN**| 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). | [optional]
|
141
|
+
**allow_scripts** | **BOOLEAN**| 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). | [optional]
|
142
|
+
**allow_password_protected_files** | **BOOLEAN**| 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). | [optional]
|
143
|
+
**allow_macros** | **BOOLEAN**| 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). | [optional]
|
144
|
+
**restrict_file_types** | **String**| 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. | [optional]
|
145
|
+
|
146
|
+
### Return type
|
147
|
+
|
148
|
+
[**CloudStorageAdvancedVirusScanResult**](CloudStorageAdvancedVirusScanResult.md)
|
149
|
+
|
150
|
+
### Authorization
|
151
|
+
|
152
|
+
[Apikey](../README.md#Apikey)
|
153
|
+
|
154
|
+
### HTTP request headers
|
155
|
+
|
156
|
+
- **Content-Type**: multipart/form-data
|
157
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
# **scan_cloud_storage_scan_azure_blob**
|
162
|
+
> CloudStorageVirusScanResult scan_cloud_storage_scan_azure_blob(connection_string, container_name, blob_path)
|
163
|
+
|
164
|
+
Scan an Azure Blob for viruses
|
165
|
+
|
166
|
+
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.
|
167
|
+
|
168
|
+
### Example
|
169
|
+
```ruby
|
170
|
+
# load the gem
|
171
|
+
require 'cloudmersive-virus-scan-api-client'
|
172
|
+
# setup authorization
|
173
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
174
|
+
# Configure API key authorization: Apikey
|
175
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
176
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
177
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
178
|
+
end
|
179
|
+
|
180
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
|
181
|
+
|
182
|
+
connection_string = 'connection_string_example' # 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.
|
183
|
+
|
184
|
+
container_name = 'container_name_example' # String | Name of the Blob container within the Azure Blob Storage account
|
185
|
+
|
186
|
+
blob_path = 'blob_path_example' # String | Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
187
|
+
|
188
|
+
|
189
|
+
begin
|
190
|
+
#Scan an Azure Blob for viruses
|
191
|
+
result = api_instance.scan_cloud_storage_scan_azure_blob(connection_string, container_name, blob_path)
|
192
|
+
p result
|
193
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
194
|
+
puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_azure_blob: #{e}"
|
195
|
+
end
|
196
|
+
```
|
197
|
+
|
198
|
+
### Parameters
|
199
|
+
|
200
|
+
Name | Type | Description | Notes
|
201
|
+
------------- | ------------- | ------------- | -------------
|
202
|
+
**connection_string** | **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. |
|
203
|
+
**container_name** | **String**| Name of the Blob container within the Azure Blob Storage account |
|
204
|
+
**blob_path** | **String**| Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf' |
|
205
|
+
|
206
|
+
### Return type
|
207
|
+
|
208
|
+
[**CloudStorageVirusScanResult**](CloudStorageVirusScanResult.md)
|
209
|
+
|
210
|
+
### Authorization
|
211
|
+
|
212
|
+
[Apikey](../README.md#Apikey)
|
213
|
+
|
214
|
+
### HTTP request headers
|
215
|
+
|
216
|
+
- **Content-Type**: multipart/form-data
|
217
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
# **scan_cloud_storage_scan_azure_blob_advanced**
|
222
|
+
> CloudStorageAdvancedVirusScanResult scan_cloud_storage_scan_azure_blob_advanced(connection_string, container_name, blob_path, opts)
|
223
|
+
|
224
|
+
Advanced Scan an Azure Blob for viruses
|
225
|
+
|
226
|
+
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.
|
227
|
+
|
228
|
+
### Example
|
229
|
+
```ruby
|
230
|
+
# load the gem
|
231
|
+
require 'cloudmersive-virus-scan-api-client'
|
232
|
+
# setup authorization
|
233
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
234
|
+
# Configure API key authorization: Apikey
|
235
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
236
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
237
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
238
|
+
end
|
239
|
+
|
240
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
|
241
|
+
|
242
|
+
connection_string = 'connection_string_example' # 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.
|
243
|
+
|
244
|
+
container_name = 'container_name_example' # String | Name of the Blob container within the Azure Blob Storage account
|
245
|
+
|
246
|
+
blob_path = 'blob_path_example' # String | Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf'
|
247
|
+
|
248
|
+
opts = {
|
249
|
+
allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
250
|
+
allow_invalid_files: true, # BOOLEAN | 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).
|
251
|
+
allow_scripts: true, # BOOLEAN | 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).
|
252
|
+
allow_password_protected_files: true, # BOOLEAN | 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).
|
253
|
+
allow_macros: true, # BOOLEAN | 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).
|
254
|
+
restrict_file_types: 'restrict_file_types_example' # String | 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.
|
255
|
+
}
|
256
|
+
|
257
|
+
begin
|
258
|
+
#Advanced Scan an Azure Blob for viruses
|
259
|
+
result = api_instance.scan_cloud_storage_scan_azure_blob_advanced(connection_string, container_name, blob_path, opts)
|
260
|
+
p result
|
261
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
262
|
+
puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_azure_blob_advanced: #{e}"
|
263
|
+
end
|
264
|
+
```
|
265
|
+
|
266
|
+
### Parameters
|
267
|
+
|
268
|
+
Name | Type | Description | Notes
|
269
|
+
------------- | ------------- | ------------- | -------------
|
270
|
+
**connection_string** | **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. |
|
271
|
+
**container_name** | **String**| Name of the Blob container within the Azure Blob Storage account |
|
272
|
+
**blob_path** | **String**| Path to the blob within the container, such as 'hello.pdf' or '/folder/subfolder/world.pdf' |
|
273
|
+
**allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
|
274
|
+
**allow_invalid_files** | **BOOLEAN**| 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). | [optional]
|
275
|
+
**allow_scripts** | **BOOLEAN**| 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). | [optional]
|
276
|
+
**allow_password_protected_files** | **BOOLEAN**| 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). | [optional]
|
277
|
+
**allow_macros** | **BOOLEAN**| 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). | [optional]
|
278
|
+
**restrict_file_types** | **String**| 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. | [optional]
|
279
|
+
|
280
|
+
### Return type
|
281
|
+
|
282
|
+
[**CloudStorageAdvancedVirusScanResult**](CloudStorageAdvancedVirusScanResult.md)
|
283
|
+
|
284
|
+
### Authorization
|
285
|
+
|
286
|
+
[Apikey](../README.md#Apikey)
|
287
|
+
|
288
|
+
### HTTP request headers
|
289
|
+
|
290
|
+
- **Content-Type**: multipart/form-data
|
291
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
# **scan_cloud_storage_scan_gcp_storage_file**
|
296
|
+
> CloudStorageVirusScanResult scan_cloud_storage_scan_gcp_storage_file(bucket_name, object_name, json_credential_file)
|
297
|
+
|
298
|
+
Scan an Google Cloud Platform (GCP) Storage file for viruses
|
299
|
+
|
300
|
+
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.
|
301
|
+
|
302
|
+
### Example
|
303
|
+
```ruby
|
304
|
+
# load the gem
|
305
|
+
require 'cloudmersive-virus-scan-api-client'
|
306
|
+
# setup authorization
|
307
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
308
|
+
# Configure API key authorization: Apikey
|
309
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
310
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
311
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
312
|
+
end
|
313
|
+
|
314
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
|
315
|
+
|
316
|
+
bucket_name = 'bucket_name_example' # String | Name of the bucket in Google Cloud Storage
|
317
|
+
|
318
|
+
object_name = 'object_name_example' # String | Name of the object or file in Google Cloud Storage
|
319
|
+
|
320
|
+
json_credential_file = File.new('/path/to/file.txt') # File | Service Account credential for Google Cloud stored in a JSON file.
|
321
|
+
|
322
|
+
|
323
|
+
begin
|
324
|
+
#Scan an Google Cloud Platform (GCP) Storage file for viruses
|
325
|
+
result = api_instance.scan_cloud_storage_scan_gcp_storage_file(bucket_name, object_name, json_credential_file)
|
326
|
+
p result
|
327
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
328
|
+
puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_gcp_storage_file: #{e}"
|
329
|
+
end
|
330
|
+
```
|
331
|
+
|
332
|
+
### Parameters
|
333
|
+
|
334
|
+
Name | Type | Description | Notes
|
335
|
+
------------- | ------------- | ------------- | -------------
|
336
|
+
**bucket_name** | **String**| Name of the bucket in Google Cloud Storage |
|
337
|
+
**object_name** | **String**| Name of the object or file in Google Cloud Storage |
|
338
|
+
**json_credential_file** | **File**| Service Account credential for Google Cloud stored in a JSON file. |
|
339
|
+
|
340
|
+
### Return type
|
341
|
+
|
342
|
+
[**CloudStorageVirusScanResult**](CloudStorageVirusScanResult.md)
|
343
|
+
|
344
|
+
### Authorization
|
345
|
+
|
346
|
+
[Apikey](../README.md#Apikey)
|
347
|
+
|
348
|
+
### HTTP request headers
|
349
|
+
|
350
|
+
- **Content-Type**: multipart/form-data
|
351
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
# **scan_cloud_storage_scan_gcp_storage_file_advanced**
|
356
|
+
> CloudStorageAdvancedVirusScanResult scan_cloud_storage_scan_gcp_storage_file_advanced(bucket_name, object_name, json_credential_file, opts)
|
357
|
+
|
358
|
+
Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
|
359
|
+
|
360
|
+
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.
|
361
|
+
|
362
|
+
### Example
|
363
|
+
```ruby
|
364
|
+
# load the gem
|
365
|
+
require 'cloudmersive-virus-scan-api-client'
|
366
|
+
# setup authorization
|
367
|
+
CloudmersiveVirusScanApiClient.configure do |config|
|
368
|
+
# Configure API key authorization: Apikey
|
369
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
370
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
371
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
372
|
+
end
|
373
|
+
|
374
|
+
api_instance = CloudmersiveVirusScanApiClient::ScanCloudStorageApi.new
|
375
|
+
|
376
|
+
bucket_name = 'bucket_name_example' # String | Name of the bucket in Google Cloud Storage
|
377
|
+
|
378
|
+
object_name = 'object_name_example' # String | Name of the object or file in Google Cloud Storage
|
379
|
+
|
380
|
+
json_credential_file = File.new('/path/to/file.txt') # File | Service Account credential for Google Cloud stored in a JSON file.
|
381
|
+
|
382
|
+
opts = {
|
383
|
+
allow_executables: true, # BOOLEAN | Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).
|
384
|
+
allow_invalid_files: true, # BOOLEAN | 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).
|
385
|
+
allow_scripts: true, # BOOLEAN | 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).
|
386
|
+
allow_password_protected_files: true, # BOOLEAN | 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).
|
387
|
+
allow_macros: true, # BOOLEAN | 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).
|
388
|
+
restrict_file_types: 'restrict_file_types_example' # String | 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.
|
389
|
+
}
|
390
|
+
|
391
|
+
begin
|
392
|
+
#Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
|
393
|
+
result = api_instance.scan_cloud_storage_scan_gcp_storage_file_advanced(bucket_name, object_name, json_credential_file, opts)
|
394
|
+
p result
|
395
|
+
rescue CloudmersiveVirusScanApiClient::ApiError => e
|
396
|
+
puts "Exception when calling ScanCloudStorageApi->scan_cloud_storage_scan_gcp_storage_file_advanced: #{e}"
|
397
|
+
end
|
398
|
+
```
|
399
|
+
|
400
|
+
### Parameters
|
401
|
+
|
402
|
+
Name | Type | Description | Notes
|
403
|
+
------------- | ------------- | ------------- | -------------
|
404
|
+
**bucket_name** | **String**| Name of the bucket in Google Cloud Storage |
|
405
|
+
**object_name** | **String**| Name of the object or file in Google Cloud Storage |
|
406
|
+
**json_credential_file** | **File**| Service Account credential for Google Cloud stored in a JSON file. |
|
407
|
+
**allow_executables** | **BOOLEAN**| Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended). | [optional]
|
408
|
+
**allow_invalid_files** | **BOOLEAN**| 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). | [optional]
|
409
|
+
**allow_scripts** | **BOOLEAN**| 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). | [optional]
|
410
|
+
**allow_password_protected_files** | **BOOLEAN**| 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). | [optional]
|
411
|
+
**allow_macros** | **BOOLEAN**| 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). | [optional]
|
412
|
+
**restrict_file_types** | **String**| 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. | [optional]
|
413
|
+
|
414
|
+
### Return type
|
415
|
+
|
416
|
+
[**CloudStorageAdvancedVirusScanResult**](CloudStorageAdvancedVirusScanResult.md)
|
417
|
+
|
418
|
+
### Authorization
|
419
|
+
|
420
|
+
[Apikey](../README.md#Apikey)
|
421
|
+
|
422
|
+
### HTTP request headers
|
423
|
+
|
424
|
+
- **Content-Type**: multipart/form-data
|
425
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
426
|
+
|
427
|
+
|
428
|
+
|