From e3068bc47b813570062ccae12f07a60898ac77a4 Mon Sep 17 00:00:00 2001 From: Kevin Luu Date: Thu, 9 May 2024 23:44:00 +0000 Subject: [PATCH] telemetry(IamPolicyChecks): create policy checks metrics --- telemetry/definitions/commonDefinitions.json | 100 +++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/telemetry/definitions/commonDefinitions.json b/telemetry/definitions/commonDefinitions.json index 4a939590a..0286f7d7e 100644 --- a/telemetry/definitions/commonDefinitions.json +++ b/telemetry/definitions/commonDefinitions.json @@ -1,5 +1,52 @@ { "types": [ + { + "name": "accessanalyzerCfnParameterFileUsed", + "type": "boolean", + "description": "Boolean value of whether or not a Cfn parameter file is provided." + }, + { + "name": "accessanalyzerDocumentType", + "type": "string", + "allowedValues": [ + "CloudFormation", + "Terraform Plan", + "JSON Policy Language" + ], + "description": "Document type of the edited file in IAM Policy Checks" + }, + { + "name": "accessanalyzerInputPolicyType", + "type": "string", + "allowedValues": [ + "Identity", + "Resource" + ], + "description": "User inputted policy type of the edited file. Applicable to only JSON Policy Language." + }, + { + "name": "accessanalyzerCheckType", + "type": "string", + "allowedValues": [ + "CheckNoNewAccess", + "CheckAccessNotGranted" + ], + "description": "User inputted check type to denote which custom check to run." + }, + { + "name": "accessanalyzerReferencePolicyType", + "type": "string", + "allowedValues": [ + "Identity", + "Resource" + ], + "description": "User inputted policy type of the reference file. Applicable to only CheckNoNewAccess check type." + }, + { + "name": "accessanalyzerFindingsCount", + "type": "int", + "description": "Number of findings discovered after execution" + }, { "name": "amazonqCodeGenerationResult", "type": "string", @@ -1324,6 +1371,59 @@ } ], "metrics": [ + { + "name": "accessanalyzer_iamPolicyChecksCustomChecks", + "description": "Execution of Custom Policy Checks in IAM Policy Checks", + "metadata": [ + { + "type": "accessanalyzerCfnParameterFileUsed" + }, + { + "type": "accessanalyzerCheckType" + }, + { + "type": "accessanalyzerDocumentType" + }, + { + "type": "accessanalyzerFindingsCount" + }, + { + "type": "accessanalyzerInputPolicyType" + }, + { + "type": "accessanalyzerReferencePolicyType" + }, + { + "type": "result" + } + ] + }, + { + "name": "accessanalyzer_iamPolicyChecksError", + "type": "string", + "description": "Errors related to IamPolicyChecks" + }, + { + "name": "accessanalyzer_iamPolicyChecksValidatePolicy", + "description": "Execution of Validate Policy in IAM Policy Checks", + "metadata": [ + { + "type": "accessanalyzerCfnParameterFileUsed" + }, + { + "type": "accessanalyzerDocumentType" + }, + { + "type": "accessanalyzerFindingsCount" + }, + { + "type": "accessanalyzerPolicyType" + }, + { + "type": "result" + } + ] + }, { "name": "amazonq_approachInvoke", "description": "Captures Approach generation process",