UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 4.5 kB
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__setModuleDefault=exports&&exports.__setModuleDefault||(Object.create?(function(o,v){Object.defineProperty(o,"default",{enumerable:!0,value:v})}):function(o,v){o.default=v}),__importStar=exports&&exports.__importStar||(function(){var ownKeys=function(o){return ownKeys=Object.getOwnPropertyNames||function(o2){var ar=[];for(var k in o2)Object.prototype.hasOwnProperty.call(o2,k)&&(ar[ar.length]=k);return ar},ownKeys(o)};return function(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k=ownKeys(mod),i=0;i<k.length;i++)k[i]!=="default"&&__createBinding(result,mod,k[i]);return __setModuleDefault(result,mod),result}})();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=__importStar(require("../../../aws-stepfunctions"));return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},task_utils_1=()=>{var tmp=require("../private/task-utils");return task_utils_1=()=>tmp,tmp};class EksCall extends sfn().TaskStateBase{props;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_stepfunctions_tasks.EksCall",version:"2.260.0"};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})}static SUPPORTED_INTEGRATION_PATTERNS=[sfn().IntegrationPattern.REQUEST_RESPONSE];taskMetrics;taskPolicies;integrationPattern;clusterEndpoint;clusterCertificateAuthorityData;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(core_1()).ValidationError((0,literal_string_1().lit)`MustBeClusterendpointPropertySpecified`,'The "clusterEndpoint" property must be specified when using an imported Cluster.',this)}try{this.clusterCertificateAuthorityData=this.props.cluster.clusterCertificateAuthorityData}catch{throw new(core_1()).ValidationError((0,literal_string_1().lit)`ClusterCertificateAuthorityDataProperty`,'The "clusterCertificateAuthorityData" property must be specified when using an imported Cluster.',this)}}_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;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={}));