"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StepFunctionsInvokeActivity=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},customer_managed_key_encryption_configuration_1=()=>{var tmp=require("../../../aws-stepfunctions/lib/customer-managed-key-encryption-configuration");return customer_managed_key_encryption_configuration_1=()=>tmp,tmp};class StepFunctionsInvokeActivity extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.StepFunctionsInvokeActivity",version:"2.256.1"};static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_StepFunctionsInvokeActivityJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new StepFunctionsInvokeActivity(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_StepFunctionsInvokeActivityJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new StepFunctionsInvokeActivity(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}taskMetrics;taskPolicies;constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_StepFunctionsInvokeActivityProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,StepFunctionsInvokeActivity),error}this.props.activity.encryptionConfiguration instanceof customer_managed_key_encryption_configuration_1().CustomerManagedEncryptionConfiguration&&(this.taskPolicies=this.createPolicyStatements(this.props.activity.encryptionConfiguration.kmsKey)),this.taskMetrics={metricDimensions:{ActivityArn:this.props.activity.activityArn},metricPrefixSingular:"Activity",metricPrefixPlural:"Activities"}}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage),paramOrArgProps=this.props.parameters??this.props.arguments,paramOrArg=paramOrArgProps?this._renderParametersOrArguments(paramOrArgProps,queryLanguage):void 0;return{Resource:this.props.activity.activityArn,...paramOrArg}}createPolicyStatements(kmskey){return[new(iam()).PolicyStatement({actions:["kms:Decrypt","kms:GenerateDataKey"],resources:[kmskey.keyRef.keyArn],conditions:{StringEquals:{"kms:EncryptionContext:aws:states:activityArn":this.props.activity.activityArn}}})]}}exports.StepFunctionsInvokeActivity=StepFunctionsInvokeActivity;
