Skip to content

Commit 4db166d

Browse files
authored
fix(logs): remove invalid data protection data identifier (#27388)
### Notes `DataIdentifier.PHONENUMBER` is not a valid identifier (this can be verified in AWS Console), this should be removed to avoid confusion. Adding this identifier will cause `An error occurred (InvalidParameterException) when calling the PutDataProtectionPolicy operation: arn:aws:dataprotection::aws:data-identifier/PhoneNumber is not a valid Data Identifier`. Note: I am an SDE on CloudWatch Logs, this was brought up by a user, please message kvcg@ internally for questions regarding this PR. ### Testing Unit tests passing in `aws-logs/test/loggroup.test.ts`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 8b20c11 commit 4db166d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

allowed-breaking-changes.txt

+3
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,6 @@ base-types:aws-cdk-lib.aws_autoscaling.CronOptions
226226
removed:aws-cdk-lib.aws_autoscaling.CronOptions.timeZone
227227
removed:aws-cdk-lib.aws_autoscaling.CronOptions.year
228228
removed:aws-cdk-lib.aws_backup.BackupPlanRuleProps.schedule
229+
230+
# This data identifer was added by mistake; it had never worked.
231+
removed:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER

packages/aws-cdk-lib/aws-logs/lib/data-protection-policy.ts

-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ export class DataIdentifier {
253253
public static readonly PERMANENTRESIDENCENUMBER_CA = new DataIdentifier('PermanentResidenceNumber-CA');
254254
public static readonly PERSONALHEALTHNUMBER_CA = new DataIdentifier('PersonalHealthNumber-CA');
255255
public static readonly PGPPRIVATEKEY = new DataIdentifier('PgpPrivateKey');
256-
public static readonly PHONENUMBER = new DataIdentifier('PhoneNumber');
257256
public static readonly PHONENUMBER_BR = new DataIdentifier('PhoneNumber-BR');
258257
public static readonly PHONENUMBER_DE = new DataIdentifier('PhoneNumber-DE');
259258
public static readonly PHONENUMBER_ES = new DataIdentifier('PhoneNumber-ES');

packages/aws-cdk-lib/awslint.json

-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@
687687
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PERMANENTRESIDENCENUMBER_CA",
688688
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PERSONALHEALTHNUMBER_CA",
689689
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PGPPRIVATEKEY",
690-
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER",
691690
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER_BR",
692691
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER_DE",
693692
"docs-public-apis:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER_ES",

0 commit comments

Comments
 (0)