aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 2.07 kB
JavaScript
var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResultWriter=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},core_1=()=>{var tmp=require("../../../../core");return core_1=()=>tmp,tmp},fields_1=()=>{var tmp=require("../../fields");return fields_1=()=>tmp,tmp},types_1=()=>{var tmp=require("../../types");return types_1=()=>tmp,tmp};class ResultWriter{constructor(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_ResultWriterProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ResultWriter),error}this.bucket=props.bucket,this.prefix=props.prefix}render(queryLanguage){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_QueryLanguage(queryLanguage)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.render),error}const resource=core_1().Arn.format({region:"",account:"",partition:core_1().Aws.PARTITION,service:"states",resource:"s3",resourceName:"putObject",arnFormat:core_1().ArnFormat.COLON_RESOURCE_NAME}),argumentOrParameter={Bucket:this.bucket.bucketName,...this.prefix&&{Prefix:this.prefix}};return fields_1().FieldUtils.renderObject({Resource:resource,...queryLanguage===types_1().QueryLanguage.JSONATA?{Arguments:argumentOrParameter}:{Parameters:argumentOrParameter}})}providePolicyStatements(){const resource=core_1().Arn.format({region:"",account:"",partition:core_1().Aws.PARTITION,service:"s3",resource:this.bucket.bucketName,resourceName:"*"});return[new(iam()).PolicyStatement({actions:["s3:PutObject","s3:GetObject","s3:ListMultipartUploadParts","s3:AbortMultipartUpload"],resources:[resource]})]}}exports.ResultWriter=ResultWriter,_a=JSII_RTTI_SYMBOL_1,ResultWriter[_a]={fqn:"aws-cdk-lib.aws_stepfunctions.ResultWriter",version:"2.185.0"};
;