Class: Google::Cloud::Dlp::V2::CloudStorageOptions

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/privacy/dlp/v2/storage.rb

Overview

Options defining a file or a set of files within a Cloud Storage bucket.

Defined Under Namespace

Modules: SampleMethod Classes: FileSet

Instance Attribute Summary collapse

Instance Attribute Details

#bytes_limit_per_file::Integer

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

Returns:

  • (::Integer)

    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.



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 456

class CloudStorageOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Set of files to scan.
  # @!attribute [rw] url
  #   @return [::String]
  #     The Cloud Storage url of the file(s) to scan, in the format
  #     `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
  #
  #     If the url ends in a trailing slash, the bucket or directory represented
  #     by the url will be scanned non-recursively (content in sub-directories
  #     will not be scanned). This means that `gs://mybucket/` is equivalent to
  #     `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
  #     `gs://mybucket/directory/*`.
  #
  #     Exactly one of `url` or `regex_file_set` must be set.
  # @!attribute [rw] regex_file_set
  #   @return [::Google::Cloud::Dlp::V2::CloudStorageRegexFileSet]
  #     The regex-filtered set of files to scan. Exactly one of `url` or
  #     `regex_file_set` must be set.
  class FileSet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # How to sample bytes if not all bytes are scanned. Meaningful only when used
  # in conjunction with bytes_limit_per_file. If not specified, scanning would
  # start from the top.
  module SampleMethod
    # No sampling.
    SAMPLE_METHOD_UNSPECIFIED = 0

    # Scan from the top (default).
    TOP = 1

    # For each file larger than bytes_limit_per_file, randomly pick the offset
    # to start scanning. The scanned bytes are contiguous.
    RANDOM_START = 2
  end
end

#bytes_limit_per_file_percent::Integer

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

Returns:

  • (::Integer)

    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.



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 456

class CloudStorageOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Set of files to scan.
  # @!attribute [rw] url
  #   @return [::String]
  #     The Cloud Storage url of the file(s) to scan, in the format
  #     `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
  #
  #     If the url ends in a trailing slash, the bucket or directory represented
  #     by the url will be scanned non-recursively (content in sub-directories
  #     will not be scanned). This means that `gs://mybucket/` is equivalent to
  #     `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
  #     `gs://mybucket/directory/*`.
  #
  #     Exactly one of `url` or `regex_file_set` must be set.
  # @!attribute [rw] regex_file_set
  #   @return [::Google::Cloud::Dlp::V2::CloudStorageRegexFileSet]
  #     The regex-filtered set of files to scan. Exactly one of `url` or
  #     `regex_file_set` must be set.
  class FileSet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # How to sample bytes if not all bytes are scanned. Meaningful only when used
  # in conjunction with bytes_limit_per_file. If not specified, scanning would
  # start from the top.
  module SampleMethod
    # No sampling.
    SAMPLE_METHOD_UNSPECIFIED = 0

    # Scan from the top (default).
    TOP = 1

    # For each file larger than bytes_limit_per_file, randomly pick the offset
    # to start scanning. The scanned bytes are contiguous.
    RANDOM_START = 2
  end
end

#file_set::Google::Cloud::Dlp::V2::CloudStorageOptions::FileSet

Returns The set of one or more files to scan.

Returns:



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 456

class CloudStorageOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Set of files to scan.
  # @!attribute [rw] url
  #   @return [::String]
  #     The Cloud Storage url of the file(s) to scan, in the format
  #     `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
  #
  #     If the url ends in a trailing slash, the bucket or directory represented
  #     by the url will be scanned non-recursively (content in sub-directories
  #     will not be scanned). This means that `gs://mybucket/` is equivalent to
  #     `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
  #     `gs://mybucket/directory/*`.
  #
  #     Exactly one of `url` or `regex_file_set` must be set.
  # @!attribute [rw] regex_file_set
  #   @return [::Google::Cloud::Dlp::V2::CloudStorageRegexFileSet]
  #     The regex-filtered set of files to scan. Exactly one of `url` or
  #     `regex_file_set` must be set.
  class FileSet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # How to sample bytes if not all bytes are scanned. Meaningful only when used
  # in conjunction with bytes_limit_per_file. If not specified, scanning would
  # start from the top.
  module SampleMethod
    # No sampling.
    SAMPLE_METHOD_UNSPECIFIED = 0

    # Scan from the top (default).
    TOP = 1

    # For each file larger than bytes_limit_per_file, randomly pick the offset
    # to start scanning. The scanned bytes are contiguous.
    RANDOM_START = 2
  end
