Class: CloudmersiveVirusScanApiClient::ScanCloudStorageApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ScanCloudStorageApi

Returns a new instance of ScanCloudStorageApi.



19
20
21
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {}) ⇒ CloudStorageVirusScanResult

Scan an AWS S3 file for viruses 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.

Parameters:

  • access_key

    AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console

  • secret_key

    AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console

  • bucket_region

    Name of the region of the S3 bucket, such as 'US-East-1'

  • bucket_name

    Name of the S3 bucket

  • key_name

    Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :role_arn (String)

    Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.

Returns:



32
33
34
35
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 32

def scan_cloud_storage_scan_aws_s3_file(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {})
  data, _status_code, _headers = scan_cloud_storage_scan_aws_s3_file_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts)
  data
end

#scan_cloud_storage_scan_aws_s3_file_advanced(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {}) ⇒ CloudStorageAdvancedVirusScanResult

Advanced Scan an AWS S3 file for viruses 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.

Parameters:

  • access_key

    AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console

  • secret_key

    AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console

  • bucket_region

    Name of the region of the S3 bucket, such as 'US-East-1'

  • bucket_name

    Name of the S3 bucket

  • key_name

    Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :role_arn (String)

    Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.

  • :allow_executables (BOOLEAN)

    Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).

  • :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).

  • :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).

  • :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).

  • :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).

  • :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).

  • :allow_insecure_deserialization (BOOLEAN)

    Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).

  • :allow_html (BOOLEAN)

    Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].

  • :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.

Returns:



127
128
129
130
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 127

def scan_cloud_storage_scan_aws_s3_file_advanced(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {})
  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)
  data
end

#scan_cloud_storage_scan_aws_s3_file_advanced_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {}) ⇒ Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>

Advanced Scan an AWS S3 file for viruses 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.

Parameters:

  • access_key

    AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console

  • secret_key

    AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console

  • bucket_region

    Name of the region of the S3 bucket, such as &#39;US-East-1&#39;

  • bucket_name

    Name of the S3 bucket

  • key_name

    Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :role_arn (String)

    Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • :allow_executables (BOOLEAN)

    Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).

  • :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).

  • :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).

  • :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).

  • :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).

  • :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).

  • :allow_insecure_deserialization (BOOLEAN)

    Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).

  • :allow_html (BOOLEAN)

    Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].

  • :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&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.

Returns:



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 151

def scan_cloud_storage_scan_aws_s3_file_advanced_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced ...'
  end
  # verify the required parameter 'access_key' is set
  if @api_client.config.client_side_validation && access_key.nil?
    fail ArgumentError, "Missing the required parameter 'access_key' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
  end
  # verify the required parameter 'secret_key' is set
  if @api_client.config.client_side_validation && secret_key.nil?
    fail ArgumentError, "Missing the required parameter 'secret_key' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
  end
  # verify the required parameter 'bucket_region' is set
  if @api_client.config.client_side_validation && bucket_region.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_region' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
  end
  # verify the required parameter 'bucket_name' is set
  if @api_client.config.client_side_validation && bucket_name.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
  end
  # verify the required parameter 'key_name' is set
  if @api_client.config.client_side_validation && key_name.nil?
    fail ArgumentError, "Missing the required parameter 'key_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file_advanced"
  end
  # resource path
  local_var_path = '/virus/scan/cloud-storage/aws-s3/single/advanced'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'accessKey'] = access_key
  header_params[:'secretKey'] = secret_key
  header_params[:'bucketRegion'] = bucket_region
  header_params[:'bucketName'] = bucket_name
  header_params[:'keyName'] = key_name
  header_params[:'roleArn'] = opts[:'role_arn'] if !opts[:'role_arn'].nil?
  header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
  header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
  header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
  header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
  header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
  header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
  header_params[:'allowInsecureDeserialization'] = opts[:'allow_insecure_deserialization'] if !opts[:'allow_insecure_deserialization'].nil?
  header_params[:'allowHtml'] = opts[:'allow_html'] if !opts[:'allow_html'].nil?
  header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CloudStorageAdvancedVirusScanResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#scan_cloud_storage_scan_aws_s3_file_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {}) ⇒ Array<(CloudStorageVirusScanResult, Fixnum, Hash)>

Scan an AWS S3 file for viruses 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.

