Updates a specified resource in a Kubernetes cluster.

Note You can update only Deployments.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see the topic about common request parameters.

Request syntax

POST /pop/v5/oam/update_k8s_resource_config HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
ClusterId String Body No 2e7059e9-2d********5e8ecac64ff

The ID of the cluster.

Namespace String Body No app-namespace

The ID of the namespace to which the Kubernetes resource belongs.

ResourceContent String Body No apiVersion: apps/v1 kind: Deployment metadata: name: demo-app namespace: app-namespace spec: replicas: 3 selector: matchLabels: cluster: abc template: # create pods using pod definition in this template metadata: labels: cluster: abc spec: containers: - image: registry-vpc.cn-hangzhou.aliyuncs.com/edas-demo-image/consumer:1.0 imagePullPolicy: Always name: test-container ports: - containerPort: 80 env: - name: foo value: bar

The description of the updated resource in the YAML format.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Message String success

The returned message that indicates whether the request is successful.

RequestId String 7638276F-****-****-884F-54CC0BC84A8D

The ID of the request.


Sample requests

POST /pop/v5/oam/update_k8s_resource_config HTTP/1.1
Common request headers

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.