UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 3.01 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpMethods=exports.EksCall=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EksCall extends sfn().TaskStateBase{static jsonPath(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EksCallJsonPathProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonPath),error}return new EksCall(scope,id,props)}static jsonata(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EksCallJsonataProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.jsonata),error}return new EksCall(scope,id,{...props,queryLanguage:sfn().QueryLanguage.JSONATA})}constructor(scope,id,props){super(scope,id,props),this.props=props;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_tasks_EksCallProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EksCall),error}this.integrationPattern=props.integrationPattern??sfn().IntegrationPattern.REQUEST_RESPONSE,(0,task_utils_1().validatePatternSupported)(this.integrationPattern,EksCall.SUPPORTED_INTEGRATION_PATTERNS);try{this.clusterEndpoint=this.props.cluster.clusterEndpoint}catch{throw new Error('The "clusterEndpoint" property must be specified when using an imported Cluster.')}try{this.clusterCertificateAuthorityData=this.props.cluster.clusterCertificateAuthorityData}catch{throw new Error('The "clusterCertificateAuthorityData" property must be specified when using an imported Cluster.')}}_renderTask(topLevelQueryLanguage){const queryLanguage=sfn()._getActualQueryLanguage(topLevelQueryLanguage,this.props.queryLanguage);return{Resource:(0,task_utils_1().integrationResourceArn)("eks","call",this.integrationPattern),...this._renderParametersOrArguments({ClusterName:this.props.cluster.clusterName,CertificateAuthority:this.clusterCertificateAuthorityData,Endpoint:this.clusterEndpoint,Method:this.props.httpMethod,Path:this.props.httpPath,QueryParameters:this.props.queryParameters,RequestBody:this.props.requestBody?.value},queryLanguage)}}}exports.EksCall=EksCall,_a=JSII_RTTI_SYMBOL_1,EksCall[_a]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EksCall",version:"2.185.0"},EksCall.SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE];var HttpMethods;(function(HttpMethods2){HttpMethods2.GET="GET",HttpMethods2.POST="POST",HttpMethods2.PUT="PUT",HttpMethods2.DELETE="DELETE",HttpMethods2.PATCH="PATCH",HttpMethods2.HEAD="HEAD"})(HttpMethods||(exports.HttpMethods=HttpMethods={}));