Parameters:

  • access_key

    AWS S3 access key for the S3 bucket; you can get this from My Security Credentials in the AWS console

  • secret_key

    AWS S3 secret key for the S3 bucket; you can get this from My Security Credentials in the AWS console

  • bucket_region

    Name of the region of the S3 bucket, such as &#39;US-East-1&#39;

  • bucket_name

    Name of the S3 bucket

  • key_name

    Key name (also called file name) of the file in S3 that you wish to scan for viruses. If the key name contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :role_arn (String)

    Optional: Role ARN for STS Credential-based access. This is for advanced access using the Security Token Service and is not required. If the roleArn contains Unicode characters, you must base64 encode the key name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

Returns:



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 47

def scan_cloud_storage_scan_aws_s3_file_with_http_info(access_key, secret_key, bucket_region, bucket_name, key_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file ...'
  end
  # verify the required parameter 'access_key' is set
  if @api_client.config.client_side_validation && access_key.nil?
    fail ArgumentError, "Missing the required parameter 'access_key' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file"
  end
  # verify the required parameter 'secret_key' is set
  if @api_client.config.client_side_validation && secret_key.nil?
    fail ArgumentError, "Missing the required parameter 'secret_key' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file"
  end
  # verify the required parameter 'bucket_region' is set
  if @api_client.config.client_side_validation && bucket_region.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_region' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file"
  end
  # verify the required parameter 'bucket_name' is set
  if @api_client.config.client_side_validation && bucket_name.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file"
  end
  # verify the required parameter 'key_name' is set
  if @api_client.config.client_side_validation && key_name.nil?
    fail ArgumentError, "Missing the required parameter 'key_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_aws_s3_file"
  end
  # resource path
  local_var_path = '/virus/scan/cloud-storage/aws-s3/single'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'accessKey'] = access_key
  header_params[:'secretKey'] = secret_key
  header_params[:'bucketRegion'] = bucket_region
  header_params[:'bucketName'] = bucket_name
  header_params[:'keyName'] = key_name
  header_params[:'roleArn'] = opts[:'role_arn'] if !opts[:'role_arn'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CloudStorageVirusScanResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_aws_s3_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scan_cloud_storage_scan_azure_blob(connection_string, container_name, blob_path, opts = {}) ⇒ CloudStorageVirusScanResult

Scan an Azure Blob for viruses 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.

Parameters:

  • 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.

  • container_name

    Name of the Blob container within the Azure Blob Storage account

  • blob_path

    Path to the blob within the container, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the blob path contains Unicode characters, you must base64 encode the blob path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



228
229
230
231
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 228

def scan_cloud_storage_scan_azure_blob(connection_string, container_name, blob_path, opts = {})
  data, _status_code, _headers = scan_cloud_storage_scan_azure_blob_with_http_info(connection_string, container_name, blob_path, opts)
  data
end

#scan_cloud_storage_scan_azure_blob_advanced(connection_string, container_name, blob_path, opts = {}) ⇒ CloudStorageAdvancedVirusScanResult

Advanced Scan an Azure Blob for viruses 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.

Parameters:

  • 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.

  • container_name

    Name of the Blob container within the Azure Blob Storage account

  • blob_path

    Path to the blob within the container, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the blob path contains Unicode characters, you must base64 encode the blob path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :allow_executables (BOOLEAN)

    Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).

  • :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).

  • :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).

  • :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).

  • :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).

  • :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).

  • :allow_insecure_deserialization (BOOLEAN)

    Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).

  • :allow_html (BOOLEAN)

    Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].

  • :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&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.

Returns:



306
307
308
309
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 306

def scan_cloud_storage_scan_azure_blob_advanced(connection_string, container_name, blob_path, opts = {})
  data, _status_code, _headers = scan_cloud_storage_scan_azure_blob_advanced_with_http_info(connection_string, container_name, blob_path, opts)
  data
end

#scan_cloud_storage_scan_azure_blob_advanced_with_http_info(connection_string, container_name, blob_path, opts = {}) ⇒ Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>

Advanced Scan an Azure Blob for viruses 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.

