API
Barcode API  Currency API  Image Recognition & Processing API  Document & Conversion API  OCR API  Security API  Validate API  Video API  Virus Scan API  NLP API  Spam API  CDR API  Document AI API 

Step 1 - Install the Client SDK

Run this command in the Package Manager console to install via NuGet:
Install-Package Cloudmersive.APIClient.NET.VirusScan -Version 3.0.4


Step 2 - Get Started with Example Code

/virus/scan/cloud-storage/aws-s3/single
Scan an AWS S3 file for viruses
/virus/scan/cloud-storage/aws-s3/single/advanced
Advanced Scan an AWS S3 file for viruses
/virus/scan/cloud-storage/azure-blob/single
Scan an Azure Blob for viruses
/virus/scan/cloud-storage/azure-blob/single/advanced
Advanced Scan an Azure Blob for viruses
/virus/scan/cloud-storage/gcp-storage/single
Scan an Google Cloud Platform (GCP) Storage file for viruses
/virus/scan/cloud-storage/gcp-storage/single/advanced
Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
/virus/scan/cloud-storage/sharepoint-online/site/advanced
Advanced Virus Scan a file in a SharePoint Online Site Drive
/virus/scan/cloud-storage/sharepoint-online/site/single
Virus Scan a file in a SharePoint Online Site Drive
/virus/scan/file
Scan a file for viruses
/virus/scan/file/advanced
Advanced Scan a file for viruses
/virus/scan/website
Scan a website for malicious content and threats

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.

using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NET.VirusScan.Api;
using Cloudmersive.APIClient.NET.VirusScan.Client;
using Cloudmersive.APIClient.NET.VirusScan.Model;

namespace Example
{
    public class ScanCloudStorageScanGcpStorageFileExample
    {
        public void main()
        {
            // Configure API key authorization: Apikey
            Configuration.Default.AddApiKey("Apikey", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Apikey", "Bearer");

            var apiInstance = new ScanCloudStorageApi();
            var bucketName = bucketName_example;  // string | Name of the bucket in Google Cloud Storage
            var objectName = objectName_example;  // string | 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 'base64:', such as: 'base64:6ZWV6ZWV6ZWV6ZWV6ZWV6ZWV'.
            var jsonCredentialFile = new System.IO.Stream(); // System.IO.Stream | Service Account credential for Google Cloud stored in a JSON file.

            try
            {
                // Scan an Google Cloud Platform (GCP) Storage file for viruses
                CloudStorageVirusScanResult result = apiInstance.ScanCloudStorageScanGcpStorageFile(bucketName, objectName, jsonCredentialFile);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScanCloudStorageApi.ScanCloudStorageScanGcpStorageFile: " + e.Message );
            }
        }
    }
}