Class: Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy
- Inherits:
-
Object
- Object
- Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb
Overview
The data masking policy that is used to specify data masking rule.
Defined Under Namespace
Modules: PredefinedExpression
Instance Attribute Summary collapse
-
#predefined_expression ⇒ ::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression
A predefined masking expression.
-
#routine ⇒ ::String
The name of the BigQuery routine that contains the custom masking routine, in the format of
projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}
.
Instance Attribute Details
#predefined_expression ⇒ ::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression
Returns A predefined masking expression.
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 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb', line 181 class DataMaskingPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The available masking rules. Learn more here: # https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options. module PredefinedExpression # Default, unspecified predefined expression. No masking will take place # since no expression is specified. PREDEFINED_EXPRESSION_UNSPECIFIED = 0 # Masking expression to replace data with SHA-256 hash. SHA256 = 3 # Masking expression to replace data with NULLs. ALWAYS_NULL = 5 # Masking expression to replace data with their default masking values. # The default masking values for each type listed as below: # # * STRING: "" # * BYTES: b'' # * INTEGER: 0 # * FLOAT: 0.0 # * NUMERIC: 0 # * BOOLEAN: FALSE # * TIMESTAMP: 1970-01-01 00:00:00 UTC # * DATE: 1970-01-01 # * TIME: 00:00:00 # * DATETIME: 1970-01-01T00:00:00 # * GEOGRAPHY: POINT(0 0) # * BIGNUMERIC: 0 # * ARRAY: [] # * STRUCT: NOT_APPLICABLE # * JSON: NULL DEFAULT_MASKING_VALUE = 7 # Masking expression shows the last four characters of text. # The masking behavior is as follows: # # * If text length > 4 characters: Replace text with XXXXX, append last # four characters of original text. # * If text length <= 4 characters: Apply SHA-256 hash. LAST_FOUR_CHARACTERS = 9 # Masking expression shows the first four characters of text. # The masking behavior is as follows: # # * If text length > 4 characters: Replace text with XXXXX, prepend first # four characters of original text. # * If text length <= 4 characters: Apply SHA-256 hash. FIRST_FOUR_CHARACTERS = 10 # Masking expression for email addresses. # The masking behavior is as follows: # # * Syntax-valid email address: Replace username with XXXXX. For example, # [email protected] becomes [email protected]. # * Syntax-invalid email address: Apply SHA-256 hash. # # For more information, see [Email # mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options). EMAIL_MASK = 12 # Masking expression to only show the year of `Date`, # `DateTime` and `TimeStamp`. For example, with the # year 2076: # # * DATE : 2076-01-01 # * DATETIME : 2076-01-01T00:00:00 # * TIMESTAMP : 2076-01-01 00:00:00 UTC # # Truncation occurs according to the UTC time zone. To change this, adjust # the default time zone using the `time_zone` system variable. # For more information, see the <a # href="https://cloud.google.com/bigquery/docs/reference/system-variables">System # variables reference</a>. DATE_YEAR_MASK = 13 end end |
#routine ⇒ ::String
Returns The name of the BigQuery routine that contains the custom masking
routine, in the format of
projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}
.
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 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb', line 181 class DataMaskingPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The available masking rules. Learn more here: # https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options. module PredefinedExpression # Default, unspecified predefined expression. No masking will take place # since no expression is specified. PREDEFINED_EXPRESSION_UNSPECIFIED = 0 # Masking expression to replace data with SHA-256 hash. SHA256 = 3 # Masking expression to replace data with NULLs. ALWAYS_NULL = 5 # Masking expression to replace data with their default masking values. # The default masking values for each type listed as below: # # * STRING: "" # * BYTES: b'' # * INTEGER: 0 # * FLOAT: 0.0 # * NUMERIC: 0 # * BOOLEAN: FALSE # * TIMESTAMP: 1970-01-01 00:00:00 UTC # * DATE: 1970-01-01 # * TIME: 00:00:00 # * DATETIME: 1970-01-01T00:00:00 # * GEOGRAPHY: POINT(0 0) # * BIGNUMERIC: 0 # * ARRAY: [] # * STRUCT: NOT_APPLICABLE # * JSON: NULL DEFAULT_MASKING_VALUE = 7 # Masking expression shows the last four characters of text. # The masking behavior is as follows: # # * If text length > 4 characters: Replace text with XXXXX, append last # four characters of original text. # * If text length <= 4 characters: Apply SHA-256 hash. LAST_FOUR_CHARACTERS = 9 # Masking expression shows the first four characters of text. # The masking behavior is as follows: # # * If text length > 4 characters: Replace text with XXXXX, prepend first # four characters of original text. # * If text length <= 4 characters: Apply SHA-256 hash. FIRST_FOUR_CHARACTERS = 10 # Masking expression for email addresses. # The masking behavior is as follows: # # * Syntax-valid email address: Replace username with XXXXX. For example, # [email protected] becomes [email protected]. # * Syntax-invalid email address: Apply SHA-256 hash. # # For more information, see [Email # mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options). EMAIL_MASK = 12 # Masking expression to only show the year of `Date`, # `DateTime` and `TimeStamp`. For example, with the # year 2076: # # * DATE : 2076-01-01 # * DATETIME : 2076-01-01T00:00:00 # * TIMESTAMP : 2076-01-01 00:00:00 UTC # # Truncation occurs according to the UTC time zone. To change this, adjust # the default time zone using the `time_zone` system variable. # For more information, see the <a # href="https://cloud.google.com/bigquery/docs/reference/system-variables">System # variables reference</a>. DATE_YEAR_MASK = 13 end end |