EksCallProps Struct
Properties for calling a EKS endpoint with EksCall.
| Source | aws-stepfunctions-tasks/lib/eks/call.ts |
|---|
Example
import * as eks from 'aws-cdk-lib/aws-eks';
import { KubectlV37Layer } from '@aws-cdk/lambda-layer-kubectl-v37';
const myEksCluster = new eks.Cluster(this, 'my sample cluster', {
version: eks.KubernetesVersion.V1_37,
clusterName: 'myEksCluster',
kubectlLayer: new KubectlV37Layer(this, 'kubectl'),
});
new tasks.EksCall(this, 'Call a EKS Endpoint', {
cluster: myEksCluster,
httpMethod: tasks.HttpMethods.GET,
httpPath: '/api/v1/namespaces/default/pods',
});
import aws_cdk.aws_eks as eks
from aws_cdk.lambda_layer_kubectl_v37 import KubectlV37Layer
my_eks_cluster = eks.Cluster(self, "my sample cluster",
version=eks.KubernetesVersion.V1_37,
cluster_name="myEksCluster",
kubectl_layer=KubectlV37Layer(self, "kubectl")
)
tasks.EksCall(self, "Call a EKS Endpoint",
cluster=my_eks_cluster,
http_method=tasks.HttpMethods.GET,
http_path="/api/v1/namespaces/default/pods"
)
import software.amazon.awscdk.services.eks.*;
import software.amazon.awscdk.cdk.lambdalayer.kubectl.v37.KubectlV37Layer;
Cluster myEksCluster = Cluster.Builder.create(this, "my sample cluster")
.version(KubernetesVersion.V1_37)
.clusterName("myEksCluster")
.kubectlLayer(new KubectlV37Layer(this, "kubectl"))
.build();
EksCall.Builder.create(this, "Call a EKS Endpoint")
.cluster(myEksCluster)
.httpMethod(HttpMethods.GET)
.httpPath("/api/v1/namespaces/default/pods")
.build();
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.EKS;
using Amazon.CDK.LambdaLayer.KubectlV37;
var myEksCluster = new Cluster(this, "my sample cluster", new ClusterProps {
Version = KubernetesVersion.V1_37,
ClusterName = "myEksCluster",
KubectlLayer = new KubectlV37Layer(this, "kubectl")
});
new EksCall(this, "Call a EKS Endpoint", new EksCallProps {
Cluster = myEksCluster,
HttpMethod = HttpMethods.GET,
HttpPath = "/api/v1/namespaces/default/pods"
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/cdklabs/awscdk-kubectl-go/kubectlv37"
myEksCluster := eks.NewCluster(this, jsii.String("my sample cluster"), &ClusterProps{
Version: eks.KubernetesVersion_V1_37(),
ClusterName: jsii.String("myEksCluster"),
KubectlLayer: kubectlv37.NewKubectlV37Layer(this, jsii.String("kubectl")),
})
tasks.NewEksCall(this, jsii.String("Call a EKS Endpoint"), &EksCallProps{
Cluster: myEksCluster,
HttpMethod: tasks.HttpMethods_GET,
HttpPath: jsii.String("/api/v1/namespaces/default/pods"),
})
Properties
assignoptional{ [key: string]: any }assignoptionaltyping.Mapping[str, Any]assignoptionalMap<String, Object>AssignoptionalIDictionary<string, object>Assignoptional*map[string]interface{} #Default: Not assign variables
Using workflow variables, you can store data in a step and retrieve that data in future steps.
commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string #Default: No comment
credentialsoptionalCredentialscredentialsoptionalCredentialscredentialsoptionalCredentialsCredentialsoptionalCredentialsCredentialsoptionalCredentials #Default: None (Task is executed using the State Machine's execution role)
This enables cross-account resource invocations.
heartbeatoptionalDurationheartbeatoptionalDurationheartbeatoptionalDurationHeartbeatoptionalDurationHeartbeatoptionalDuration = None deprecated #heartbeatTimeoutoptionalTimeoutheartbeat_timeoutoptionalTimeoutheartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeout = None #[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface
httpMethodHttpMethodshttp_methodHttpMethodshttpMethodHttpMethodsHttpMethodHttpMethodsHttpMethodHttpMethods required #inputPathoptionalstringinput_pathoptionalstrinputPathoptionalStringInputPathoptionalstringInputPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
integrationPatternoptionalIntegrationPatternintegration_patternoptionalIntegrationPatternintegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPattern #Default: IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.
You can control these AWS services using service integration patterns.
Depending on the AWS Service, the Service Integration Pattern availability will vary.
outputPathoptionalstringoutput_pathoptionalstroutputPathoptionalStringOutputPathoptionalstringOutputPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.
outputsoptionalanyoutputsoptionalAnyoutputsoptionalObjectOutputsoptionalobjectOutputsoptionalinterface{} #Default: $states.result or $states.errorOutput
notes
When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.
queryLanguageoptionalQueryLanguagequery_languageoptionalQueryLanguagequeryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguage = JSONPath #If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.
queryParametersoptional{ [key: string]: string[] }query_parametersoptionaltyping.Mapping[str, typing.List[str]]queryParametersoptionalMap<String, List<String>>QueryParametersoptionalIDictionary<string, string[]>QueryParametersoptional*map[string]*[]*string #Default: no query parameters
requestBodyoptionalTaskInputrequest_bodyoptionalTaskInputrequestBodyoptionalTaskInputRequestBodyoptionalTaskInputRequestBodyoptionalTaskInput #Default: No request body
resultPathoptionalstringresult_pathoptionalstrresultPathoptionalStringResultPathoptionalstringResultPathoptional*string = $ #May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.
resultSelectoroptional{ [key: string]: any }result_selectoroptionaltyping.Mapping[str, Any]resultSelectoroptionalMap<String, Object>ResultSelectoroptionalIDictionary<string, object>ResultSelectoroptional*map[string]interface{} = None #You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.
stateNameoptionalstringstate_nameoptionalstrstateNameoptionalStringStateNameoptionalstringStateNameoptional*string #Default: The construct ID will be used as state name