- 1.72.0 (latest)
- 1.71.0
- 1.70.0
- 1.69.0
- 1.68.0
- 1.67.0
- 1.66.2
- 1.65.0
- 1.64.0
- 1.63.1
- 1.62.0
- 1.61.0
- 1.60.0
- 1.59.1
- 1.58.0
- 1.57.1
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.2
- 1.50.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.1
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.2
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.1
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
Constants
DataPolicyService_CreateDataPolicy_FullMethodName, DataPolicyService_AddGrantees_FullMethodName, DataPolicyService_RemoveGrantees_FullMethodName, DataPolicyService_UpdateDataPolicy_FullMethodName, DataPolicyService_DeleteDataPolicy_FullMethodName, DataPolicyService_GetDataPolicy_FullMethodName, DataPolicyService_ListDataPolicies_FullMethodName, DataPolicyService_GetIamPolicy_FullMethodName, DataPolicyService_SetIamPolicy_FullMethodName, DataPolicyService_TestIamPermissions_FullMethodName
const (
DataPolicyService_CreateDataPolicy_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/CreateDataPolicy"
DataPolicyService_AddGrantees_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/AddGrantees"
DataPolicyService_RemoveGrantees_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/RemoveGrantees"
DataPolicyService_UpdateDataPolicy_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/UpdateDataPolicy"
DataPolicyService_DeleteDataPolicy_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/DeleteDataPolicy"
DataPolicyService_GetDataPolicy_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/GetDataPolicy"
DataPolicyService_ListDataPolicies_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/ListDataPolicies"
DataPolicyService_GetIamPolicy_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/GetIamPolicy"
DataPolicyService_SetIamPolicy_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/SetIamPolicy"
DataPolicyService_TestIamPermissions_FullMethodName = "/google.cloud.bigquery.datapolicies.v2.DataPolicyService/TestIamPermissions"
)Variables
DataPolicy_DataPolicyType_name, DataPolicy_DataPolicyType_value
var (
DataPolicy_DataPolicyType_name = map[int32]string{
0: "DATA_POLICY_TYPE_UNSPECIFIED",
1: "DATA_MASKING_POLICY",
2: "RAW_DATA_ACCESS_POLICY",
3: "COLUMN_LEVEL_SECURITY_POLICY",
}
DataPolicy_DataPolicyType_value = map[string]int32{
"DATA_POLICY_TYPE_UNSPECIFIED": 0,
"DATA_MASKING_POLICY": 1,
"RAW_DATA_ACCESS_POLICY": 2,
"COLUMN_LEVEL_SECURITY_POLICY": 3,
}
)Enum value maps for DataPolicy_DataPolicyType.
DataPolicy_Version_name, DataPolicy_Version_value
var (
DataPolicy_Version_name = map[int32]string{
0: "VERSION_UNSPECIFIED",
1: "V1",
2: "V2",
}
DataPolicy_Version_value = map[string]int32{
"VERSION_UNSPECIFIED": 0,
"V1": 1,
"V2": 2,
}
)Enum value maps for DataPolicy_Version.
DataMaskingPolicy_PredefinedExpression_name, DataMaskingPolicy_PredefinedExpression_value
var (
DataMaskingPolicy_PredefinedExpression_name = map[int32]string{
0: "PREDEFINED_EXPRESSION_UNSPECIFIED",
1: "SHA256",
2: "ALWAYS_NULL",
3: "DEFAULT_MASKING_VALUE",
4: "LAST_FOUR_CHARACTERS",
5: "FIRST_FOUR_CHARACTERS",
6: "EMAIL_MASK",
7: "DATE_YEAR_MASK",
8: "RANDOM_HASH",
}
DataMaskingPolicy_PredefinedExpression_value = map[string]int32{
"PREDEFINED_EXPRESSION_UNSPECIFIED": 0,
"SHA256": 1,
"ALWAYS_NULL": 2,
"DEFAULT_MASKING_VALUE": 3,
"LAST_FOUR_CHARACTERS": 4,
"FIRST_FOUR_CHARACTERS": 5,
"EMAIL_MASK": 6,
"DATE_YEAR_MASK": 7,
"RANDOM_HASH": 8,
}
)Enum value maps for DataMaskingPolicy_PredefinedExpression.
DataPolicyService_ServiceDesc
var DataPolicyService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.bigquery.datapolicies.v2.DataPolicyService",
HandlerType: (*DataPolicyServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateDataPolicy",
Handler: _DataPolicyService_CreateDataPolicy_Handler,
},
{
MethodName: "AddGrantees",
Handler: _DataPolicyService_AddGrantees_Handler,
},
{
MethodName: "RemoveGrantees",
Handler: _DataPolicyService_RemoveGrantees_Handler,
},
{
MethodName: "UpdateDataPolicy",
Handler: _DataPolicyService_UpdateDataPolicy_Handler,
},
{
MethodName: "DeleteDataPolicy",
Handler: _DataPolicyService_DeleteDataPolicy_Handler,
},
{
MethodName: "GetDataPolicy",
Handler: _DataPolicyService_GetDataPolicy_Handler,
},
{
MethodName: "ListDataPolicies",
Handler: _DataPolicyService_ListDataPolicies_Handler,
},
{
MethodName: "GetIamPolicy",
Handler: _DataPolicyService_GetIamPolicy_Handler,
},
{
MethodName: "SetIamPolicy",
Handler: _DataPolicyService_SetIamPolicy_Handler,
},
{
MethodName: "TestIamPermissions",
Handler: _DataPolicyService_TestIamPermissions_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/bigquery/datapolicies/v2/datapolicy.proto",
}DataPolicyService_ServiceDesc is the grpc.ServiceDesc for DataPolicyService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
File_google_cloud_bigquery_datapolicies_v2_datapolicy_proto
var File_google_cloud_bigquery_datapolicies_v2_datapolicy_proto protoreflect.FileDescriptorFunctions
func RegisterDataPolicyServiceServer
func RegisterDataPolicyServiceServer(s grpc.ServiceRegistrar, srv DataPolicyServiceServer)AddGranteesRequest
type AddGranteesRequest struct {
// Required. Resource name of this data policy, in the format of
// `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
DataPolicy string `protobuf:"bytes,1,opt,name=data_policy,json=dataPolicy,proto3" json:"data_policy,omitempty"`
// Required. IAM principal that should be granted Fine Grained Access to the
// underlying data goverened by the data policy. The target data policy is
// determined by the `data_policy` field.
//
// Uses the [IAM V2 principal
// syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2).
// Supported principal types:
//
// * User
// * Group
// * Service account
Grantees []string `protobuf:"bytes,2,rep,name=grantees,proto3" json:"grantees,omitempty"`
// contains filtered or unexported fields
}Request message for the AddGrantees method.
func (*AddGranteesRequest) Descriptor
func (*AddGranteesRequest) Descriptor() ([]byte, []int)Deprecated: Use AddGranteesRequest.ProtoReflect.Descriptor instead.
func (*AddGranteesRequest) GetDataPolicy
func (x *AddGranteesRequest) GetDataPolicy() stringfunc (*AddGranteesRequest) GetGrantees
func (x *AddGranteesRequest) GetGrantees() []stringfunc (*AddGranteesRequest) ProtoMessage
func (*AddGranteesRequest) ProtoMessage()func (*AddGranteesRequest) ProtoReflect
func (x *AddGranteesRequest) ProtoReflect() protoreflect.Messagefunc (*AddGranteesRequest) Reset
func (x *AddGranteesRequest) Reset()func (*AddGranteesRequest) String
func (x *AddGranteesRequest) String() stringCreateDataPolicyRequest
type CreateDataPolicyRequest struct {
// Required. Resource name of the project that the data policy will belong to.
// The format is `projects/{project_number}/locations/{location_id}`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. User-assigned (human readable) ID of the data policy that needs
// to be unique within a project. Used as {data_policy_id} in part of the
// resource name.
DataPolicyId string `protobuf:"bytes,2,opt,name=data_policy_id,json=dataPolicyId,proto3" json:"data_policy_id,omitempty"`
// Required. The data policy to create. The `name` field does not need to be
// provided for the data policy creation.
DataPolicy *DataPolicy `protobuf:"bytes,3,opt,name=data_policy,json=dataPolicy,proto3" json:"data_policy,omitempty"`
// contains filtered or unexported fields
}Request message for the CreateDataPolicy method.
func (*CreateDataPolicyRequest) Descriptor
func (*CreateDataPolicyRequest) Descriptor() ([]byte, []int)Deprecated: Use CreateDataPolicyRequest.ProtoReflect.Descriptor instead.
func (*CreateDataPolicyRequest) GetDataPolicy
func (x *CreateDataPolicyRequest) GetDataPolicy() *DataPolicyfunc (*CreateDataPolicyRequest) GetDataPolicyId
func (x *CreateDataPolicyRequest) GetDataPolicyId() stringfunc (*CreateDataPolicyRequest) GetParent
func (x *CreateDataPolicyRequest) GetParent() stringfunc (*CreateDataPolicyRequest) ProtoMessage
func (*CreateDataPolicyRequest) ProtoMessage()func (*CreateDataPolicyRequest) ProtoReflect
func (x *CreateDataPolicyRequest) ProtoReflect() protoreflect.Messagefunc (*CreateDataPolicyRequest) Reset
func (x *CreateDataPolicyRequest) Reset()func (*CreateDataPolicyRequest) String
func (x *CreateDataPolicyRequest) String() stringDataMaskingPolicy
type DataMaskingPolicy struct {
// A masking expression to bind to the data masking rule.
//
// Types that are assignable to MaskingExpression:
//
// *DataMaskingPolicy_PredefinedExpression_
// *DataMaskingPolicy_Routine
MaskingExpression isDataMaskingPolicy_MaskingExpression `protobuf_oneof:"masking_expression"`
// contains filtered or unexported fields
}The policy used to specify data masking rule.
func (*DataMaskingPolicy) Descriptor
func (*DataMaskingPolicy) Descriptor() ([]byte, []int)Deprecated: Use DataMaskingPolicy.ProtoReflect.Descriptor instead.
func (*DataMaskingPolicy) GetMaskingExpression
func (m *DataMaskingPolicy) GetMaskingExpression() isDataMaskingPolicy_MaskingExpressionfunc (*DataMaskingPolicy) GetPredefinedExpression
func (x *DataMaskingPolicy) GetPredefinedExpression() DataMaskingPolicy_PredefinedExpressionfunc (*DataMaskingPolicy) GetRoutine
func (x *DataMaskingPolicy) GetRoutine() stringfunc (*DataMaskingPolicy) ProtoMessage
func (*DataMaskingPolicy) ProtoMessage()func (*DataMaskingPolicy) ProtoReflect
func (x *DataMaskingPolicy) ProtoReflect() protoreflect.Messagefunc (*DataMaskingPolicy) Reset
func (x *DataMaskingPolicy) Reset()func (*DataMaskingPolicy) String
func (x *DataMaskingPolicy) String() stringDataMaskingPolicy_PredefinedExpression
type DataMaskingPolicy_PredefinedExpression int32The available masking rules. Learn more here: https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options.
DataMaskingPolicy_PREDEFINED_EXPRESSION_UNSPECIFIED, DataMaskingPolicy_SHA256, DataMaskingPolicy_ALWAYS_NULL, DataMaskingPolicy_DEFAULT_MASKING_VALUE, DataMaskingPolicy_LAST_FOUR_CHARACTERS, DataMaskingPolicy_FIRST_FOUR_CHARACTERS, DataMaskingPolicy_EMAIL_MASK, DataMaskingPolicy_DATE_YEAR_MASK, DataMaskingPolicy_RANDOM_HASH
const (
// Default, unspecified predefined expression. No masking will take place
// since no expression is specified.
DataMaskingPolicy_PREDEFINED_EXPRESSION_UNSPECIFIED DataMaskingPolicy_PredefinedExpression = 0
// Masking expression to replace data with SHA-256 hash.
DataMaskingPolicy_SHA256 DataMaskingPolicy_PredefinedExpression = 1
// Masking expression to replace data with NULLs.
DataMaskingPolicy_ALWAYS_NULL DataMaskingPolicy_PredefinedExpression = 2
// 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
DataMaskingPolicy_DEFAULT_MASKING_VALUE DataMaskingPolicy_PredefinedExpression = 3
// 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.="" datamaskingpolicy_last_four_characters="">DataMaskingPolicy_PredefinedExpression = 4
// 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.="" datamaskingpolicy_first_four_characters="">DataMaskingPolicy_PredefinedExpression = 5
// Masking expression for email addresses.
// The masking behavior is as follows:
//
// * Syntax-valid email address: Replace username with XXXXX. For example,
// cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com.
// * 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).
DataMaskingPolicy_EMAIL_MASK DataMaskingPolicy_PredefinedExpression = 6
// 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 [System variables
// reference](https://cloud.google.com/bigquery/docs/reference/system-variables).
DataMaskingPolicy_DATE_YEAR_MASK DataMaskingPolicy_PredefinedExpression = 7
// Masking expression that uses hashing to mask column data.
// It differs from SHA256 in that a unique random value is generated for
// each query and is added to the hash input, resulting in the hash / masked
// result to be different for each query. Hence the name "random hash".
DataMaskingPolicy_RANDOM_HASH DataMaskingPolicy_PredefinedExpression = 8
)func (DataMaskingPolicy_PredefinedExpression) Descriptor
func (DataMaskingPolicy_PredefinedExpression) Descriptor() protoreflect.EnumDescriptorfunc (DataMaskingPolicy_PredefinedExpression) Enum
func (DataMaskingPolicy_PredefinedExpression) EnumDescriptor
func (DataMaskingPolicy_PredefinedExpression) EnumDescriptor() ([]byte, []int)Deprecated: Use DataMaskingPolicy_PredefinedExpression.Descriptor instead.
func (DataMaskingPolicy_PredefinedExpression) Number
func (x DataMaskingPolicy_PredefinedExpression) Number() protoreflect.EnumNumberfunc (DataMaskingPolicy_PredefinedExpression) String
func (x DataMaskingPolicy_PredefinedExpression) String() stringfunc (DataMaskingPolicy_PredefinedExpression) Type
func (DataMaskingPolicy_PredefinedExpression) Type() protoreflect.EnumTypeDataMaskingPolicy_PredefinedExpression_
type DataMaskingPolicy_PredefinedExpression_ struct {
// Optional. A predefined masking expression.
PredefinedExpression DataMaskingPolicy_PredefinedExpression `protobuf:"varint,1,opt,name=predefined_expression,json=predefinedExpression,proto3,enum=google.cloud.bigquery.datapolicies.v2.DataMaskingPolicy_PredefinedExpression,oneof"`
}DataMaskingPolicy_Routine
type DataMaskingPolicy_Routine struct {
// Optional. 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}`.
Routine string `protobuf:"bytes,2,opt,name=routine,proto3,oneof"`
}DataPolicy
type DataPolicy struct {
// The policy that is bound to this data policy.
//
// Types that are assignable to Policy:
//
// *DataPolicy_DataMaskingPolicy
Policy isDataPolicy_Policy `protobuf_oneof:"policy"`
// Identifier. Resource name of this data policy, in the format of
// `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. User-assigned (human readable) ID of the data policy that
// needs to be unique within a project. Used as {data_policy_id} in part of
// the resource name.
DataPolicyId string `protobuf:"bytes,2,opt,name=data_policy_id,json=dataPolicyId,proto3" json:"data_policy_id,omitempty"`
// The etag for this Data Policy.
// This field is used for UpdateDataPolicy calls. If Data Policy exists, this
// field is required and must match the server's etag. It will also be
// populated in the response of GetDataPolicy, CreateDataPolicy, and
// UpdateDataPolicy calls.
Etag *string `protobuf:"bytes,11,opt,name=etag,proto3,oneof" json:"etag,omitempty"`
// Required. Type of data policy.
DataPolicyType DataPolicy_DataPolicyType `protobuf:"varint,3,opt,name=data_policy_type,json=dataPolicyType,proto3,enum=google.cloud.bigquery.datapolicies.v2.DataPolicy_DataPolicyType" json:"data_policy_type,omitempty"`
// Output only. Policy tag resource name, in the format of
// `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`.
// policy_tag is supported only for V1 data policies.
PolicyTag string `protobuf:"bytes,4,opt,name=policy_tag,json=policyTag,proto3" json:"policy_tag,omitempty"`
// Optional. The list of IAM principals that have Fine Grained Access to the
// underlying data goverened by this data policy.
//
// Uses the [IAM V2 principal
// syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2) Only
// supports principal types users, groups, serviceaccounts, cloudidentity.
// This field is supported in V2 Data Policy only. In case of V1 data policies
// (i.e. verion = 1 and policy_tag is set), this field is not populated.
Grantees []string `protobuf:"bytes,8,rep,name=grantees,proto3" json:"grantees,omitempty"`
// Output only. The version of the Data Policy resource.
Version DataPolicy_Version `protobuf:"varint,9,opt,name=version,proto3,enum=google.cloud.bigquery.datapolicies.v2.DataPolicy_Version" json:"version,omitempty"`
// contains filtered or unexported fields
}Represents the label-policy binding.
func (*DataPolicy) Descriptor
func (*DataPolicy) Descriptor() ([]byte, []int)Deprecated: Use DataPolicy.ProtoReflect.Descriptor instead.
func (*DataPolicy) GetDataMaskingPolicy
func (x *DataPolicy) GetDataMaskingPolicy() *DataMaskingPolicyfunc (*DataPolicy) GetDataPolicyId
func (x *DataPolicy) GetDataPolicyId() stringfunc (*DataPolicy) GetDataPolicyType
func (x *DataPolicy) GetDataPolicyType() DataPolicy_DataPolicyTypefunc (*DataPolicy) GetEtag
func (x *DataPolicy) GetEtag() stringfunc (*DataPolicy) GetGrantees
func (x *DataPolicy) GetGrantees() []stringfunc (*DataPolicy) GetName
func (x *DataPolicy) GetName() stringfunc (*DataPolicy) GetPolicy
func (m *DataPolicy) GetPolicy() isDataPolicy_Policyfunc (*DataPolicy) GetPolicyTag
func (x *DataPolicy) GetPolicyTag() stringfunc (*DataPolicy) GetVersion
func (x *DataPolicy) GetVersion() DataPolicy_Versionfunc (*DataPolicy) ProtoMessage
func (*DataPolicy) ProtoMessage()func (*DataPolicy) ProtoReflect
func (x *DataPolicy) ProtoReflect() protoreflect.Messagefunc (*DataPolicy) Reset
func (x *DataPolicy) Reset()func (*DataPolicy) String
func (x *DataPolicy) String() stringDataPolicyServiceClient
type DataPolicyServiceClient interface {
// Creates a new data policy under a project with the given `data_policy_id`
// (used as the display name), and data policy type.
CreateDataPolicy(ctx context.Context, in *CreateDataPolicyRequest, opts ...grpc.CallOption) (*DataPolicy, error)
// Adds new grantees to a data policy.
// The new grantees will be added to the existing grantees.
// If the request contains a duplicate grantee, the grantee will be ignored.
// If the request contains a grantee that already exists, the grantee will be
// ignored.
AddGrantees(ctx context.Context, in *AddGranteesRequest, opts ...grpc.CallOption) (*DataPolicy, error)
// Removes grantees from a data policy.
// The grantees will be removed from the existing grantees.
// If the request contains a grantee that does not exist, the grantee will be
// ignored.
RemoveGrantees(ctx context.Context, in *RemoveGranteesRequest, opts ...grpc.CallOption) (*DataPolicy, error)
// Updates the metadata for an existing data policy. The target data policy
// can be specified by the resource name.
UpdateDataPolicy(ctx context.Context, in *UpdateDataPolicyRequest, opts ...grpc.CallOption) (*DataPolicy, error)
// Deletes the data policy specified by its resource name.
DeleteDataPolicy(ctx context.Context, in *DeleteDataPolicyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Gets the data policy specified by its resource name.
GetDataPolicy(ctx context.Context, in *GetDataPolicyRequest, opts ...grpc.CallOption) (*DataPolicy, error)
// List all of the data policies in the specified parent project.
ListDataPolicies(ctx context.Context, in *ListDataPoliciesRequest, opts ...grpc.CallOption) (*ListDataPoliciesResponse, error)
// Gets the IAM policy for the specified data policy.
GetIamPolicy(ctx context.Context, in *iampb.GetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error)
// Sets the IAM policy for the specified data policy.
SetIamPolicy(ctx context.Context, in *iampb.SetIamPolicyRequest, opts ...grpc.CallOption) (*iampb.Policy, error)
// Returns the caller's permission on the specified data policy resource.
TestIamPermissions(ctx context.Context, in *iampb.TestIamPermissionsRequest, opts ...grpc.CallOption) (*iampb.TestIamPermissionsResponse, error)
}DataPolicyServiceClient is the client API for DataPolicyService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewDataPolicyServiceClient
func NewDataPolicyServiceClient(cc grpc.ClientConnInterface) DataPolicyServiceClientDataPolicyServiceServer
type DataPolicyServiceServer interface {
// Creates a new data policy under a project with the given `data_policy_id`
// (used as the display name), and data policy type.
CreateDataPolicy(context.Context, *CreateDataPolicyRequest) (*DataPolicy, error)
// Adds new grantees to a data policy.
// The new grantees will be added to the existing grantees.
// If the request contains a duplicate grantee, the grantee will be ignored.
// If the request contains a grantee that already exists, the grantee will be
// ignored.
AddGrantees(context.Context, *AddGranteesRequest) (*DataPolicy, error)
// Removes grantees from a data policy.
// The grantees will be removed from the existing grantees.
// If the request contains a grantee that does not exist, the grantee will be
// ignored.
RemoveGrantees(context.Context, *RemoveGranteesRequest) (*DataPolicy, error)
// Updates the metadata for an existing data policy. The target data policy
// can be specified by the resource name.
UpdateDataPolicy(context.Context, *UpdateDataPolicyRequest) (*DataPolicy, error)
// Deletes the data policy specified by its resource name.
DeleteDataPolicy(context.Context, *DeleteDataPolicyRequest) (*emptypb.Empty, error)
// Gets the data policy specified by its resource name.
GetDataPolicy(context.Context, *GetDataPolicyRequest) (*DataPolicy, error)
// List all of the data policies in the specified parent project.
ListDataPolicies(context.Context, *ListDataPoliciesRequest) (*ListDataPoliciesResponse, error)
// Gets the IAM policy for the specified data policy.
GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error)
// Sets the IAM policy for the specified data policy.
SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error)
// Returns the caller's permission on the specified data policy resource.
TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error)
}DataPolicyServiceServer is the server API for DataPolicyService service. All implementations should embed UnimplementedDataPolicyServiceServer for forward compatibility
DataPolicy_DataMaskingPolicy
type DataPolicy_DataMaskingPolicy struct {
// Optional. The data masking policy that specifies the data masking rule to
// use. It must be set if the data policy type is DATA_MASKING_POLICY.
DataMaskingPolicy *DataMaskingPolicy `protobuf:"bytes,7,opt,name=data_masking_policy,json=dataMaskingPolicy,proto3,oneof"`
}DataPolicy_DataPolicyType
type DataPolicy_DataPolicyType int32A list of supported data policy types.
DataPolicy_DATA_POLICY_TYPE_UNSPECIFIED, DataPolicy_DATA_MASKING_POLICY, DataPolicy_RAW_DATA_ACCESS_POLICY, DataPolicy_COLUMN_LEVEL_SECURITY_POLICY
const (
// Default value for the data policy type. This should not be used.
DataPolicy_DATA_POLICY_TYPE_UNSPECIFIED DataPolicy_DataPolicyType = 0
// Used to create a data policy for data masking.
DataPolicy_DATA_MASKING_POLICY DataPolicy_DataPolicyType = 1
// Used to create a data policy for raw data access.
DataPolicy_RAW_DATA_ACCESS_POLICY DataPolicy_DataPolicyType = 2
// Used to create a data policy for column-level security, without data
// masking. This is deprecated in V2 api and only present to support GET and
// LIST operations for V1 data policies in V2 api.
DataPolicy_COLUMN_LEVEL_SECURITY_POLICY DataPolicy_DataPolicyType = 3
)func (DataPolicy_DataPolicyType) Descriptor
func (DataPolicy_DataPolicyType) Descriptor() protoreflect.EnumDescriptorfunc (DataPolicy_DataPolicyType) Enum
func (x DataPolicy_DataPolicyType) Enum() *DataPolicy_DataPolicyTypefunc (DataPolicy_DataPolicyType) EnumDescriptor
func (DataPolicy_DataPolicyType) EnumDescriptor() ([]byte, []int)Deprecated: Use DataPolicy_DataPolicyType.Descriptor instead.
func (DataPolicy_DataPolicyType) Number
func (x DataPolicy_DataPolicyType) Number() protoreflect.EnumNumberfunc (DataPolicy_DataPolicyType) String
func (x DataPolicy_DataPolicyType) String() stringfunc (DataPolicy_DataPolicyType) Type
func (DataPolicy_DataPolicyType) Type() protoreflect.EnumTypeDataPolicy_Version
type DataPolicy_Version int32The supported versions for the Data Policy resource.
DataPolicy_VERSION_UNSPECIFIED, DataPolicy_V1, DataPolicy_V2
const (
// Default value for the data policy version. This should not be used.
DataPolicy_VERSION_UNSPECIFIED DataPolicy_Version = 0
// V1 data policy version. V1 Data Policies will be present in V2 List api
// response, but can not be created/updated/deleted from V2 api.
DataPolicy_V1 DataPolicy_Version = 1
// V2 data policy version.
DataPolicy_V2 DataPolicy_Version = 2
)func (DataPolicy_Version) Descriptor
func (DataPolicy_Version) Descriptor() protoreflect.EnumDescriptorfunc (DataPolicy_Version) Enum
func (x DataPolicy_Version) Enum() *DataPolicy_Versionfunc (DataPolicy_Version) EnumDescriptor
func (DataPolicy_Version) EnumDescriptor() ([]byte, []int)Deprecated: Use DataPolicy_Version.Descriptor instead.
func (DataPolicy_Version) Number
func (x DataPolicy_Version) Number() protoreflect.EnumNumberfunc (DataPolicy_Version) String
func (x DataPolicy_Version) String() stringfunc (DataPolicy_Version) Type
func (DataPolicy_Version) Type() protoreflect.EnumTypeDeleteDataPolicyRequest
type DeleteDataPolicyRequest struct {
// Required. Resource name of the data policy to delete. Format is
// `projects/{project_number}/locations/{location_id}/dataPolicies/{id}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for the DeleteDataPolicy method.
func (*DeleteDataPolicyRequest) Descriptor
func (*DeleteDataPolicyRequest) Descriptor() ([]byte, []int)Deprecated: Use DeleteDataPolicyRequest.ProtoReflect.Descriptor instead.
func (*DeleteDataPolicyRequest) GetName
func (x *DeleteDataPolicyRequest) GetName() stringfunc (*DeleteDataPolicyRequest) ProtoMessage
func (*DeleteDataPolicyRequest) ProtoMessage()func (*DeleteDataPolicyRequest) ProtoReflect
func (x *DeleteDataPolicyRequest) ProtoReflect() protoreflect.Messagefunc (*DeleteDataPolicyRequest) Reset
func (x *DeleteDataPolicyRequest) Reset()func (*DeleteDataPolicyRequest) String
func (x *DeleteDataPolicyRequest) String() stringGetDataPolicyRequest
type GetDataPolicyRequest struct {
// Required. Resource name of the requested data policy. Format is
// `projects/{project_number}/locations/{location_id}/dataPolicies/{id}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for the GetDataPolicy method.
func (*GetDataPolicyRequest) Descriptor
func (*GetDataPolicyRequest) Descriptor() ([]byte, []int)Deprecated: Use GetDataPolicyRequest.ProtoReflect.Descriptor instead.
func (*GetDataPolicyRequest) GetName
func (x *GetDataPolicyRequest) GetName() stringfunc (*GetDataPolicyRequest) ProtoMessage
func (*GetDataPolicyRequest) ProtoMessage()func (*GetDataPolicyRequest) ProtoReflect
func (x *GetDataPolicyRequest) ProtoReflect() protoreflect.Messagefunc (*GetDataPolicyRequest) Reset
func (x *GetDataPolicyRequest) Reset()func (*GetDataPolicyRequest) String
func (x *GetDataPolicyRequest) String() stringListDataPoliciesRequest
type ListDataPoliciesRequest struct {
// Required. Resource name of the project for which to list data policies.
// Format is `projects/{project_number}/locations/{location_id}`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of data policies to return. Must be a value
// between 1 and 1000. If not set, defaults to 50.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. The `nextPageToken` value returned from a previous list request,
// if any. If not set, defaults to an empty string.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// Optional. Filters the data policies by policy tags that they
// are associated with. Currently filter only supports
// "policy_tag" based filtering and OR based predicates. Sample
// filter can be "policy_tag:
// projects/1/locations/us/taxonomies/2/policyTags/3".
// You may also use wildcard such as "policy_tag:
// projects/1/locations/us/taxonomies/2*". Please note that OR predicates
// cannot be used with wildcard filters.
Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
// contains filtered or unexported fields
}Request message for the ListDataPolicies method.
func (*ListDataPoliciesRequest) Descriptor
func (*ListDataPoliciesRequest) Descriptor() ([]byte, []int)Deprecated: Use ListDataPoliciesRequest.ProtoReflect.Descriptor instead.
func (*ListDataPoliciesRequest) GetFilter
func (x *ListDataPoliciesRequest) GetFilter() stringfunc (*ListDataPoliciesRequest) GetPageSize
func (x *ListDataPoliciesRequest) GetPageSize() int32func (*ListDataPoliciesRequest) GetPageToken
func (x *ListDataPoliciesRequest) GetPageToken() stringfunc (*ListDataPoliciesRequest) GetParent
func (x *ListDataPoliciesRequest) GetParent() stringfunc (*ListDataPoliciesRequest) ProtoMessage
func (*ListDataPoliciesRequest) ProtoMessage()func (*ListDataPoliciesRequest) ProtoReflect
func (x *ListDataPoliciesRequest) ProtoReflect() protoreflect.Messagefunc (*ListDataPoliciesRequest) Reset
func (x *ListDataPoliciesRequest) Reset()func (*ListDataPoliciesRequest) String
func (x *ListDataPoliciesRequest) String() stringListDataPoliciesResponse
type ListDataPoliciesResponse struct {
// Data policies that belong to the requested project.
DataPolicies []*DataPolicy `protobuf:"bytes,1,rep,name=data_policies,json=dataPolicies,proto3" json:"data_policies,omitempty"`
// Token used to retrieve the next page of results, or empty if there are no
// more results.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}Response message for the ListDataPolicies method.
func (*ListDataPoliciesResponse) Descriptor
func (*ListDataPoliciesResponse) Descriptor() ([]byte, []int)Deprecated: Use ListDataPoliciesResponse.ProtoReflect.Descriptor instead.
func (*ListDataPoliciesResponse) GetDataPolicies
func (x *ListDataPoliciesResponse) GetDataPolicies() []*DataPolicyfunc (*ListDataPoliciesResponse) GetNextPageToken
func (x *ListDataPoliciesResponse) GetNextPageToken() stringfunc (*ListDataPoliciesResponse) ProtoMessage
func (*ListDataPoliciesResponse) ProtoMessage()func (*ListDataPoliciesResponse) ProtoReflect
func (x *ListDataPoliciesResponse) ProtoReflect() protoreflect.Messagefunc (*ListDataPoliciesResponse) Reset
func (x *ListDataPoliciesResponse) Reset()func (*ListDataPoliciesResponse) String
func (x *ListDataPoliciesResponse) String() stringRemoveGranteesRequest
type RemoveGranteesRequest struct {
// Required. Resource name of this data policy, in the format of
// `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.
DataPolicy string `protobuf:"bytes,1,opt,name=data_policy,json=dataPolicy,proto3" json:"data_policy,omitempty"`
// Required. IAM principal that should be revoked from Fine Grained Access to
// the underlying data goverened by the data policy. The target data policy is
// determined by the `data_policy` field.
//
// Uses the [IAM V2 principal
// syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2).
// Supported principal types:
//
// * User
// * Group
// * Service account
Grantees []string `protobuf:"bytes,2,rep,name=grantees,proto3" json:"grantees,omitempty"`
// contains filtered or unexported fields
}Request message for the RemoveGrantees method.
func (*RemoveGranteesRequest) Descriptor
func (*RemoveGranteesRequest) Descriptor() ([]byte, []int)Deprecated: Use RemoveGranteesRequest.ProtoReflect.Descriptor instead.
func (*RemoveGranteesRequest) GetDataPolicy
func (x *RemoveGranteesRequest) GetDataPolicy() stringfunc (*RemoveGranteesRequest) GetGrantees
func (x *RemoveGranteesRequest) GetGrantees() []stringfunc (*RemoveGranteesRequest) ProtoMessage
func (*RemoveGranteesRequest) ProtoMessage()func (*RemoveGranteesRequest) ProtoReflect
func (x *RemoveGranteesRequest) ProtoReflect() protoreflect.Messagefunc (*RemoveGranteesRequest) Reset
func (x *RemoveGranteesRequest) Reset()func (*RemoveGranteesRequest) String
func (x *RemoveGranteesRequest) String() stringUnimplementedDataPolicyServiceServer
type UnimplementedDataPolicyServiceServer struct {
}UnimplementedDataPolicyServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedDataPolicyServiceServer) AddGrantees
func (UnimplementedDataPolicyServiceServer) AddGrantees(context.Context, *AddGranteesRequest) (*DataPolicy, error)func (UnimplementedDataPolicyServiceServer) CreateDataPolicy
func (UnimplementedDataPolicyServiceServer) CreateDataPolicy(context.Context, *CreateDataPolicyRequest) (*DataPolicy, error)func (UnimplementedDataPolicyServiceServer) DeleteDataPolicy
func (UnimplementedDataPolicyServiceServer) DeleteDataPolicy(context.Context, *DeleteDataPolicyRequest) (*emptypb.Empty, error)func (UnimplementedDataPolicyServiceServer) GetDataPolicy
func (UnimplementedDataPolicyServiceServer) GetDataPolicy(context.Context, *GetDataPolicyRequest) (*DataPolicy, error)func (UnimplementedDataPolicyServiceServer) GetIamPolicy
func (UnimplementedDataPolicyServiceServer) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest) (*iampb.Policy, error)func (UnimplementedDataPolicyServiceServer) ListDataPolicies
func (UnimplementedDataPolicyServiceServer) ListDataPolicies(context.Context, *ListDataPoliciesRequest) (*ListDataPoliciesResponse, error)func (UnimplementedDataPolicyServiceServer) RemoveGrantees
func (UnimplementedDataPolicyServiceServer) RemoveGrantees(context.Context, *RemoveGranteesRequest) (*DataPolicy, error)func (UnimplementedDataPolicyServiceServer) SetIamPolicy
func (UnimplementedDataPolicyServiceServer) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest) (*iampb.Policy, error)func (UnimplementedDataPolicyServiceServer) TestIamPermissions
func (UnimplementedDataPolicyServiceServer) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error)func (UnimplementedDataPolicyServiceServer) UpdateDataPolicy
func (UnimplementedDataPolicyServiceServer) UpdateDataPolicy(context.Context, *UpdateDataPolicyRequest) (*DataPolicy, error)UnsafeDataPolicyServiceServer
type UnsafeDataPolicyServiceServer interface {
// contains filtered or unexported methods
}UnsafeDataPolicyServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataPolicyServiceServer will result in compilation errors.
UpdateDataPolicyRequest
type UpdateDataPolicyRequest struct {
// Required. Update the data policy's metadata.
//
// The target data policy is determined by the `name` field.
// Other fields are updated to the specified values based on the field masks.
DataPolicy *DataPolicy `protobuf:"bytes,1,opt,name=data_policy,json=dataPolicy,proto3" json:"data_policy,omitempty"`
// Optional. The update mask applies to the resource. For the `FieldMask`
// definition, see
// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
// If not set, defaults to all of the fields that are allowed to update.
//
// Updates to the `name` and `dataPolicyId` fields are not allowed.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// Optional. If set to true, and the data policy is not found, a new data
// policy will be created. In this situation, update_mask is ignored.
AllowMissing bool `protobuf:"varint,3,opt,name=allow_missing,json=allowMissing,proto3" json:"allow_missing,omitempty"`
// contains filtered or unexported fields
}Request message for the UpdateDataPolicy method.
func (*UpdateDataPolicyRequest) Descriptor
func (*UpdateDataPolicyRequest) Descriptor() ([]byte, []int)Deprecated: Use UpdateDataPolicyRequest.ProtoReflect.Descriptor instead.
func (*UpdateDataPolicyRequest) GetAllowMissing
func (x *UpdateDataPolicyRequest) GetAllowMissing() boolfunc (*UpdateDataPolicyRequest) GetDataPolicy
func (x *UpdateDataPolicyRequest) GetDataPolicy() *DataPolicyfunc (*UpdateDataPolicyRequest) GetUpdateMask
func (x *UpdateDataPolicyRequest) GetUpdateMask() *fieldmaskpb.FieldMaskfunc (*UpdateDataPolicyRequest) ProtoMessage
func (*UpdateDataPolicyRequest) ProtoMessage()func (*UpdateDataPolicyRequest) ProtoReflect
func (x *UpdateDataPolicyRequest) ProtoReflect() protoreflect.Messagefunc (*UpdateDataPolicyRequest) Reset
func (x *UpdateDataPolicyRequest) Reset()func (*UpdateDataPolicyRequest) String
func (x *UpdateDataPolicyRequest) String() string