Reference documentation and code samples for the Google Cloud Security Command Center V2 Client class DataRetentionDeletionEvent.
Details about data retention deletion violations, in which the data is
non-compliant based on their retention or deletion time, as defined in the
applicable data security policy. The Data Retention Deletion (DRD) control is
a control of the DSPM (Data Security Posture Management) suite that enables
organizations to manage data retention and deletion policies in compliance
with regulations, such as GDPR and CRPA. DRD supports two primary policy
types: maximum storage length (max TTL) and minimum storage length (min TTL).
Both are aimed at helping organizations meet regulatory and data management
commitments.
Generated from protobuf message google.cloud.securitycenter.v2.DataRetentionDeletionEvent
Number of objects that violated the policy for this resource. If the number is less than 1,000, then the value of this field is the exact number. If the number of objects that violated the policy is greater than or equal to 1,000, then the value of this field is 1000.
Maximum duration of retention allowed from the DRD control. This comes from the DRD control where users set a max TTL for their data. For example, suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days. However, an object in that bucket is 100 days old. In this case, a DataRetentionDeletionEvent will be generated for that Cloud Storage bucket, and the max_retention_allowed is 90 days.
Number of objects that violated the policy for this resource. If the number
is less than 1,000, then the value of this field is the exact number. If
the number of objects that violated the policy is greater than or equal to
1,000, then the value of this field is 1000.
Returns
Type
Description
int|string
setDataObjectCount
Number of objects that violated the policy for this resource. If the number
is less than 1,000, then the value of this field is the exact number. If
the number of objects that violated the policy is greater than or equal to
1,000, then the value of this field is 1000.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getMaxRetentionAllowed
Maximum duration of retention allowed from the DRD control. This comes
from the DRD control where users set a max TTL for their data. For example,
suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.
However, an object in that bucket is 100 days old. In this case, a
DataRetentionDeletionEvent will be generated for that Cloud Storage bucket,
and the max_retention_allowed is 90 days.
Maximum duration of retention allowed from the DRD control. This comes
from the DRD control where users set a max TTL for their data. For example,
suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.
However, an object in that bucket is 100 days old. In this case, a
DataRetentionDeletionEvent will be generated for that Cloud Storage bucket,
and the max_retention_allowed is 90 days.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Security Command Center V2 Client - Class DataRetentionDeletionEvent (2.2.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.1 (latest)](/php/docs/reference/cloud-security-center/latest/V2.DataRetentionDeletionEvent)\n- [2.2.0](/php/docs/reference/cloud-security-center/2.2.0/V2.DataRetentionDeletionEvent)\n- [2.1.1](/php/docs/reference/cloud-security-center/2.1.1/V2.DataRetentionDeletionEvent)\n- [2.0.4](/php/docs/reference/cloud-security-center/2.0.4/V2.DataRetentionDeletionEvent)\n- [1.32.0](/php/docs/reference/cloud-security-center/1.32.0/V2.DataRetentionDeletionEvent)\n- [1.31.0](/php/docs/reference/cloud-security-center/1.31.0/V2.DataRetentionDeletionEvent)\n- [1.30.0](/php/docs/reference/cloud-security-center/1.30.0/V2.DataRetentionDeletionEvent)\n- [1.29.0](/php/docs/reference/cloud-security-center/1.29.0/V2.DataRetentionDeletionEvent)\n- [1.28.2](/php/docs/reference/cloud-security-center/1.28.2/V2.DataRetentionDeletionEvent)\n- [1.21.0](/php/docs/reference/cloud-security-center/1.21.0/V2.DataRetentionDeletionEvent)\n- [1.20.2](/php/docs/reference/cloud-security-center/1.20.2/V2.DataRetentionDeletionEvent)\n- [1.19.1](/php/docs/reference/cloud-security-center/1.19.1/V2.DataRetentionDeletionEvent)\n- [1.18.0](/php/docs/reference/cloud-security-center/1.18.0/V2.DataRetentionDeletionEvent)\n- [1.17.0](/php/docs/reference/cloud-security-center/1.17.0/V2.DataRetentionDeletionEvent)\n- [1.16.0](/php/docs/reference/cloud-security-center/1.16.0/V2.DataRetentionDeletionEvent)\n- [1.15.1](/php/docs/reference/cloud-security-center/1.15.1/V2.DataRetentionDeletionEvent)\n- [1.14.2](/php/docs/reference/cloud-security-center/1.14.2/V2.DataRetentionDeletionEvent)\n- [1.13.1](/php/docs/reference/cloud-security-center/1.13.1/V2.DataRetentionDeletionEvent) \nReference documentation and code samples for the Google Cloud Security Command Center V2 Client class DataRetentionDeletionEvent.\n\nDetails about data retention deletion violations, in which the data is\nnon-compliant based on their retention or deletion time, as defined in the\napplicable data security policy. The Data Retention Deletion (DRD) control is\na control of the DSPM (Data Security Posture Management) suite that enables\norganizations to manage data retention and deletion policies in compliance\nwith regulations, such as GDPR and CRPA. DRD supports two primary policy\ntypes: maximum storage length (max TTL) and minimum storage length (min TTL).\n\nBoth are aimed at helping organizations meet regulatory and data management\ncommitments.\n\nGenerated from protobuf message `google.cloud.securitycenter.v2.DataRetentionDeletionEvent`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ SecurityCenter \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getEventDetectionTime\n\nTimestamp indicating when the event was detected.\n\n### hasEventDetectionTime\n\n### clearEventDetectionTime\n\n### setEventDetectionTime\n\nTimestamp indicating when the event was detected.\n\n### getDataObjectCount\n\nNumber of objects that violated the policy for this resource. If the number\nis less than 1,000, then the value of this field is the exact number. If\nthe number of objects that violated the policy is greater than or equal to\n1,000, then the value of this field is 1000.\n\n### setDataObjectCount\n\nNumber of objects that violated the policy for this resource. If the number\nis less than 1,000, then the value of this field is the exact number. If\nthe number of objects that violated the policy is greater than or equal to\n1,000, then the value of this field is 1000.\n\n### getMaxRetentionAllowed\n\nMaximum duration of retention allowed from the DRD control. This comes\nfrom the DRD control where users set a max TTL for their data. For example,\nsuppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.\n\nHowever, an object in that bucket is 100 days old. In this case, a\nDataRetentionDeletionEvent will be generated for that Cloud Storage bucket,\nand the max_retention_allowed is 90 days.\n\n### hasMaxRetentionAllowed\n\n### clearMaxRetentionAllowed\n\n### setMaxRetentionAllowed\n\nMaximum duration of retention allowed from the DRD control. This comes\nfrom the DRD control where users set a max TTL for their data. For example,\nsuppose that a user sets the max TTL for a Cloud Storage bucket to 90 days.\n\nHowever, an object in that bucket is 100 days old. In this case, a\nDataRetentionDeletionEvent will be generated for that Cloud Storage bucket,\nand the max_retention_allowed is 90 days.\n\n### getEventType\n\nType of the DRD event.\n\n### setEventType\n\nType of the DRD event."]]