Parameters:

  • 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.

  • container_name

    Name of the Blob container within the Azure Blob Storage account

  • blob_path

    Path to the blob within the container, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the blob path contains Unicode characters, you must base64 encode the blob path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :allow_executables (BOOLEAN)

    Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).

  • :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).

  • :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).

  • :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).

  • :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).

  • :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).

  • :allow_insecure_deserialization (BOOLEAN)

    Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).

  • :allow_html (BOOLEAN)

    Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].

  • :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&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.

Returns:



327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 327

def scan_cloud_storage_scan_azure_blob_advanced_with_http_info(connection_string, container_name, blob_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob_advanced ...'
  end
  # verify the required parameter 'connection_string' is set
  if @api_client.config.client_side_validation && connection_string.nil?
    fail ArgumentError, "Missing the required parameter 'connection_string' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob_advanced"
  end
  # verify the required parameter 'container_name' is set
  if @api_client.config.client_side_validation && container_name.nil?
    fail ArgumentError, "Missing the required parameter 'container_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob_advanced"
  end
  # verify the required parameter 'blob_path' is set
  if @api_client.config.client_side_validation && blob_path.nil?
    fail ArgumentError, "Missing the required parameter 'blob_path' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob_advanced"
  end
  # resource path
  local_var_path = '/virus/scan/cloud-storage/azure-blob/single/advanced'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'connectionString'] = connection_string
  header_params[:'containerName'] = container_name
  header_params[:'blobPath'] = blob_path
  header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
  header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
  header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
  header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
  header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
  header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
  header_params[:'allowInsecureDeserialization'] = opts[:'allow_insecure_deserialization'] if !opts[:'allow_insecure_deserialization'].nil?
  header_params[:'allowHtml'] = opts[:'allow_html'] if !opts[:'allow_html'].nil?
  header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CloudStorageAdvancedVirusScanResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_azure_blob_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scan_cloud_storage_scan_azure_blob_with_http_info(connection_string, container_name, blob_path, opts = {}) ⇒ Array<(CloudStorageVirusScanResult, Fixnum, Hash)>

Scan an Azure Blob for viruses 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.

Parameters:

  • 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.

  • container_name

    Name of the Blob container within the Azure Blob Storage account

  • blob_path

    Path to the blob within the container, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the blob path contains Unicode characters, you must base64 encode the blob path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 240

def scan_cloud_storage_scan_azure_blob_with_http_info(connection_string, container_name, blob_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob ...'
  end
  # verify the required parameter 'connection_string' is set
  if @api_client.config.client_side_validation && connection_string.nil?
    fail ArgumentError, "Missing the required parameter 'connection_string' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob"
  end
  # verify the required parameter 'container_name' is set
  if @api_client.config.client_side_validation && container_name.nil?
    fail ArgumentError, "Missing the required parameter 'container_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob"
  end
  # verify the required parameter 'blob_path' is set
  if @api_client.config.client_side_validation && blob_path.nil?
    fail ArgumentError, "Missing the required parameter 'blob_path' when calling ScanCloudStorageApi.scan_cloud_storage_scan_azure_blob"
  end
  # resource path
  local_var_path = '/virus/scan/cloud-storage/azure-blob/single'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'connectionString'] = connection_string
  header_params[:'containerName'] = container_name
  header_params[:'blobPath'] = blob_path

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CloudStorageVirusScanResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_azure_blob\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scan_cloud_storage_scan_gcp_storage_file(bucket_name, object_name, json_credential_file, opts = {}) ⇒ CloudStorageVirusScanResult

Scan an Google Cloud Platform (GCP) Storage file for viruses 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.

Parameters:

  • bucket_name

    Name of the bucket in Google Cloud Storage

  • object_name

    Name of the object or file in Google Cloud Storage. If the object name contains Unicode characters, you must base64 encode the object name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • json_credential_file

    Service Account credential for Google Cloud stored in a JSON file.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



393
394
395
396
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 393

def scan_cloud_storage_scan_gcp_storage_file(bucket_name, object_name, json_credential_file, opts = {})
  data, _status_code, _headers = scan_cloud_storage_scan_gcp_storage_file_with_http_info(bucket_name, object_name, json_credential_file, opts)
  data
end

#scan_cloud_storage_scan_gcp_storage_file_advanced(bucket_name, object_name, json_credential_file, opts = {}) ⇒ CloudStorageAdvancedVirusScanResult

Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses 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.

