public sealed class CloudStorageOptions : IMessage<CloudStorageOptions>, IEquatable<CloudStorageOptions>, IDeepCloneable<CloudStorageOptions>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class CloudStorageOptions.
Options defining a file or a set of files within a Cloud Storage
bucket.
Max number of bytes to scan from a file. If a scanned file's size is bigger
than this value then the rest of the bytes are omitted. Only one of
bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
This field can't be set if de-identification is requested. For certain file
types, setting this field has no effect. For more information, see Limits
on bytes scanned per
file.
Max percentage of bytes to scan from a file. The rest are omitted. The
number of bytes scanned is rounded down. Must be between 0 and 100,
inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of
bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
This field can't be set if de-identification is requested. For certain file
types, setting this field has no effect. For more information, see Limits
on bytes scanned per
file.
List of file type groups to include in the scan.
If empty, all files are scanned and available data format processors
are applied. In addition, the binary content of the selected files
is always scanned as well.
Images are scanned only as binary if the specified region
does not support image inspection and no file_types were specified.
Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
Limits the number of files to scan to this percentage of the input FileSet.
Number of files scanned is rounded down. Must be between 0 and 100,
inclusively. Both 0 and 100 means no limit. Defaults to 0.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eCloudStorageOptions\u003c/code\u003e class within the Google Cloud Data Loss Prevention v2 API, outlining its purpose, functionality, and implementation details.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCloudStorageOptions\u003c/code\u003e class, used to define a file or set of files in a Cloud Storage bucket for scanning, is available in multiple versions ranging from 2.15.0 to the latest release of 4.16.0.\u003c/p\u003e\n"],["\u003cp\u003eThis class offers several configurable properties, such as \u003ccode\u003eBytesLimitPerFile\u003c/code\u003e, \u003ccode\u003eBytesLimitPerFilePercent\u003c/code\u003e, \u003ccode\u003eFileSet\u003c/code\u003e, \u003ccode\u003eFileTypes\u003c/code\u003e, \u003ccode\u003eFilesLimitPercent\u003c/code\u003e, and \u003ccode\u003eSampleMethod\u003c/code\u003e, to tailor the scanning process of files.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCloudStorageOptions\u003c/code\u003e class, extending from \u003ccode\u003eobject\u003c/code\u003e, implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and its primary functions are built around scanning files based on specified parameters within cloud storage.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation indicates that there are limits on bytes scanned per file, and provides a link to a dedicated page containing more information on those limits.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Data Loss Prevention v2 API - Class CloudStorageOptions (4.19.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.19.0 (latest)](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.18.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.18.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.17.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.17.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.16.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.15.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.14.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.13.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.12.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.11.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.10.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.9.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.8.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.7.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.6.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.5.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.4.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.3.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.2.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.1.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.0.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.5.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.4.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.3.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.2.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.16.0/Google.Cloud.Dlp.V2.CloudStorageOptions)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.15.0/Google.Cloud.Dlp.V2.CloudStorageOptions) \n\n public sealed class CloudStorageOptions : IMessage\u003cCloudStorageOptions\u003e, IEquatable\u003cCloudStorageOptions\u003e, IDeepCloneable\u003cCloudStorageOptions\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class CloudStorageOptions.\n\nOptions defining a file or a set of files within a Cloud Storage\nbucket. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CloudStorageOptions \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CloudStorageOptions](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.CloudStorageOptions), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CloudStorageOptions](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.CloudStorageOptions), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CloudStorageOptions](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.CloudStorageOptions), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Dlp.V2](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Dlp.V2.dll\n\nConstructors\n------------\n\n### CloudStorageOptions()\n\n public CloudStorageOptions()\n\n### CloudStorageOptions(CloudStorageOptions)\n\n public CloudStorageOptions(CloudStorageOptions other)\n\nProperties\n----------\n\n### BytesLimitPerFile\n\n public long BytesLimitPerFile { get; set; }\n\nMax number of bytes to scan from a file. If a scanned file's size is bigger\nthan this value then the rest of the bytes are omitted. Only one of\n`bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified.\nThis field can't be set if de-identification is requested. For certain file\ntypes, setting this field has no effect. For more information, see [Limits\non bytes scanned per\nfile](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).\n\n### BytesLimitPerFilePercent\n\n public int BytesLimitPerFilePercent { get; set; }\n\nMax percentage of bytes to scan from a file. The rest are omitted. The\nnumber of bytes scanned is rounded down. Must be between 0 and 100,\ninclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of\nbytes_limit_per_file and bytes_limit_per_file_percent can be specified.\nThis field can't be set if de-identification is requested. For certain file\ntypes, setting this field has no effect. For more information, see [Limits\non bytes scanned per\nfile](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).\n\n### FileSet\n\n public CloudStorageOptions.Types.FileSet FileSet { get; set; }\n\nThe set of one or more files to scan.\n\n### FileTypes\n\n public RepeatedField\u003cFileType\u003e FileTypes { get; }\n\nList of file type groups to include in the scan.\nIf empty, all files are scanned and available data format processors\nare applied. In addition, the binary content of the selected files\nis always scanned as well.\nImages are scanned only as binary if the specified region\ndoes not support image inspection and no file_types were specified.\nImage inspection is restricted to 'global', 'us', 'asia', and 'europe'.\n\n### FilesLimitPercent\n\n public int FilesLimitPercent { get; set; }\n\nLimits the number of files to scan to this percentage of the input FileSet.\nNumber of files scanned is rounded down. Must be between 0 and 100,\ninclusively. Both 0 and 100 means no limit. Defaults to 0.\n\n### SampleMethod\n\n public CloudStorageOptions.Types.SampleMethod SampleMethod { get; set; }\n\nHow to sample the data."]]