HttpMethods Enum
Method type of a EKS call.
| Source | aws-stepfunctions-tasks/lib/eks/call.ts |
|---|
Example
ts
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',
});
python
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"
)
java
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();
csharp
// 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"
});
go
// 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"),
})
Members
| Member | Description |
|---|---|
GET | Retrieve data from a server at the specified resource. |
POST | Send data to the API endpoint to create or update a resource. |
PUT | Send data to the API endpoint to update or create a resource. |
DELETE | Delete the resource at the specified endpoint. |
PATCH | Apply partial modifications to the resource. |
HEAD | Retrieve data from a server at the specified resource without the response body. |
Referenced by
EksCallJsonataProps.httpMethodhttp_methodhttpMethodHttpMethodHttpMethodEksCallJsonPathProps.httpMethodhttp_methodhttpMethodHttpMethodHttpMethodEksCallProps.httpMethodhttp_methodhttpMethodHttpMethodHttpMethod