Parameters:

  • bucket_name

    Name of the bucket in Google Cloud Storage

  • object_name

    Name of the object or file in Google Cloud Storage. If the object name contains Unicode characters, you must base64 encode the object name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • json_credential_file

    Service Account credential for Google Cloud stored in a JSON file.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :allow_executables (BOOLEAN)

    Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).

  • :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).

  • :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).

  • :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).

  • :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).

  • :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).

  • :allow_insecure_deserialization (BOOLEAN)

    Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).

  • :allow_html (BOOLEAN)

    Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].

  • :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&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.

Returns:



471
472
473
474
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 471

def scan_cloud_storage_scan_gcp_storage_file_advanced(bucket_name, object_name, json_credential_file, opts = {})
  data, _status_code, _headers = scan_cloud_storage_scan_gcp_storage_file_advanced_with_http_info(bucket_name, object_name, json_credential_file, opts)
  data
end

#scan_cloud_storage_scan_gcp_storage_file_advanced_with_http_info(bucket_name, object_name, json_credential_file, opts = {}) ⇒ Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>

Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses 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.

Parameters:

  • bucket_name

    Name of the bucket in Google Cloud Storage

  • object_name

    Name of the object or file in Google Cloud Storage. If the object name contains Unicode characters, you must base64 encode the object name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • json_credential_file

    Service Account credential for Google Cloud stored in a JSON file.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :allow_executables (BOOLEAN)

    Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).

  • :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).

  • :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).

  • :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).

  • :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).

  • :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).

  • :allow_insecure_deserialization (BOOLEAN)

    Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).

  • :allow_html (BOOLEAN)

    Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].

  • :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&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.

Returns:



492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 492

def scan_cloud_storage_scan_gcp_storage_file_advanced_with_http_info(bucket_name, object_name, json_credential_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file_advanced ...'
  end
  # verify the required parameter 'bucket_name' is set
  if @api_client.config.client_side_validation && bucket_name.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file_advanced"
  end
  # verify the required parameter 'object_name' is set
  if @api_client.config.client_side_validation && object_name.nil?
    fail ArgumentError, "Missing the required parameter 'object_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file_advanced"
  end
  # verify the required parameter 'json_credential_file' is set
  if @api_client.config.client_side_validation && json_credential_file.nil?
    fail ArgumentError, "Missing the required parameter 'json_credential_file' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file_advanced"
  end
  # resource path
  local_var_path = '/virus/scan/cloud-storage/gcp-storage/single/advanced'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'bucketName'] = bucket_name
  header_params[:'objectName'] = object_name
  header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
  header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
  header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
  header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
  header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
  header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
  header_params[:'allowInsecureDeserialization'] = opts[:'allow_insecure_deserialization'] if !opts[:'allow_insecure_deserialization'].nil?
  header_params[:'allowHtml'] = opts[:'allow_html'] if !opts[:'allow_html'].nil?
  header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?

  # form parameters
  form_params = {}
  form_params['jsonCredentialFile'] = json_credential_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CloudStorageAdvancedVirusScanResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#scan_cloud_storage_scan_gcp_storage_file_with_http_info(bucket_name, object_name, json_credential_file, opts = {}) ⇒ Array<(CloudStorageVirusScanResult, Fixnum, Hash)>

Scan an Google Cloud Platform (GCP) Storage file for viruses 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.

Parameters:

  • bucket_name

    Name of the bucket in Google Cloud Storage

  • object_name

    Name of the object or file in Google Cloud Storage. If the object name contains Unicode characters, you must base64 encode the object name and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • json_credential_file

    Service Account credential for Google Cloud stored in a JSON file.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 405

def scan_cloud_storage_scan_gcp_storage_file_with_http_info(bucket_name, object_name, json_credential_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file ...'
  end
  # verify the required parameter 'bucket_name' is set
  if @api_client.config.client_side_validation && bucket_name.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file"
  end
  # verify the required parameter 'object_name' is set
  if @api_client.config.client_side_validation && object_name.nil?
    fail ArgumentError, "Missing the required parameter 'object_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file"
  end
  # verify the required parameter 'json_credential_file' is set
  if @api_client.config.client_side_validation && json_credential_file.nil?
    fail ArgumentError, "Missing the required parameter 'json_credential_file' when calling ScanCloudStorageApi.scan_cloud_storage_scan_gcp_storage_file"
  end
  # resource path
  local_var_path = '/virus/scan/cloud-storage/gcp-storage/single'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'bucketName'] = bucket_name
  header_params[:'objectName'] = object_name

  # form parameters
  form_params = {}
  form_params['jsonCredentialFile'] = json_credential_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CloudStorageVirusScanResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ScanCloudStorageApi#scan_cloud_storage_scan_gcp_storage_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#scan_cloud_storage_scan_share_point_online_file(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {}) ⇒ CloudStorageVirusScanResult

