curl --request PATCH \
--url https://api.example.com/v1/policies/{policy} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"inheritFromParent": true,
"type": "POLICY_TYPE_UNSPECIFIED",
"rolloutPolicy": {
"automatic": true,
"roles": [
"<string>"
]
},
"maskingRulePolicy": {
"rules": [
{
"id": "<string>",
"condition": {
"id": "<string>",
"constExpr": {
"nullValue": "NULL_VALUE",
"boolValue": true,
"int64Value": "<string>",
"uint64Value": "<string>",
"doubleValue": 123,
"stringValue": "<string>",
"bytesValue": "<string>",
"durationValue": "<string>",
"timestampValue": "2023-11-07T05:31:56Z"
},
"identExpr": {
"name": "<string>"
},
"selectExpr": {
"operand": "<unknown>",
"field": "<string>",
"testOnly": true
},
"callExpr": {
"target": "<unknown>",
"function": "<string>",
"args": "<array>"
},
"listExpr": {
"elements": "<array>",
"optionalIndices": [
123
]
},
"structExpr": {
"messageName": "<string>",
"entries": [
{
"id": "<string>",
"fieldKey": "<string>",
"mapKey": "<unknown>",
"value": "<unknown>",
"optionalEntry": true
}
]
},
"comprehensionExpr": {
"iterVar": "<string>",
"iterVar2": "<string>",
"iterRange": "<unknown>",
"accuVar": "<string>",
"accuInit": "<unknown>",
"loopCondition": "<unknown>",
"loopStep": "<unknown>",
"result": "<unknown>"
}
},
"semanticType": "<string>"
}
]
},
"maskingExemptionPolicy": {
"exemptions": [
{
"members": [
"<string>"
],
"condition": {
"id": "<string>",
"constExpr": {
"nullValue": "NULL_VALUE",
"boolValue": true,
"int64Value": "<string>",
"uint64Value": "<string>",
"doubleValue": 123,
"stringValue": "<string>",
"bytesValue": "<string>",
"durationValue": "<string>",
"timestampValue": "2023-11-07T05:31:56Z"
},
"identExpr": {
"name": "<string>"
},
"selectExpr": {
"operand": "<unknown>",
"field": "<string>",
"testOnly": true
},
"callExpr": {
"target": "<unknown>",
"function": "<string>",
"args": "<array>"
},
"listExpr": {
"elements": "<array>",
"optionalIndices": [
123
]
},
"structExpr": {
"messageName": "<string>",
"entries": [
{
"id": "<string>",
"fieldKey": "<string>",
"mapKey": "<unknown>",
"value": "<unknown>",
"optionalEntry": true
}
]
},
"comprehensionExpr": {
"iterVar": "<string>",
"iterVar2": "<string>",
"iterRange": "<unknown>",
"accuVar": "<string>",
"accuInit": "<unknown>",
"loopCondition": "<unknown>",
"loopStep": "<unknown>",
"result": "<unknown>"
}
}
}
]
},
"tagPolicy": {
"tags": {}
},
"dataSourceQueryPolicy": {
"adminDataSourceRestriction": "RESTRICTION_UNSPECIFIED",
"disallowDdl": true,
"disallowDml": true
},
"queryDataPolicy": {
"timeout": "<string>",
"disableExport": true,
"maximumResultSize": "<string>",
"maximumResultRows": 123,
"disableCopyData": true
},
"enforce": true
}
'{
"name": "<string>",
"inheritFromParent": true,
"type": "POLICY_TYPE_UNSPECIFIED",
"rolloutPolicy": {
"automatic": true,
"roles": [
"<string>"
]
},
"maskingRulePolicy": {
"rules": [
{
"id": "<string>",
"condition": {
"id": "<string>",
"constExpr": {
"nullValue": "NULL_VALUE",
"boolValue": true,
"int64Value": "<string>",
"uint64Value": "<string>",
"doubleValue": 123,
"stringValue": "<string>",
"bytesValue": "<string>",
"durationValue": "<string>",
"timestampValue": "2023-11-07T05:31:56Z"
},
"identExpr": {
"name": "<string>"
},
"selectExpr": {
"operand": "<unknown>",
"field": "<string>",
"testOnly": true
},
"callExpr": {
"target": "<unknown>",
"function": "<string>",
"args": "<array>"
},
"listExpr": {
"elements": "<array>",
"optionalIndices": [
123
]
},
"structExpr": {
"messageName": "<string>",
"entries": [
{
"id": "<string>",
"fieldKey": "<string>",
"mapKey": "<unknown>",
"value": "<unknown>",
"optionalEntry": true
}
]
},
"comprehensionExpr": {
"iterVar": "<string>",
"iterVar2": "<string>",
"iterRange": "<unknown>",
"accuVar": "<string>",
"accuInit": "<unknown>",
"loopCondition": "<unknown>",
"loopStep": "<unknown>",
"result": "<unknown>"
}
},
"semanticType": "<string>"
}
]
},
"maskingExemptionPolicy": {
"exemptions": [
{
"members": [
"<string>"
],
"condition": {
"id": "<string>",
"constExpr": {
"nullValue": "NULL_VALUE",
"boolValue": true,
"int64Value": "<string>",
"uint64Value": "<string>",
"doubleValue": 123,
"stringValue": "<string>",
"bytesValue": "<string>",
"durationValue": "<string>",
"timestampValue": "2023-11-07T05:31:56Z"
},
"identExpr": {
"name": "<string>"
},
"selectExpr": {
"operand": "<unknown>",
"field": "<string>",
"testOnly": true
},
"callExpr": {
"target": "<unknown>",
"function": "<string>",
"args": "<array>"
},
"listExpr": {
"elements": "<array>",
"optionalIndices": [
123
]
},
"structExpr": {
"messageName": "<string>",
"entries": [
{
"id": "<string>",
"fieldKey": "<string>",
"mapKey": "<unknown>",
"value": "<unknown>",
"optionalEntry": true
}
]
},
"comprehensionExpr": {
"iterVar": "<string>",
"iterVar2": "<string>",
"iterRange": "<unknown>",
"accuVar": "<string>",
"accuInit": "<unknown>",
"loopCondition": "<unknown>",
"loopStep": "<unknown>",
"result": "<unknown>"
}
}
}
]
},
"tagPolicy": {
"tags": {}
},
"dataSourceQueryPolicy": {
"adminDataSourceRestriction": "RESTRICTION_UNSPECIFIED",
"disallowDdl": true,
"disallowDml": true
},
"queryDataPolicy": {
"timeout": "<string>",
"disableExport": true,
"maximumResultSize": "<string>",
"maximumResultRows": 123,
"disableCopyData": true
},
"enforce": true,
"resourceType": "RESOURCE_TYPE_UNSPECIFIED"
}Updates an existing organizational policy. Permissions required: bb.policies.update
curl --request PATCH \
--url https://api.example.com/v1/policies/{policy} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"inheritFromParent": true,
"type": "POLICY_TYPE_UNSPECIFIED",
"rolloutPolicy": {
"automatic": true,
"roles": [
"<string>"
]
},
"maskingRulePolicy": {
"rules": [
{
"id": "<string>",
"condition": {
"id": "<string>",
"constExpr": {
"nullValue": "NULL_VALUE",
"boolValue": true,
"int64Value": "<string>",
"uint64Value": "<string>",
"doubleValue": 123,
"stringValue": "<string>",
"bytesValue": "<string>",
"durationValue": "<string>",
"timestampValue": "2023-11-07T05:31:56Z"
},
"identExpr": {
"name": "<string>"
},
"selectExpr": {
"operand": "<unknown>",
"field": "<string>",
"testOnly": true
},
"callExpr": {
"target": "<unknown>",
"function": "<string>",
"args": "<array>"
},
"listExpr": {
"elements": "<array>",
"optionalIndices": [
123
]
},
"structExpr": {
"messageName": "<string>",
"entries": [
{
"id": "<string>",
"fieldKey": "<string>",
"mapKey": "<unknown>",
"value": "<unknown>",
"optionalEntry": true
}
]
},
"comprehensionExpr": {
"iterVar": "<string>",
"iterVar2": "<string>",
"iterRange": "<unknown>",
"accuVar": "<string>",
"accuInit": "<unknown>",
"loopCondition": "<unknown>",
"loopStep": "<unknown>",
"result": "<unknown>"
}
},
"semanticType": "<string>"
}
]
},
"maskingExemptionPolicy": {
"exemptions": [
{
"members": [
"<string>"
],
"condition": {
"id": "<string>",
"constExpr": {
"nullValue": "NULL_VALUE",
"boolValue": true,
"int64Value": "<string>",
"uint64Value": "<string>",
"doubleValue": 123,
"stringValue": "<string>",
"bytesValue": "<string>",
"durationValue": "<string>",
"timestampValue": "2023-11-07T05:31:56Z"
},
"identExpr": {
"name": "<string>"
},
"selectExpr": {
"operand": "<unknown>",
"field": "<string>",
"testOnly": true
},
"callExpr": {
"target": "<unknown>",
"function": "<string>",
"args": "<array>"
},
"listExpr": {
"elements": "<array>",
"optionalIndices": [
123
]
},
"structExpr": {
"messageName": "<string>",
"entries": [
{
"id": "<string>",
"fieldKey": "<string>",
"mapKey": "<unknown>",
"value": "<unknown>",
"optionalEntry": true
}
]
},
"comprehensionExpr": {
"iterVar": "<string>",
"iterVar2": "<string>",
"iterRange": "<unknown>",
"accuVar": "<string>",
"accuInit": "<unknown>",
"loopCondition": "<unknown>",
"loopStep": "<unknown>",
"result": "<unknown>"
}
}
}
]
},
"tagPolicy": {
"tags": {}
},
"dataSourceQueryPolicy": {
"adminDataSourceRestriction": "RESTRICTION_UNSPECIFIED",
"disallowDdl": true,
"disallowDml": true
},
"queryDataPolicy": {
"timeout": "<string>",
"disableExport": true,
"maximumResultSize": "<string>",
"maximumResultRows": 123,
"disableCopyData": true
},
"enforce": true
}
'{
"name": "<string>",
"inheritFromParent": true,
"type": "POLICY_TYPE_UNSPECIFIED",
"rolloutPolicy": {
"automatic": true,
"roles": [
"<string>"
]
},
"maskingRulePolicy": {
"rules": [
{
"id": "<string>",
"condition": {
"id": "<string>",
"constExpr": {
"nullValue": "NULL_VALUE",
"boolValue": true,
"int64Value": "<string>",
"uint64Value": "<string>",
"doubleValue": 123,
"stringValue": "<string>",
"bytesValue": "<string>",
"durationValue": "<string>",
"timestampValue": "2023-11-07T05:31:56Z"
},
"identExpr": {
"name": "<string>"
},
"selectExpr": {
"operand": "<unknown>",
"field": "<string>",
"testOnly": true
},
"callExpr": {
"target": "<unknown>",
"function": "<string>",
"args": "<array>"
},
"listExpr": {
"elements": "<array>",
"optionalIndices": [
123
]
},
"structExpr": {
"messageName": "<string>",
"entries": [
{
"id": "<string>",
"fieldKey": "<string>",
"mapKey": "<unknown>",
"value": "<unknown>",
"optionalEntry": true
}
]
},
"comprehensionExpr": {
"iterVar": "<string>",
"iterVar2": "<string>",
"iterRange": "<unknown>",
"accuVar": "<string>",
"accuInit": "<unknown>",
"loopCondition": "<unknown>",
"loopStep": "<unknown>",
"result": "<unknown>"
}
},
"semanticType": "<string>"
}
]
},
"maskingExemptionPolicy": {
"exemptions": [
{
"members": [
"<string>"
],
"condition": {
"id": "<string>",
"constExpr": {
"nullValue": "NULL_VALUE",
"boolValue": true,
"int64Value": "<string>",
"uint64Value": "<string>",
"doubleValue": 123,
"stringValue": "<string>",
"bytesValue": "<string>",
"durationValue": "<string>",
"timestampValue": "2023-11-07T05:31:56Z"
},
"identExpr": {
"name": "<string>"
},
"selectExpr": {
"operand": "<unknown>",
"field": "<string>",
"testOnly": true
},
"callExpr": {
"target": "<unknown>",
"function": "<string>",
"args": "<array>"
},
"listExpr": {
"elements": "<array>",
"optionalIndices": [
123
]
},
"structExpr": {
"messageName": "<string>",
"entries": [
{
"id": "<string>",
"fieldKey": "<string>",
"mapKey": "<unknown>",
"value": "<unknown>",
"optionalEntry": true
}
]
},
"comprehensionExpr": {
"iterVar": "<string>",
"iterVar2": "<string>",
"iterRange": "<unknown>",
"accuVar": "<string>",
"accuInit": "<unknown>",
"loopCondition": "<unknown>",
"loopStep": "<unknown>",
"result": "<unknown>"
}
}
}
]
},
"tagPolicy": {
"tags": {}
},
"dataSourceQueryPolicy": {
"adminDataSourceRestriction": "RESTRICTION_UNSPECIFIED",
"disallowDdl": true,
"disallowDml": true
},
"queryDataPolicy": {
"timeout": "<string>",
"disableExport": true,
"maximumResultSize": "<string>",
"maximumResultRows": 123,
"disableCopyData": true
},
"enforce": true,
"resourceType": "RESOURCE_TYPE_UNSPECIFIED"
}The policy id.
The list of fields to update.
If set to true, and the policy is not found, a new policy will be created.
In this situation, update_mask is ignored.
The name of the policy. Format: {resource name}/policies/{policy type} Workspace resource name: "". Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name.
Whether this policy inherits from its parent resource.
The type of policy.
POLICY_TYPE_UNSPECIFIED, MASKING_RULE, MASKING_EXEMPTION, ROLLOUT_POLICY, TAG, DATA_SOURCE_QUERY, DATA_QUERY Rollout policy configuration.
Show child attributes
Policy for configuring data masking rules.
Show child attributes
MaskingExemptionPolicy is the allowlist of users who can access sensitive data.
Show child attributes
Policy for tagging resources with metadata.
Show child attributes
Policy for controlling which data sources can be queried in the SQL editor.
Show child attributes
QueryDataPolicy is the policy configuration for querying data.
Show child attributes
Whether the policy is enforced.
OK
The name of the policy. Format: {resource name}/policies/{policy type} Workspace resource name: "". Environment resource name: environments/environment-id. Instance resource name: instances/instance-id. Database resource name: instances/instance-id/databases/database-name.
Whether this policy inherits from its parent resource.
The type of policy.
POLICY_TYPE_UNSPECIFIED, MASKING_RULE, MASKING_EXEMPTION, ROLLOUT_POLICY, TAG, DATA_SOURCE_QUERY, DATA_QUERY Rollout policy configuration.
Show child attributes
Policy for configuring data masking rules.
Show child attributes
MaskingExemptionPolicy is the allowlist of users who can access sensitive data.
Show child attributes
Policy for tagging resources with metadata.
Show child attributes
Policy for controlling which data sources can be queried in the SQL editor.
Show child attributes
QueryDataPolicy is the policy configuration for querying data.
Show child attributes
Whether the policy is enforced.
The resource type for the policy.
RESOURCE_TYPE_UNSPECIFIED, WORKSPACE, ENVIRONMENT, PROJECT Was this page helpful?