"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.AthenaGetQueryResults=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),iam=require("../../../aws-iam"),sfn=require("../../../aws-stepfunctions"),task_utils_1=require("../private/task-utils");class AthenaGetQueryResults extends sfn.TaskStateBase{constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_stepfunctions_tasks_AthenaGetQueryResultsProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AthenaGetQueryResults),error}this.integrationPattern=props.integrationPattern??sfn.IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1.validatePatternSupported)(this.integrationPattern,AthenaGetQueryResults.SUPPORTED_INTEGRATION_PATTERNS);const policyStatements=[new iam.PolicyStatement({resources:["*"],actions:["athena:getQueryResults"]})];policyStatements.push(new iam.PolicyStatement({actions:["s3:GetObject"],resources:["*"]})),this.taskPolicies=policyStatements}_renderTask(){return{Resource:(0,task_utils_1.integrationResourceArn)("athena","getQueryResults",this.integrationPattern),Parameters:sfn.FieldUtils.renderObject({QueryExecutionId:this.props.queryExecutionId,NextToken:this.props.nextToken,MaxResults:this.props.maxResults})}}}exports.AthenaGetQueryResults=AthenaGetQueryResults,_a=JSII_RTTI_SYMBOL_1,AthenaGetQueryResults[_a]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.AthenaGetQueryResults",version:"2.96.1"},AthenaGetQueryResults.SUPPORTED_INTEGRATION_PATTERNS=[sfn.IntegrationPattern.REQUEST_RESPONSE];