Virus Scan a file in a SharePoint Online Site Drive 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.

Parameters:

  • client_id

    Client ID access credentials; see description above for instructions on how to get the Client ID from the Azure Active Directory portal.

  • client_secret

    Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal

  • sharepoint_domain_name

    SharePoint Online domain name, such as mydomain.sharepoint.com

  • site_id

    Site ID (GUID) of the SharePoint site you wish to retrieve the file from

  • file_path

    Path to the file within the drive, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the file path contains Unicode characters, you must base64 encode the file path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Optional; Tenant ID of your Azure Active Directory

  • :item_id (String)

    SharePoint itemID, such as a DriveItem Id

Returns:



562
563
564
565
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 562

def scan_cloud_storage_scan_share_point_online_file(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {})
  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)
  data
end

#scan_cloud_storage_scan_share_point_online_file_advanced(client_id, client_secret, sharepoint_domain_name, site_id, opts = {}) ⇒ CloudStorageAdvancedVirusScanResult

Advanced Virus Scan a file in a SharePoint Online Site Drive 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.

Parameters:

  • client_id

    Client ID access credentials; see description above for instructions on how to get the Client ID from the Azure Active Directory portal.

  • client_secret

    Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal

  • sharepoint_domain_name

    SharePoint Online domain name, such as mydomain.sharepoint.com

  • site_id

    Site ID (GUID) of the SharePoint site you wish to retrieve the file from

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Optional; Tenant ID of your Azure Active Directory

  • :file_path (String)

    Path to the file within the drive, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the file path contains Unicode characters, you must base64 encode the file path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • :item_id (String)

    SharePoint itemID, such as a DriveItem Id

  • :allow_executables (BOOLEAN)

    Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).

  • :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).

  • :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).

  • :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).

  • :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).

  • :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).

  • :allow_insecure_deserialization (BOOLEAN)

    Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).

  • :allow_html (BOOLEAN)

    Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].

  • :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&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.

Returns:



660
661
662
663
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 660

def scan_cloud_storage_scan_share_point_online_file_advanced(client_id, client_secret, sharepoint_domain_name, site_id, opts = {})
  data, _status_code, _headers = scan_cloud_storage_scan_share_point_online_file_advanced_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, opts)
  data
end

#scan_cloud_storage_scan_share_point_online_file_advanced_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, opts = {}) ⇒ Array<(CloudStorageAdvancedVirusScanResult, Fixnum, Hash)>

Advanced Virus Scan a file in a SharePoint Online Site Drive 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.

Parameters:

  • client_id

    Client ID access credentials; see description above for instructions on how to get the Client ID from the Azure Active Directory portal.

  • client_secret

    Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal

  • sharepoint_domain_name

    SharePoint Online domain name, such as mydomain.sharepoint.com

  • site_id

    Site ID (GUID) of the SharePoint site you wish to retrieve the file from

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Optional; Tenant ID of your Azure Active Directory

  • :file_path (String)

    Path to the file within the drive, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the file path contains Unicode characters, you must base64 encode the file path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • :item_id (String)

    SharePoint itemID, such as a DriveItem Id

  • :allow_executables (BOOLEAN)

    Set to false to block executable files (program code) from being allowed in the input file. Default is false (recommended).

  • :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).

  • :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).

  • :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).

  • :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).

  • :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).

  • :allow_insecure_deserialization (BOOLEAN)

    Set to false to block Insecure Deserialization and other threats embedded in JSON and other object serialization files, and other files that contain embedded content threats. Set to true to allow these file types. Default is false (recommended).

  • :allow_html (BOOLEAN)

    Set to false to block HTML input in the top level file; HTML can contain XSS, scripts, local file accesses and other threats. Set to true to allow these file types. Default is false (recommended) [for API keys created prior to the release of this feature default is true for backward compatability].

  • :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&#x3D;false. Set restrictFileTypes parameter to null or empty string to disable; default is disabled.

