"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.DynamoPutItem=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),utils_1=require("./private/utils"),iam=require("../../../aws-iam"),sfn=require("../../../aws-stepfunctions"),core_1=require("../../../core");class DynamoPutItem extends sfn.TaskStateBase{constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_stepfunctions_tasks_DynamoPutItemProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,DynamoPutItem),error}this.taskPolicies=[new iam.PolicyStatement({resources:[core_1.Stack.of(this).formatArn({service:"dynamodb",resource:"table",resourceName:props.table.tableName})],actions:[`dynamodb:${utils_1.DynamoMethod.PUT}Item`]})]}_renderTask(){return{Resource:(0,utils_1.getDynamoResourceArn)(utils_1.DynamoMethod.PUT),Parameters:sfn.FieldUtils.renderObject({Item:(0,utils_1.transformAttributeValueMap)(this.props.item),TableName:this.props.table.tableName,ConditionExpression:this.props.conditionExpression,ExpressionAttributeNames:this.props.expressionAttributeNames,ExpressionAttributeValues:(0,utils_1.transformAttributeValueMap)(this.props.expressionAttributeValues),ReturnConsumedCapacity:this.props.returnConsumedCapacity,ReturnItemCollectionMetrics:this.props.returnItemCollectionMetrics,ReturnValues:this.props.returnValues})}}}exports.DynamoPutItem=DynamoPutItem,_a=JSII_RTTI_SYMBOL_1,DynamoPutItem[_a]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.DynamoPutItem",version:"2.96.1"};
