From aa6a8775a2ec0138d2119956e5bae83ec6e273c7 Mon Sep 17 00:00:00 2001 From: Timo Schilling Date: Fri, 10 Jan 2020 22:33:12 +0100 Subject: [PATCH] feat(policy-templates): add Textract policies --- .../all_policy_templates.yaml | 6 ++ .../policy_templates.json | 55 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/examples/2016-10-31/policy_templates/all_policy_templates.yaml b/examples/2016-10-31/policy_templates/all_policy_templates.yaml index a3b6698ee..ced335d42 100644 --- a/examples/2016-10-31/policy_templates/all_policy_templates.yaml +++ b/examples/2016-10-31/policy_templates/all_policy_templates.yaml @@ -101,3 +101,9 @@ Resources: - CodeCommitReadPolicy: RepositoryName: name + + - TextractPolicy: {} + + - TextractDetectAnalyzePolicy: {} + + - TextractGetResultPolicy: {} diff --git a/samtranslator/policy_templates_data/policy_templates.json b/samtranslator/policy_templates_data/policy_templates.json index a253a8073..95e9f66a1 100644 --- a/samtranslator/policy_templates_data/policy_templates.json +++ b/samtranslator/policy_templates_data/policy_templates.json @@ -1849,6 +1849,61 @@ } ] } + }, + "TextractPolicy": { + "Description": "Gives full access to Textract", + "Parameters": { + + }, + "Definition": { + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "textract:*" + ], + "Resource": "*" + } + ] + } + }, + "TextractDetectAnalyzePolicy": { + "Description": "Gives access to detect and analyze documents with Textract", + "Parameters": { + + }, + "Definition": { + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "textract:DetectDocumentText", + "textract:StartDocumentTextDetection", + "textract:StartDocumentAnalysis", + "textract:AnalyzeDocument" + ], + "Resource": "*" + } + ] + } + }, + "TextractGetResultPolicy": { + "Description": "Gives access to get detected and analyzed documents from Textract", + "Parameters": { + + }, + "Definition": { + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "textract:GetDocumentTextDetection", + "textract:GetDocumentAnalysis" + ], + "Resource": "*" + } + ] + } } } }