Skip to content
v2.277.0

HttpMethods Enum ​

Method type of a EKS call.

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 ​

MemberDescription
GETRetrieve data from a server at the specified resource.
POSTSend data to the API endpoint to create or update a resource.
PUTSend data to the API endpoint to update or create a resource.
DELETEDelete the resource at the specified endpoint.
PATCHApply partial modifications to the resource.
HEADRetrieve data from a server at the specified resource without the response body.

Referenced by ​