end

#file_types::Array<::Google::Cloud::Dlp::V2::FileType>

Returns 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'.

Returns:

  • (::Array<::Google::Cloud::Dlp::V2::FileType>)

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



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 456

class CloudStorageOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Set of files to scan.
  # @!attribute [rw] url
  #   @return [::String]
  #     The Cloud Storage url of the file(s) to scan, in the format
  #     `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
  #
  #     If the url ends in a trailing slash, the bucket or directory represented
  #     by the url will be scanned non-recursively (content in sub-directories
  #     will not be scanned). This means that `gs://mybucket/` is equivalent to
  #     `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
  #     `gs://mybucket/directory/*`.
  #
  #     Exactly one of `url` or `regex_file_set` must be set.
  # @!attribute [rw] regex_file_set
  #   @return [::Google::Cloud::Dlp::V2::CloudStorageRegexFileSet]
  #     The regex-filtered set of files to scan. Exactly one of `url` or
  #     `regex_file_set` must be set.
  class FileSet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # How to sample bytes if not all bytes are scanned. Meaningful only when used
  # in conjunction with bytes_limit_per_file. If not specified, scanning would
  # start from the top.
  module SampleMethod
    # No sampling.
    SAMPLE_METHOD_UNSPECIFIED = 0

    # Scan from the top (default).
    TOP = 1

    # For each file larger than bytes_limit_per_file, randomly pick the offset
    # to start scanning. The scanned bytes are contiguous.
    RANDOM_START = 2
  end
end

#files_limit_percent::Integer

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

Returns:

  • (::Integer)

    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.



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 456

class CloudStorageOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Set of files to scan.
  # @!attribute [rw] url
  #   @return [::String]
  #     The Cloud Storage url of the file(s) to scan, in the format
  #     `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
  #
  #     If the url ends in a trailing slash, the bucket or directory represented
  #     by the url will be scanned non-recursively (content in sub-directories
  #     will not be scanned). This means that `gs://mybucket/` is equivalent to
  #     `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
  #     `gs://mybucket/directory/*`.
  #
  #     Exactly one of `url` or `regex_file_set` must be set.
  # @!attribute [rw] regex_file_set
  #   @return [::Google::Cloud::Dlp::V2::CloudStorageRegexFileSet]
  #     The regex-filtered set of files to scan. Exactly one of `url` or
  #     `regex_file_set` must be set.
  class FileSet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # How to sample bytes if not all bytes are scanned. Meaningful only when used
  # in conjunction with bytes_limit_per_file. If not specified, scanning would
  # start from the top.
  module SampleMethod
    # No sampling.
    SAMPLE_METHOD_UNSPECIFIED = 0

    # Scan from the top (default).
    TOP = 1

    # For each file larger than bytes_limit_per_file, randomly pick the offset
    # to start scanning. The scanned bytes are contiguous.
    RANDOM_START = 2
  end
end

#sample_method::Google::Cloud::Dlp::V2::CloudStorageOptions::SampleMethod

Returns How to sample the data.

Returns:



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 456

class CloudStorageOptions
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Set of files to scan.
  # @!attribute [rw] url
  #   @return [::String]
  #     The Cloud Storage url of the file(s) to scan, in the format
  #     `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
  #
  #     If the url ends in a trailing slash, the bucket or directory represented
  #     by the url will be scanned non-recursively (content in sub-directories
  #     will not be scanned). This means that `gs://mybucket/` is equivalent to
  #     `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
  #     `gs://mybucket/directory/*`.
  #
  #     Exactly one of `url` or `regex_file_set` must be set.
  # @!attribute [rw] regex_file_set
  #   @return [::Google::Cloud::Dlp::V2::CloudStorageRegexFileSet]
  #     The regex-filtered set of files to scan. Exactly one of `url` or
  #     `regex_file_set` must be set.
  class FileSet
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # How to sample bytes if not all bytes are scanned. Meaningful only when used
  # in conjunction with bytes_limit_per_file. If not specified, scanning would
  # start from the top.
  module SampleMethod
    # No sampling.
    SAMPLE_METHOD_UNSPECIFIED = 0

    # Scan from the top (default).
    TOP = 1

    # For each file larger than bytes_limit_per_file, randomly pick the offset
    # to start scanning. The scanned bytes are contiguous.
    RANDOM_START = 2
  end
end