Returns:



685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 685

def scan_cloud_storage_scan_share_point_online_file_advanced_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced ...'
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
  end
  # verify the required parameter 'client_secret' is set
  if @api_client.config.client_side_validation && client_secret.nil?
    fail ArgumentError, "Missing the required parameter 'client_secret' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
  end
  # verify the required parameter 'sharepoint_domain_name' is set
  if @api_client.config.client_side_validation && sharepoint_domain_name.nil?
    fail ArgumentError, "Missing the required parameter 'sharepoint_domain_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file_advanced"
  end
  # resource path
  local_var_path = '/virus/scan/cloud-storage/sharepoint-online/site/advanced'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'clientID'] = client_id
  header_params[:'clientSecret'] = client_secret
  header_params[:'sharepointDomainName'] = sharepoint_domain_name
  header_params[:'siteID'] = site_id
  header_params[:'tenantID'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil?
  header_params[:'filePath'] = opts[:'file_path'] if !opts[:'file_path'].nil?
  header_params[:'itemID'] = opts[:'item_id'] if !opts[:'item_id'].nil?
  header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil?
  header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil?
  header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil?
  header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil?
  header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil?
  header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil?
  header_params[:'allowInsecureDeserialization'] = opts[:'allow_insecure_deserialization'] if !opts[:'allow_insecure_deserialization'].nil?
  header_params[:'allowHtml'] = opts[:'allow_html'] if !opts[:'allow_html'].nil?
  header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CloudStorageAdvancedVirusScanResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end

#scan_cloud_storage_scan_share_point_online_file_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {}) ⇒ Array<(CloudStorageVirusScanResult, Fixnum, Hash)>

Virus Scan a file in a SharePoint Online Site Drive 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.

Parameters:

  • client_id

    Client ID access credentials; see description above for instructions on how to get the Client ID from the Azure Active Directory portal.

  • client_secret

    Client Secret access credentials; see description above for instructions on how to get the Client Secret from the Azure Active Directory portal

  • sharepoint_domain_name

    SharePoint Online domain name, such as mydomain.sharepoint.com

  • site_id

    Site ID (GUID) of the SharePoint site you wish to retrieve the file from

  • file_path

    Path to the file within the drive, such as &#39;hello.pdf&#39; or &#39;/folder/subfolder/world.pdf&#39;. If the file path contains Unicode characters, you must base64 encode the file path and prepend it with &#39;base64:&#39;, such as: &#39;base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV&#39;.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Optional; Tenant ID of your Azure Active Directory

  • :item_id (String)

    SharePoint itemID, such as a DriveItem Id

Returns:



578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_cloud_storage_api.rb', line 578

def scan_cloud_storage_scan_share_point_online_file_with_http_info(client_id, client_secret, sharepoint_domain_name, site_id, file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file ...'
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
  end
  # verify the required parameter 'client_secret' is set
  if @api_client.config.client_side_validation && client_secret.nil?
    fail ArgumentError, "Missing the required parameter 'client_secret' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
  end
  # verify the required parameter 'sharepoint_domain_name' is set
  if @api_client.config.client_side_validation && sharepoint_domain_name.nil?
    fail ArgumentError, "Missing the required parameter 'sharepoint_domain_name' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
  end
  # verify the required parameter 'file_path' is set
  if @api_client.config.client_side_validation && file_path.nil?
    fail ArgumentError, "Missing the required parameter 'file_path' when calling ScanCloudStorageApi.scan_cloud_storage_scan_share_point_online_file"
  end
  # resource path
  local_var_path = '/virus/scan/cloud-storage/sharepoint-online/site/single'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'clientID'] = client_id
  header_params[:'clientSecret'] = client_secret
  header_params[:'sharepointDomainName'] = sharepoint_domain_name
  header_params[:'siteID'] = site_id
  header_params[:'filePath'] = file_path
  header_params[:'tenantID'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil?
  header_params[:'itemID'] = opts[:'item_id'] if !opts[:'item_id'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CloudStorageVirusScanResult')
  if @api_client.config.debugging
    @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}"
  end
  return data, status_code, headers
end